|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GenericBaseDAO<E extends BaseVO,PK extends Serializable>
Field Summary | |
---|---|
static String |
ORDER_BY
|
static String |
SEPARATOR_COMMA
|
static String |
SEPARATOR_DOT
|
Method Summary | |
---|---|
Collection<E> |
create(Collection<E> entities)
Persist the given transient collection instance, first assigning a generated identifier. |
PK |
create(E entity)
Persist the given transient instance, first assigning a generated identifier. |
Collection<E> |
find(String queryString,
Object[] values)
find Entity instances. |
Collection<E> |
findByCriteria(org.hibernate.criterion.DetachedCriteria criteria)
findByExample Entity instances. |
Collection<E> |
findByExample(E entity)
findByExample Entity instances. |
org.hibernate.criterion.DetachedCriteria |
getCriteria()
Obtain a criteria for the entity class |
String |
getQueryOrderedBy(String entityName,
String query,
org.hibernate.criterion.Order... orders)
Contruct order by from entityName, query and Order Order |
E |
load(PK Id)
Loads a Entity instance by identifier. |
Collection<E> |
loadAll()
Return all objects related to the implementation of this DAO with no filter. |
Collection<E> |
loadAllOrderBy(org.hibernate.criterion.Order... orders)
Return all objects related to the implementation of this DAO with no filter and ordered by orders. |
Collection<E> |
loadAllOrderby(String propertyName,
Boolean ascending)
Return all objects related to the implementation of this DAO with no filter, ordered by propertyName and ascending. |
void |
remove(Collection<E> entities)
Removes all entities in the given entities |
void |
remove(E entity)
Remove a persistent instance from the datastore. |
void |
removeByPk(PK id)
Remove a persistent instance from the datastore. |
void |
save(E entity)
Save the persistent state associated with the given identifier. |
void |
saveOrUpdate(Collection<E> entities)
saveOrUpdate the persistent collection state associated with the given identifier. |
void |
saveOrUpdate(E entity)
saveOrUpdate the persistent state associated with the given identifier. |
void |
update(E entity)
Update a persistent instance from the datastore. |
Methods inherited from interface com.ferri.core.behaviors.Initializable |
---|
initialize |
Field Detail |
---|
static final String ORDER_BY
static final String SEPARATOR_COMMA
static final String SEPARATOR_DOT
Method Detail |
---|
E load(PK Id)
key
- the identifier
Collection<E> loadAll()
PK create(E entity)
entity
- a transient instance of a persistent class.
Collection<E> create(Collection<E> entities)
entities
- the collection to persist.
void save(E entity)
entity
- a transient instance containing saved Or Updated state.void update(E entity)
entity
- the instance to be updated.void saveOrUpdate(E entity)
entity
- a transient instance containing saved Or Updated state.void saveOrUpdate(Collection<E> entities)
entities
- the collection to saveOrUpdate.void removeByPk(PK id)
id
- the instance ID to be removed.void remove(E entity)
entity
- the instance to be removed.void remove(Collection<E> entities)
entities collection.
- Parameters:
entities
- the collection remove.
Collection<E> find(String queryString, Object[] values)
queryString
- values
-
Collection<E> findByExample(E entity)
entity
- the identifier
Collection<E> findByCriteria(org.hibernate.criterion.DetachedCriteria criteria)
entity
- the identifier
org.hibernate.criterion.DetachedCriteria getCriteria()
Collection<E> loadAllOrderBy(org.hibernate.criterion.Order... orders)
Collection<E> loadAllOrderby(String propertyName, Boolean ascending)
String getQueryOrderedBy(String entityName, String query, org.hibernate.criterion.Order... orders)
Order
entityName
- the entity namequery
- the queryorders
- the orders
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |