|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ICdmEntityDao<T extends CdmBase>
an data access interface that all data access classes implement
| Method Summary | |
|---|---|
void |
clear()
|
int |
count()
|
int |
count(Class<? extends T> clazz)
Returns the number of objects of type |
int |
count(T example,
Set<String> includeProperties)
Method that counts the number of objects matching the example provided. |
UUID |
delete(T persistentObject)
|
Boolean |
exists(UUID uuid)
|
T |
findById(int id)
|
T |
findByUuid(UUID Uuid)
|
void |
flush()
FIXME Should this method exist : I would expect flushing of a session to be something that a DAO should hide? |
org.hibernate.Session |
getSession()
|
Class<T> |
getType()
Convenience method which makes it easy to discover what type of object this DAO returns at runtime |
List<Object[]> |
group(Class<? extends T> clazz,
Integer limit,
Integer start,
List<Grouping> groups,
List<String> propertyPaths)
Returns a sublist of objects matching the grouping projections supplied using the groups parameter It would be nice to have an equivalent countGroups method, but for the moment hibernate doesn't seem to support this (HHH-3238 - impossible to get the rowcount for a criteria that has projections) |
List<T> |
list(Class<? extends T> type,
Integer limit,
Integer start)
Returns a sublist of CdmBase instances of type |
List<T> |
list(Class<? extends T> type,
Integer limit,
Integer start,
List<OrderHint> orderHints,
List<String> propertyPaths)
Returns a sublist of CdmBase instances stored in the database. |
List<T> |
list(Collection<UUID> uuids,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
|
List<T> |
list(Integer limit,
Integer start)
Returns a sublist of CdmBase instances stored in the database. |
List<T> |
list(Integer limit,
Integer start,
List<OrderHint> orderHints)
Returns a sublist of CdmBase instances stored in the database. |
List<T> |
list(Integer limit,
Integer start,
List<OrderHint> orderHints,
List<String> propertyPaths)
Returns a sublist of CdmBase instances stored in the database. |
List<T> |
list(T example,
Set<String> includeProperties,
Integer limit,
Integer start,
List<OrderHint> orderHints,
List<String> propertyPaths)
Method that lists the objects matching the example provided. |
List<T> |
listByIds(Collection<Integer> ids,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
|
T |
load(int id,
List<String> propertyPaths)
Finds the cdm entity specified by the id parameter and recursively initializes all bean properties given in the propertyPaths parameter. |
T |
load(UUID uuid)
Finds the cdm entity specified by the uuid parameter and
initializes all its *ToOne relations. |
T |
load(UUID uuid,
List<String> propertyPaths)
Finds the cdm entity specified by the uuid parameter and
recursively initializes all bean properties given in the
propertyPaths parameter. |
void |
lock(T t,
org.hibernate.LockMode lockMode)
Obtains the specified LockMode on the supplied object |
T |
merge(T transientObject)
|
UUID |
refresh(T persistentObject)
|
void |
refresh(T t,
org.hibernate.LockMode lockMode,
List<String> propertyPaths)
Refreshes the state of the supplied object using the given LockMode (e.g. |
T |
replace(T x,
T y)
Globally replace all references to instance t1 with t2 (including NOTE: This replaces all non-bidirectional relationships where type T is on the "owning" side of the relationship (since the "owned" objects are, in theory, sub-components of the entity and this kind of global replace doesn't really make sense Consequently it is a good idea to either map such owned relationships with cascading semantics (i.e. |
List<T> |
rows(String tableName,
int limit,
int start)
|
UUID |
save(T newOrManagedObject)
|
Map<UUID,T> |
saveAll(Collection<T> cdmObjCollection)
|
UUID |
saveOrUpdate(T transientObject)
|
Map<UUID,T> |
saveOrUpdateAll(Collection<T> cdmObjCollection)
|
UUID |
update(T transientObject)
|
| Method Detail |
|---|
UUID saveOrUpdate(T transientObject)
throws org.springframework.dao.DataAccessException
transientObject -
org.springframework.dao.DataAccessException
UUID save(T newOrManagedObject)
throws org.springframework.dao.DataAccessException
newOrManagedObject -
org.springframework.dao.DataAccessException
T merge(T transientObject)
throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessException
void lock(T t,
org.hibernate.LockMode lockMode)
throws org.springframework.dao.DataAccessException
t - lockMode -
org.springframework.dao.DataAccessException
T replace(T x,
T y)
x - the object to replace, must not be nully - the object that will replace. If y is null, then x will be removed from all collections
and all properties that refer to x will be replaced with null
void refresh(T t,
org.hibernate.LockMode lockMode,
List<String> propertyPaths)
throws org.springframework.dao.DataAccessException
propertyPaths parameter are recursively initialized.
For detailed description and examples please refer to:
IBeanInitializer.initialize(Object, List)
t - lockMode - propertyPaths -
org.springframework.dao.DataAccessException
void clear()
throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessException
org.hibernate.Session getSession()
throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessException
Map<UUID,T> saveAll(Collection<T> cdmObjCollection)
throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessExceptionMap<UUID,T> saveOrUpdateAll(Collection<T> cdmObjCollection)
UUID update(T transientObject)
throws org.springframework.dao.DataAccessException
transientObject -
org.springframework.dao.DataAccessException
UUID refresh(T persistentObject)
throws org.springframework.dao.DataAccessException
persistentObject -
org.springframework.dao.DataAccessException
UUID delete(T persistentObject)
throws org.springframework.dao.DataAccessException
persistentObject -
org.springframework.dao.DataAccessException
List<T> list(Integer limit,
Integer start)
throws org.springframework.dao.DataAccessException
limit - the maximum number of entities returned (can be null to return all entities)start -
org.springframework.dao.DataAccessException
List<T> list(Integer limit,
Integer start,
List<OrderHint> orderHints)
limit - the maximum number of entities returned (can be null to return
all entities)start - orderHints - Supports path like orderHints.propertyNames which
include *-to-one properties like createdBy.username or
authorTeam.persistentTitleCache
org.springframework.dao.DataAccessException
List<T> list(Class<? extends T> type,
Integer limit,
Integer start,
List<OrderHint> orderHints,
List<String> propertyPaths)
type - limit - the maximum number of entities returned (can be null to return
all entities)start - orderHints - Supports path like orderHints.propertyNames which
include *-to-one properties like createdBy.username or
authorTeam.persistentTitleCache
org.springframework.dao.DataAccessException
List<T> list(Integer limit,
Integer start,
List<OrderHint> orderHints,
List<String> propertyPaths)
propertyPaths
and recursively initialized for each of the entities in the resultset
For detailed description and examples redarding
propertyPaths please refer to:
IBeanInitializer.initialize(Object, List)
limit - the maximum number of entities returned (can be null to return
all entities)start - orderHints - Supports path like orderHints.propertyNames which
include *-to-one properties like createdBy.username or
authorTeam.persistentTitleCachepropertyPaths -
org.springframework.dao.DataAccessException
List<T> list(Class<? extends T> type,
Integer limit,
Integer start)
throws org.springframework.dao.DataAccessException
limit - the maximum number of entities returned (can be null to return all entities)start -
org.springframework.dao.DataAccessException
List<Object[]> group(Class<? extends T> clazz,
Integer limit,
Integer start,
List<Grouping> groups,
List<String> propertyPaths)
clazz - Restrict the query to objects of a certain class, or null for all objects of type T or subclasseslimit - the maximum number of entities returned (can be null to return
all entities)start - The (0-based) offset from the start of the recordsetgroups - The grouping objects representing a projection, plus an optional ordering on that projected propertypropertyPaths - paths initialized on the returned objects - only applied to the objects returned from the first grouping
List<T> rows(String tableName,
int limit,
int start)
throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessException
T findById(int id)
throws org.springframework.dao.DataAccessException
id -
org.springframework.dao.DataAccessException
T load(int id,
List<String> propertyPaths)
propertyPaths parameter.
For detailed description and examples please refer to:
IBeanInitializer.initialize(Object, List)
id - propertyPaths - properties to be initialized
List<T> listByIds(Collection<Integer> ids,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
throws org.springframework.dao.DataAccessException
ids - pageSize - pageNumber - orderHints - propertyPaths -
org.springframework.dao.DataAccessException
T findByUuid(UUID Uuid)
throws org.springframework.dao.DataAccessException
Uuid -
org.springframework.dao.DataAccessException
List<T> list(Collection<UUID> uuids,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
throws org.springframework.dao.DataAccessException
uuids - pageSize - pageNumber - orderHints - propertyPaths -
org.springframework.dao.DataAccessExceptionT load(UUID uuid)
uuid parameter and
initializes all its *ToOne relations.
uuid -
T load(UUID uuid,
List<String> propertyPaths)
uuid parameter and
recursively initializes all bean properties given in the
propertyPaths parameter.
For detailed description and examples please refer to:
IBeanInitializer.initialize(Object, List)
uuid - propertyPaths - properties to be initialized
Boolean exists(UUID uuid)
throws org.springframework.dao.DataAccessException
uuid -
org.springframework.dao.DataAccessExceptionint count()
int count(Class<? extends T> clazz)
T - clazz -
void flush()
Class<T> getType()
int count(T example,
Set<String> includeProperties)
example - includeProperties -
List<T> list(T example,
Set<String> includeProperties,
Integer limit,
Integer start,
List<OrderHint> orderHints,
List<String> propertyPaths)
example - includeProperties - limit - the maximum number of entities returned (can be null to return
all entities)start - The (0-based) offset from the start of the recordsetorderHints - Supports path like orderHints.propertyNames which
include *-to-one properties like createdBy.username orpropertyPaths - paths initialized on the returned objects - only applied to the objects returned from the first grouping
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||