本文整理汇总了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;
}