public class ByObject extends Object
Modifier and Type | Method and Description |
---|---|
protected void |
copyFieldsTo(edu.internet2.middleware.grouper.hibernate.ByQueryBase byQueryBase)
copy fields from this to the argument
|
void |
delete(Collection<?> collection)
call hibernate method "delete" on a list of objects
HibernateSession.byObjectStatic().delete(collection);
|
void |
delete(Object object)
call hibernate method "delete" on a list of objects
HibernateSession.byObjectStatic().delete(Rosetta.getDAO(_f));
|
protected HibernateSession |
getHibernateSession() |
boolean |
isIgnoreHooks()
if we should ignore hooks
|
<T> T |
load(Class<T> theClass,
Serializable id)
call hibernate method "load" on an object
|
static void |
main(String[] args) |
void |
save(Collection<?> collection)
call hibernate method "save" on a list of objects
HibernateSession.byObjectStatic().save(collection);
|
Serializable |
save(Object object)
call hibernate method "save" on an object
HibernateSession.byObjectStatic().save(dao);
|
void |
saveBatch(Collection<?> collection)
call hibernate method "save" on a collection of objects in batch
|
void |
saveOrUpdate(Collection<?> collection)
call hibernate method "saveOrUpdate" on a list of objects
HibernateSession.byObjectStatic().saveOrUpdate(collection);
|
void |
saveOrUpdate(Object object)
call hibernate method "save" on an object
HibernateSession.byObjectStatic().save(dao);
|
protected edu.internet2.middleware.grouper.hibernate.ByQueryBase |
set(HibernateSession theHibernateSession2)
set the hibernate session to re-use, or null for a new one
byCriteriaStatic().set(hibernateSession2).select(...)
|
ByObject |
setEntityName(String theEntityName)
entity name if the object is mapped to more than one table
|
ByObject |
setIgnoreHooks(boolean theIgnoreHooks)
if we should ignore hooks
|
void |
update(Collection<?> collection)
call hibernate method "update" on a list of objects
HibernateSession.byObjectStatic().update(collection);
|
void |
update(Object object)
call hibernate "update" method on an object
|
public void delete(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 ignoreGrouperDAOException
public void delete(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 exceptionGrouperDAOException
public void save(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 ignoreGrouperDAOException
public Serializable save(Object object) throws GrouperDAOException
call hibernate method "save" on an object HibernateSession.byObjectStatic().save(dao);
object
- to saveGrouperDAOException
public void saveBatch(Collection<?> collection) throws GrouperDAOException
call hibernate method "save" on a collection of objects in batch
collection
- of objects to saveGrouperDAOException
public void saveOrUpdate(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 ignoreGrouperDAOException
public void saveOrUpdate(Object object) throws GrouperDAOException
call hibernate method "save" on an object HibernateSession.byObjectStatic().save(dao);
object
- to saveGrouperDAOException
public <T> T load(Class<T> theClass, Serializable id) throws GrouperDAOException
call hibernate method "load" on an object
T
- theClass
- to loadid
- to find in dbGrouperDAOException
public void update(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 ignoreGrouperDAOException
public void update(Object object) throws GrouperDAOException
object
- to updateGrouperDAOException
public ByObject setIgnoreHooks(boolean theIgnoreHooks)
ByQueryBase.setIgnoreHooks(boolean)
public ByObject setEntityName(String theEntityName)
theEntityName
- the entity name of the objectpublic boolean isIgnoreHooks()
protected void copyFieldsTo(edu.internet2.middleware.grouper.hibernate.ByQueryBase byQueryBase)
byQueryBase
- protected HibernateSession getHibernateSession()
protected edu.internet2.middleware.grouper.hibernate.ByQueryBase set(HibernateSession theHibernateSession2)
theHibernateSession2
- is the session to reusepublic static void main(String[] args)
args
- Copyright © 2016 Internet2. All rights reserved.