package com.alterdekim.game.service;

import com.alterdekim.flash.decompiler.mapper.OutputObjectCallback;
import com.alterdekim.game.entity.Library;
import com.alterdekim.game.repository.LibraryRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LibraryService implements OutputObjectCallback {

    @Autowired
    private LibraryRepository repository;

    public void save(Library library) {
        this.repository.save(library);
    }

    @Override
    public void onOutputObjectReady(Object o) {
        this.repository.save((Library) o);
    }
}
