|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - public interface IService<T extends ICdmBase>
| Method Summary | |
|---|---|
void |
clear()
|
int |
count(Class<? extends T> clazz)
Returns a count of all entities of type |
UUID |
delete(T persistentObject)
Delete an existing persistent object |
boolean |
exists(UUID uuid)
Returns true if an entity of type |
T |
find(int id)
Return a persisted entity that matches the database identifier supplied as an argument, or null if the entity does not exist |
List<T> |
find(Set<UUID> uuidSet)
Return a list of persisted entities that match the unique identifier set supplied as an argument |
T |
find(UUID uuid)
Return a persisted entity that matches the unique identifier supplied as an argument, or null if the entity does not exist |
List<T> |
findById(Set<Integer> idSet)
Returns a List of persisted entities that match the database identifiers. |
org.hibernate.Session |
getSession()
|
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 be able to return a pager, 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,
List<OrderHint> orderHints,
List<String> propertyPaths)
Returns a list of entities of type |
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. |
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)
Obtain the specified lock mode on the given object t |
T |
merge(T transientObject)
Copy the state of the given object onto the persistent object with the same identifier. |
Pager<T> |
page(Class<? extends T> type,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
Returns a paged list of entities of type |
UUID |
refresh(T persistentObject)
Re-read the state of the given instance from the underlying database. |
void |
refresh(T t,
org.hibernate.LockMode lockMode,
List<String> propertyPaths)
Refreshes a given object t using the specified lockmode All bean properties given in the propertyPaths parameter are recursively initialized. |
List<T> |
rows(String tableName,
int limit,
int start)
|
Map<UUID,T> |
save(Collection<T> newInstances)
Save a collection containing new entities (persists the entities) |
UUID |
save(T newInstance)
Save a new entity (persists the entity) |
Map<UUID,T> |
saveOrUpdate(Collection<T> transientObjects)
Save new entities or update the persistent state of existing transient entities that have been persisted previously |
UUID |
saveOrUpdate(T transientObject)
Save a new entity or update the persistent state of an existing transient entity that has been persisted previously |
UUID |
update(T transientObject)
Update the persistent state of an existing transient entity that has been persisted previously |
| Method Detail |
|---|
void clear()
void lock(T t,
org.hibernate.LockMode lockMode)
void refresh(T t,
org.hibernate.LockMode lockMode,
List<String> propertyPaths)
propertyPaths parameter are recursively initialized.
For detailed description and examples please refer to:
IBeanInitializer.initialize(Object, List)
NOTE: in the case of lockmodes that hit the database (e.g. LockMode.READ), you will need to re-initialize
child propertiesto avoid a HibernateLazyInitializationException (even if the properties of the child
were initialized prior to the refresh).
t - lockMode - int count(Class<? extends T> clazz)
clazz - the class of entities to be counted (can be null to count all entities of type UUID delete(T persistentObject)
persistentObject - the object to be deleted
boolean exists(UUID uuid)
uuid - the unique identifier of the entity required
List<T> find(Set<UUID> uuidSet)
uuidSet - the set of unique identifiers of the entities required
T find(UUID uuid)
uuid - the unique identifier of the entity required
T find(int id)
id - the database identifier of the entity required
List<T> findById(Set<Integer> idSet)
List of persisted entities that match the database identifiers.
Returns an empty list if no identifier matches.
idSet -
org.hibernate.Session getSession()
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 recordset (can be null, equivalent of starting at the beginning of the recordset)groups - 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> list(Class<? extends T> type,
Integer limit,
Integer start,
List<OrderHint> orderHints,
List<String> propertyPaths)
type - The type of entities to return (can be null to count all entities of type limit - The maximum number of objects returned (can be null for all matching objects)start - The offset from the start of the result set (0 - based, can be null - equivalent of starting at the beginning of the recordset)orderHints - Supports path like orderHints.propertyNames which
include *-to-one properties like createdBy.username or
authorTeam.persistentTitleCachepropertyPaths - properties to be initialized
T 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 -
T merge(T transientObject)
transientObject - the entity to be merged
Pager<T> page(Class<? extends T> type,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
type - The type of entities to return (can be null to count all entities of type pageSize - The maximum number of objects returned (can be null for all matching objects)pageNumber - The offset (in pageSize chunks) from the start of the result set (0 - based,
can be null, equivalent of starting at the beginning of the recordset)orderHints - Supports path like orderHints.propertyNames which
include *-to-one properties like createdBy.username or
authorTeam.persistentTitleCachepropertyPaths - properties to be initialized
UUID refresh(T persistentObject)
persistentObject - the object to be refreshed
List<T> rows(String tableName,
int limit,
int start)
Map<UUID,T> save(Collection<T> newInstances)
newInstances - the new entities to be persisted
UUID save(T newInstance)
newInstance - the new entity to be persisted
UUID saveOrUpdate(T transientObject)
transientObject - the entity to be persisted
Map<UUID,T> saveOrUpdate(Collection<T> transientObjects)
transientObjects - the entities to be persisted
UUID update(T transientObject)
transientObject - the entity to be persisted
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 | |||||||||