All Downloads are FREE. Search and download functionalities are using the official Maven repository.

eu.freme.common.persistence.dao.DiaryDAO Maven / Gradle / Ivy

The newest version!
package eu.freme.common.persistence.dao;

import eu.freme.common.persistence.model.Diary;
import eu.freme.common.persistence.repository.DiaryRepository;
import org.springframework.stereotype.Component;

/**
 * Created by Arne Binder ([email protected]) on 17.02.2016.
 */
@Component
public class DiaryDAO extends OwnedResourceDAO{

    @Override
    public String tableName() {
        return Diary.class.getSimpleName();
    }

    @Override
    public Diary findOneByIdentifierUnsecured(String identifier) {
        // we use the name as the identifier of a diary instead of the id
        return ((DiaryRepository)this.repository).findOneByName(identifier);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy