de.terrestris.shoguncore.service.ApplicationService Maven / Gradle / Ivy
package de.terrestris.shoguncore.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import de.terrestris.shoguncore.dao.ApplicationDao;
import de.terrestris.shoguncore.model.Application;
/**
* Service class for the {@link Application} model.
*
* @author Nils Bühner
* @see AbstractCrudService
*/
@Service("applicationService")
public class ApplicationService>
extends PermissionAwareCrudService {
/**
* Default constructor, which calls the type-constructor
*/
@SuppressWarnings("unchecked")
public ApplicationService() {
this((Class) Application.class);
}
/**
* Constructor that sets the concrete entity class for the service.
* Subclasses MUST call this constructor.
*/
protected ApplicationService(Class entityClass) {
super(entityClass);
}
/**
* We have to use {@link Qualifier} to define the correct dao here.
* Otherwise, spring can not decide which dao has to be autowired here
* as there are multiple candidates.
*/
@Override
@Autowired
@Qualifier("applicationDao")
public void setDao(D dao) {
this.dao = dao;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy