本文整理匯總了Java中org.hibernate.persister.entity.EntityPersister.implementsLifecycle方法的典型用法代碼示例。如果您正苦於以下問題:Java EntityPersister.implementsLifecycle方法的具體用法?Java EntityPersister.implementsLifecycle怎麽用?Java EntityPersister.implementsLifecycle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.hibernate.persister.entity.EntityPersister
的用法示例。
在下文中一共展示了EntityPersister.implementsLifecycle方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: invokeDeleteLifecycle
import org.hibernate.persister.entity.EntityPersister; //導入方法依賴的package包/類
protected boolean invokeDeleteLifecycle(EventSource session, Object entity, EntityPersister persister) {
if ( persister.implementsLifecycle() ) {
LOG.debug( "Calling onDelete()" );
if ( ( (Lifecycle) entity ).onDelete( session ) ) {
LOG.debug( "Deletion vetoed by onDelete()" );
return true;
}
}
return false;
}
示例2: invokeUpdateLifecycle
import org.hibernate.persister.entity.EntityPersister; //導入方法依賴的package包/類
protected boolean invokeUpdateLifecycle(Object entity, EntityPersister persister, EventSource source) {
if ( persister.implementsLifecycle() ) {
LOG.debug( "Calling onUpdate()" );
if ( ( (Lifecycle) entity ).onUpdate( source ) ) {
LOG.debug( "Update vetoed by onUpdate()" );
return true;
}
}
return false;
}
示例3: invokeSaveLifecycle
import org.hibernate.persister.entity.EntityPersister; //導入方法依賴的package包/類
protected boolean invokeSaveLifecycle(Object entity, EntityPersister persister, EventSource source) {
// Sub-insertions should occur before containing insertion so
// Try to do the callback now
if ( persister.implementsLifecycle() ) {
LOG.debug( "Calling onSave()" );
if ( ((Lifecycle) entity).onSave( source ) ) {
LOG.debug( "Insertion vetoed by onSave()" );
return true;
}
}
return false;
}