|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.internet2.middleware.grouper.hibernate.ByObjectStatic
public class ByObjectStatic
for simple object queries, use this instead of inverse of control. this will do proper error handling and descriptive exception handling. This will by default use the transaction modes GrouperTransactionType.READONLY_OR_USE_EXISTING, and GrouperTransactionType.READ_WRITE_OR_USE_EXISTING depending on if a transaction is needed.
Method Summary | ||
---|---|---|
void |
delete(java.util.Collection<?> collection)
call hibernate method "delete" on a list of objects HibernateSession.byObjectStatic().delete(collection); |
|
void |
delete(java.lang.Object object)
call hibernate method "delete" on a list of objects HibernateSession.byObjectStatic().delete(Rosetta.getDAO(_f)); |
|
boolean |
isIgnoreHooks()
if we should ignore hooks |
|
|
load(java.lang.Class<T> theClass,
java.io.Serializable id)
call hibernate "load" method on an object |
|
static void |
main(java.lang.String[] args)
|
|
void |
save(java.util.Collection<?> collection)
call hibernate method "save" on a list of objects HibernateSession.byObjectStatic().save(collection); |
|
java.io.Serializable |
save(java.lang.Object object)
call hibernate method "save" on an object HibernateSession.byObjectStatic().save(dao); |
|
void |
saveBatch(java.util.Collection<?> collection)
call hibernate method "save" on a collection of objects in batch |
|
void |
saveOrUpdate(java.util.Collection<?> collection)
call hibernate method "saveOrUpdate" on a list of objects HibernateSession.byObjectStatic().saveOrUpdate(collection); |
|
void |
saveOrUpdate(java.lang.Object object)
call hibernate "saveOrUpdate" method on an object |
|
ByObjectStatic |
setCacheable(java.lang.Boolean cacheable)
assign if this query is cacheable or not. |
|
ByObjectStatic |
setCacheRegion(java.lang.String cacheRegion)
cache region for cache |
|
ByObjectStatic |
setEntityName(java.lang.String theEntityName)
entity name if the object is mapped to more than one table |
|
ByObjectStatic |
setGrouperTransactionType(GrouperTransactionType theGrouperTransactionType)
assign a different grouperTransactionType (e.g. for autonomous transactions) |
|
ByObjectStatic |
setIgnoreHooks(boolean theIgnoreHooks)
if we should ignore hooks |
|
java.lang.String |
toString()
string value for error handling |
|
void |
update(java.util.Collection<?> collection)
call hibernate method "update" on a list of objects HibernateSession.byObjectStatic().update(collection); |
|
void |
update(java.lang.Object object)
call hibernate "update" method on an object |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public ByObjectStatic setGrouperTransactionType(GrouperTransactionType theGrouperTransactionType)
theGrouperTransactionType
-
public ByObjectStatic setCacheable(java.lang.Boolean cacheable)
cacheable
- the cacheable to set
public java.lang.String toString()
toString
in class java.lang.Object
public ByObjectStatic setCacheRegion(java.lang.String cacheRegion)
cacheRegion
- the cacheRegion to set
public ByObjectStatic setEntityName(java.lang.String theEntityName)
theEntityName
- the entity name of the object
public void update(java.util.Collection<?> collection) throws GrouperDAOException
call hibernate method "update" on a list of objects HibernateSession.byObjectStatic().update(collection);
collection
- is collection of objects to update in one transaction. If null or empty just ignore
GrouperDAOException
public void update(java.lang.Object object) throws GrouperDAOException
object
- to update
GrouperDAOException
public <T> T load(java.lang.Class<T> theClass, java.io.Serializable id) throws GrouperDAOException
T
- theClass
- to loadid
-
GrouperDAOException
public void saveOrUpdate(java.util.Collection<?> collection) throws GrouperDAOException
call hibernate method "saveOrUpdate" on a list of objects HibernateSession.byObjectStatic().saveOrUpdate(collection);
collection
- is collection of objects to saveOrUpdate in one transaction. If null or empty just ignore
GrouperDAOException
public void saveOrUpdate(java.lang.Object object) throws GrouperDAOException
object
- to update
GrouperDAOException
public void save(java.util.Collection<?> collection) throws GrouperDAOException
call hibernate method "save" on a list of objects HibernateSession.byObjectStatic().save(collection);
collection
- is collection of objects to save in one transaction. If null or empty just ignore
GrouperDAOException
public java.io.Serializable save(java.lang.Object object) throws GrouperDAOException
call hibernate method "save" on an object HibernateSession.byObjectStatic().save(dao);
object
- to save
GrouperDAOException
public void saveBatch(java.util.Collection<?> collection) throws GrouperDAOException
call hibernate method "save" on a collection of objects in batch
collection
- of objects
GrouperDAOException
public void delete(java.util.Collection<?> collection) throws GrouperDAOException
call hibernate method "delete" on a list of objects HibernateSession.byObjectStatic().delete(collection);
collection
- is collection of objects to delete in one transaction. If null or empty just ignore
GrouperDAOException
public void delete(java.lang.Object object) throws GrouperDAOException
call hibernate method "delete" on a list of objects HibernateSession.byObjectStatic().delete(Rosetta.getDAO(_f));
object
- is an object (if collection will still work), if null, will probably throw exception
GrouperDAOException
public ByObjectStatic setIgnoreHooks(boolean theIgnoreHooks)
ByQueryBase.setIgnoreHooks(boolean)
public boolean isIgnoreHooks()
public static void main(java.lang.String[] args)
args
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |