|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface GenericDao
| Method Summary | ||
|---|---|---|
void |
addOrUpdateObject(java.lang.Object object)
|
|
void |
attachObject(java.lang.Object obj)
If the underlying ORM supports object caching, this method makes sure this object is cached and associated with the current session. |
|
void |
clearObjectCache()
If the underlying ORM supports object caching, this method clears that cache, forcing any future object retrieval to come fresh from the database. |
|
int |
count(java.lang.Class<?> cls,
java.util.Collection<com.jamasoftware.contour.service.restriction.Restriction> restrictions)
Counts the number of results, given the restrictions, in an efficient manner. |
|
void |
detatchObject(java.lang.Object obj)
If the underlying ORM supports object caching, this method makes sure this object isn't cached, and therefore isn't returned by any service methods without retrieving from the database fresh. |
|
java.lang.String |
doNotFlushTemporarily()
Sets up the current session to never flush unless explicitly asked via flush(). |
|
void |
flush()
Makes sure that any pending changes or commands to be applied to the database are run or executed. |
|
|
getObject(java.lang.Class<T> cls,
java.io.Serializable id)
Gets an object by its unique identifier. |
|
DomainObjectBase |
getObjectByScopeRef(java.lang.Integer scope,
java.lang.Integer refId)
Gets an object by scope/ref |
|
java.util.List<DomainObjectBase> |
getObjectListByScopeRef(java.lang.Integer scope,
java.util.List<java.lang.Integer> refIds)
|
|
|
getObjects(java.lang.Class<T> cls,
java.util.Collection<com.jamasoftware.contour.service.restriction.Restriction> restrictions,
java.lang.Integer firstResult,
java.lang.Integer maxResults,
com.jamasoftware.contour.service.search.SorterInfo sortInfo)
Gets a List of objects of type T. |
|
java.util.List<? extends DomainObjectBase> |
getReferencesToScope(DomainObjectBase domainObj,
java.lang.Class<?> tableName)
|
|
|
getScopedObjects(java.lang.Class<T> cls,
java.lang.Integer scopeId,
java.lang.Integer refId)
|
|
void |
initialize(java.lang.Object proxy)
Force initialization of a proxy object. |
|
void |
makeReadOnly(java.lang.Object obj,
boolean readonly)
If readOnly is true, makes the object read only from the view of the underlying ORM. |
|
java.lang.Object |
mergeObject(java.lang.Object obj)
|
|
|
objectExists(java.lang.Class<T> cls,
java.io.Serializable id)
Returns whether or not an object exists. |
|
void |
quickFlush()
Performs a quick session flush to persist items in database. |
|
void |
resumeNormalFlushOperation(java.lang.String flushMode)
Expected parameter is that which is returned from doNotFlushTemporarily(). |
|
void |
updateObjectRefForScope(java.lang.Integer scope,
java.lang.Integer oldRefId,
java.lang.Integer newRefId,
boolean flush)
Performs an update for all scope/ref combinations pointing to the oldRefId to point to the newRefId |
|
| Method Detail |
|---|
java.util.List<? extends DomainObjectBase> getReferencesToScope(DomainObjectBase domainObj,
java.lang.Class<?> tableName)
void quickFlush()
flush() because it does not flush to
indexes.
void flush()
java.lang.Object mergeObject(java.lang.Object obj)
java.lang.String doNotFlushTemporarily()
flush().
resumeNormalFlushOperation(String) when done with manual flush modevoid resumeNormalFlushOperation(java.lang.String flushMode)
doNotFlushTemporarily(). This will revert the current
session back to the flush mode that was set before that call was made.
flushMode - The flush mode returned from doNotFlushTemporarily()void detatchObject(java.lang.Object obj)
obj - The object that should not be cached.void attachObject(java.lang.Object obj)
obj - The object that should be associated with the current session
void makeReadOnly(java.lang.Object obj,
boolean readonly)
obj - An object to make read only or notreadonly - Whether the object should be readonly or notvoid clearObjectCache()
int count(java.lang.Class<?> cls,
java.util.Collection<com.jamasoftware.contour.service.restriction.Restriction> restrictions)
#getObjects(Class, Collection, PageInfo, SorterInfo) when paging information isn't applied, with the same
class and collection of restrictions.
cls - The mapping class that the restrictions apply torestrictions - The collection of Restrictions, or null
#getObjects(Class, Collection, PageInfo, SorterInfo)
<T> T getObject(java.lang.Class<T> cls,
java.io.Serializable id)
T - The type of the objectcls - The class of persisted objectid - The id
<T extends ScopedObject> java.util.List<T> getScopedObjects(java.lang.Class<T> cls,
java.lang.Integer scopeId,
java.lang.Integer refId)
DomainObjectBase getObjectByScopeRef(java.lang.Integer scope,
java.lang.Integer refId)
scope - A Scope integerrefId - The referenced id
java.util.List<DomainObjectBase> getObjectListByScopeRef(java.lang.Integer scope,
java.util.List<java.lang.Integer> refIds)
void updateObjectRefForScope(java.lang.Integer scope,
java.lang.Integer oldRefId,
java.lang.Integer newRefId,
boolean flush)
scope - A scopeoldRefId - A refId to update fromnewRefId - A refId to update toflush - Whether to flush after update statements are performed. This is recommended, as the
update statements don't bring objects in memory, so one could get stale data if later querying
for data that these updates affected.
<T> boolean objectExists(java.lang.Class<T> cls,
java.io.Serializable id)
T - The type of the objectcls - The class of persisted objectid - The id
<T> java.util.List<T> getObjects(java.lang.Class<T> cls,
java.util.Collection<com.jamasoftware.contour.service.restriction.Restriction> restrictions,
java.lang.Integer firstResult,
java.lang.Integer maxResults,
com.jamasoftware.contour.service.search.SorterInfo sortInfo)
List of objects of type T.
T - The type of objects being returnedcls - The mapping class for the object typerestrictions - The collection of Restrictions, or nullfirstResult - The index of the first result to return (null returns beginning of list)maxResults - The maximum number of results to return (null for all results)sortInfo - The sorting information, if applicable
void addOrUpdateObject(java.lang.Object object)
void initialize(java.lang.Object proxy)
proxy -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||