mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
25 lines
606 B
Java
25 lines
606 B
Java
|
|
package com.commafeed.backend.services;
|
||
|
|
|
||
|
|
import javax.ejb.Stateless;
|
||
|
|
import javax.inject.Inject;
|
||
|
|
|
||
|
|
import com.commafeed.backend.dao.ApplicationSettingsDAO;
|
||
|
|
import com.commafeed.backend.model.ApplicationSettings;
|
||
|
|
import com.google.common.collect.Iterables;
|
||
|
|
|
||
|
|
@Stateless
|
||
|
|
public class ApplicationSettingsService {
|
||
|
|
|
||
|
|
@Inject
|
||
|
|
ApplicationSettingsDAO applicationSettingsDAO;
|
||
|
|
|
||
|
|
public void save(ApplicationSettings settings) {
|
||
|
|
applicationSettingsDAO.saveOrUpdate(settings);
|
||
|
|
}
|
||
|
|
|
||
|
|
public ApplicationSettings get() {
|
||
|
|
return Iterables.getFirst(applicationSettingsDAO.findAll(), null);
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|