本文整理匯總了Java中org.hibernate.annotations.DynamicUpdate類的典型用法代碼示例。如果您正苦於以下問題:Java DynamicUpdate類的具體用法?Java DynamicUpdate怎麽用?Java DynamicUpdate使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
DynamicUpdate類屬於org.hibernate.annotations包,在下文中一共展示了DynamicUpdate類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: bindHibernateAnnotation
import org.hibernate.annotations.DynamicUpdate; //導入依賴的package包/類
@SuppressWarnings("SimplifiableConditionalExpression")
private void bindHibernateAnnotation(org.hibernate.annotations.Entity hibAnn) {
{
final DynamicInsert dynamicInsertAnn = annotatedClass.getAnnotation( DynamicInsert.class );
this.dynamicInsert = dynamicInsertAnn == null
? ( hibAnn == null ? false : hibAnn.dynamicInsert() )
: dynamicInsertAnn.value();
}
{
final DynamicUpdate dynamicUpdateAnn = annotatedClass.getAnnotation( DynamicUpdate.class );
this.dynamicUpdate = dynamicUpdateAnn == null
? ( hibAnn == null ? false : hibAnn.dynamicUpdate() )
: dynamicUpdateAnn.value();
}
{
final SelectBeforeUpdate selectBeforeUpdateAnn = annotatedClass.getAnnotation( SelectBeforeUpdate.class );
this.selectBeforeUpdate = selectBeforeUpdateAnn == null
? ( hibAnn == null ? false : hibAnn.selectBeforeUpdate() )
: selectBeforeUpdateAnn.value();
}
{
final OptimisticLocking optimisticLockingAnn = annotatedClass.getAnnotation( OptimisticLocking.class );
this.optimisticLockType = optimisticLockingAnn == null
? ( hibAnn == null ? OptimisticLockType.VERSION : hibAnn.optimisticLock() )
: optimisticLockingAnn.type();
}
{
final Polymorphism polymorphismAnn = annotatedClass.getAnnotation( Polymorphism.class );
this.polymorphismType = polymorphismAnn == null
? ( hibAnn == null ? PolymorphismType.IMPLICIT : hibAnn.polymorphism() )
: polymorphismAnn.type();
}
if ( hibAnn != null ) {
// used later in bind for logging
explicitHibernateEntityAnnotation = true;
//persister handled in bind
}
}