to.etc.domui.hibernate.model
Class HibernateModelCopier
java.lang.Object
to.etc.domui.util.db.QBasicModelCopier
to.etc.domui.hibernate.model.HibernateModelCopier
- All Implemented Interfaces:
- IModelCopier
public class HibernateModelCopier
- extends QBasicModelCopier
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HibernateModelCopier
public HibernateModelCopier()
isUnloadedChildList
protected <T> boolean isUnloadedChildList(T source,
PropertyMetaModel<?> pmm)
throws java.lang.Exception
- Specified by:
isUnloadedChildList
in class QBasicModelCopier
- Throws:
java.lang.Exception
isUnloadedParent
protected <T> boolean isUnloadedParent(T source,
PropertyMetaModel<?> pmm)
throws java.lang.Exception
- Specified by:
isUnloadedParent
in class QBasicModelCopier
- Throws:
java.lang.Exception
isPersistedEntry
protected boolean isPersistedEntry(QDataContext dc,
java.lang.Object instance)
throws java.lang.Exception
- Throws:
java.lang.Exception
save
protected void save(QBasicModelCopier.CopyInfo ci,
java.lang.Object instance)
throws java.lang.Exception
- Sigh. Overridden to force Hibernate to bloody use an existing primary key on NEW object, damnit. See Here.
- Overrides:
save
in class QBasicModelCopier
- Throws:
java.lang.Exception
- See Also:
QBasicModelCopier.save(to.etc.domui.util.db.QBasicModelCopier.CopyInfo, java.lang.Object)
getObjectState
protected QPersistentObjectState getObjectState(QDataContext dc,
java.lang.Object instance)
throws java.lang.Exception
- Determine the object state using internal Hibernate data structures. Code was mostly stolen from
DefaultFlushEntityEventListener#dirtyCheck()
- Specified by:
getObjectState
in class QBasicModelCopier
- Parameters:
dc
- instance
-
- Returns:
-
- Throws:
java.lang.Exception
getObjectState
protected QPersistentObjectState getObjectState(QDataContext dc,
java.lang.Class<?> pclass,
java.lang.Object pk)
throws java.lang.Exception
- Specified by:
getObjectState
in class QBasicModelCopier
- Throws:
java.lang.Exception