com.discursive.dao.generic.GenericDao Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of generic-dao Show documentation
Show all versions of generic-dao Show documentation
A generics DAO pattern/library
The newest version!
package com.discursive.dao.generic;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import org.springframework.transaction.annotation.Transactional;
public interface GenericDao {
T byId(ID id);
T byId(ID id, boolean lock);
List all();
List byExample(T exampleInstance, String... excludeProperty);
T oneByExample(T exampleInstance, String... excludeProperty);
@Transactional(readOnly = false)
T makePersistent(T entity);
@Transactional(readOnly = false)
T makeTransient(T entity);
@Transactional(readOnly = false)
Collection makeTransient(Collection entity);
}