Package com.hack23.cia.service.data.api
Interface AbstractGenericDAO<T extends java.io.Serializable,I extends java.io.Serializable>
-
- Type Parameters:
T
- the generic typeI
- the generic type
- All Known Subinterfaces:
AgencyDAO
,ApplicationActionEventDAO
,ApplicationConfigurationDAO
,ApplicationSessionDAO
,CommitteeProposalComponentDataDAO
,CountryElementDAO
,DataDAO
,DocumentContentDataDAO
,DocumentElementDAO
,DocumentStatusContainerDAO
,EncryptedValueDAO
,IndicatorElementDAO
,LanguageContentDataDAO
,LanguageDataDAO
,PersonDataDAO
,SwedenPoliticalPartyDAO
,UserDAO
,ViewRiksdagenCommitteeDAO
,ViewRiksdagenMinistryDAO
,VoteDataDAO
public interface AbstractGenericDAO<T extends java.io.Serializable,I extends java.io.Serializable>
The Interface AbstractGenericDAO.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
delete(T entity)
Delete.T
findFirstByProperty(javax.persistence.metamodel.SingularAttribute<T,? extends java.lang.Object> property, java.lang.Object value)
Find first by property.<V> java.util.List<T>
findListByEmbeddedProperty(javax.persistence.metamodel.SingularAttribute<T,V> property, java.lang.Class<V> clazz2, javax.persistence.metamodel.SingularAttribute<V,? extends java.lang.Object> property2, java.lang.Object value)
Find list by embedded property.java.util.List<T>
findListByProperty(java.lang.Object[] values, javax.persistence.metamodel.SingularAttribute<T,? extends java.lang.Object>... properties)
Find list by property.java.util.List<T>
findListByProperty(javax.persistence.metamodel.SingularAttribute<T,? extends java.lang.Object> property, java.lang.Object value)
Find list by property.java.util.List<T>
findListByPropertyInList(javax.persistence.metamodel.SingularAttribute<T,? extends java.lang.Object> property, java.lang.Object[] values)
Find list by property in list.<V> java.util.List<T>
findOrderedByPropertyListByEmbeddedProperty(javax.persistence.metamodel.SingularAttribute<T,V> property, java.lang.Class<V> clazz2, javax.persistence.metamodel.SingularAttribute<V,? extends java.lang.Object> property2, java.lang.Object value, javax.persistence.metamodel.SingularAttribute<T,? extends java.lang.Object> orderByProperty)
Find ordered by property list by embedded property.java.util.List<T>
getAll()
Gets the all.java.util.List<T>
getAllOrderBy(javax.persistence.metamodel.SingularAttribute<T,? extends java.lang.Object> orderBy)
Gets the all order by.java.util.List<T>
getPage(int pageNr, int resultPerPage)
Gets the page.java.util.List<T>
getPageOrderBy(int pageNr, int resultPerPage, javax.persistence.metamodel.SingularAttribute<T,? extends java.lang.Object> orderBy)
Gets the page order by.java.lang.Long
getSize()
Gets the size.T
load(I id)
Load.T
merge(T entity)
Merge.void
persist(java.util.List<T> list)
Persist.void
persist(T entity)
Persist.java.util.List<T>
search(java.lang.String searchExpression, java.lang.Integer maxResults, java.lang.String... fields)
Search.
-
-
-
Method Detail
-
delete
void delete(T entity)
Delete.- Parameters:
entity
- the entity
-
findFirstByProperty
T findFirstByProperty(javax.persistence.metamodel.SingularAttribute<T,? extends java.lang.Object> property, java.lang.Object value)
Find first by property.- Parameters:
property
- the propertyvalue
- the value- Returns:
- the t
-
findListByProperty
java.util.List<T> findListByProperty(java.lang.Object[] values, javax.persistence.metamodel.SingularAttribute<T,? extends java.lang.Object>... properties)
Find list by property.- Parameters:
values
- the valuesproperties
- the properties- Returns:
- the list
-
findListByProperty
java.util.List<T> findListByProperty(javax.persistence.metamodel.SingularAttribute<T,? extends java.lang.Object> property, java.lang.Object value)
Find list by property.- Parameters:
property
- the propertyvalue
- the value- Returns:
- the list
-
findListByPropertyInList
java.util.List<T> findListByPropertyInList(javax.persistence.metamodel.SingularAttribute<T,? extends java.lang.Object> property, java.lang.Object[] values)
Find list by property in list.- Parameters:
property
- the propertyvalues
- the values- Returns:
- the list
-
findListByEmbeddedProperty
<V> java.util.List<T> findListByEmbeddedProperty(javax.persistence.metamodel.SingularAttribute<T,V> property, java.lang.Class<V> clazz2, javax.persistence.metamodel.SingularAttribute<V,? extends java.lang.Object> property2, java.lang.Object value)
Find list by embedded property.- Type Parameters:
V
- the value type- Parameters:
property
- the propertyclazz2
- the clazz 2property2
- the property 2value
- the value- Returns:
- the list
-
findOrderedByPropertyListByEmbeddedProperty
<V> java.util.List<T> findOrderedByPropertyListByEmbeddedProperty(javax.persistence.metamodel.SingularAttribute<T,V> property, java.lang.Class<V> clazz2, javax.persistence.metamodel.SingularAttribute<V,? extends java.lang.Object> property2, java.lang.Object value, javax.persistence.metamodel.SingularAttribute<T,? extends java.lang.Object> orderByProperty)
Find ordered by property list by embedded property.- Type Parameters:
V
- the value type- Parameters:
property
- the propertyclazz2
- the clazz 2property2
- the property 2value
- the valueorderByProperty
- the order by property- Returns:
- the list
-
getAll
java.util.List<T> getAll()
Gets the all.- Returns:
- the all
-
getAllOrderBy
java.util.List<T> getAllOrderBy(javax.persistence.metamodel.SingularAttribute<T,? extends java.lang.Object> orderBy)
Gets the all order by.- Parameters:
orderBy
- the order by- Returns:
- the all order by
-
getPage
java.util.List<T> getPage(int pageNr, int resultPerPage)
Gets the page.- Parameters:
pageNr
- the page nrresultPerPage
- the result per page- Returns:
- the page
-
getPageOrderBy
java.util.List<T> getPageOrderBy(int pageNr, int resultPerPage, javax.persistence.metamodel.SingularAttribute<T,? extends java.lang.Object> orderBy)
Gets the page order by.- Parameters:
pageNr
- the page nrresultPerPage
- the result per pageorderBy
- the order by- Returns:
- the page order by
-
getSize
java.lang.Long getSize()
Gets the size.- Returns:
- the size
-
persist
void persist(java.util.List<T> list)
Persist.- Parameters:
list
- the list
-
persist
void persist(T entity)
Persist.- Parameters:
entity
- the entity
-
search
java.util.List<T> search(java.lang.String searchExpression, java.lang.Integer maxResults, java.lang.String... fields)
Search.- Parameters:
searchExpression
- the search expressionmaxResults
- the max resultsfields
- the fields- Returns:
- the list
-
-