本文整理汇总了Java中org.hibernate.Interceptor.onSave方法的典型用法代码示例。如果您正苦于以下问题:Java Interceptor.onSave方法的具体用法?Java Interceptor.onSave怎么用?Java Interceptor.onSave使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hibernate.Interceptor
的用法示例。
在下文中一共展示了Interceptor.onSave方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onSave
import org.hibernate.Interceptor; //导入方法依赖的package包/类
@Override
public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) {
if (!isExists())
return false;
if (isTraceEnabled)
log.trace("인터셉터의 onSave 메소드를 멀티캐스트로 수행합니다.");
List<FutureTask<Boolean>> tasks = Lists.newLinkedList();
for (final Interceptor interceptor : interceptors) {
interceptor.onSave(entity, id, state, propertyNames, types);
}
return false;
}
示例2: onSave
import org.hibernate.Interceptor; //导入方法依赖的package包/类
@Override
public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException {
boolean modified = false;
for (Interceptor interceptor : chain) {
modified |= interceptor.onSave(entity, id, state, propertyNames, types);
}
return modified;
}
示例3: onSave
import org.hibernate.Interceptor; //导入方法依赖的package包/类
@Override
public boolean onSave(Object object, Serializable id, Object[] state, String[] propertyNames, Type[] types) {
boolean modified = false;
for(Interceptor i: interceptors){
modified = modified | i.onSave(object, id, state, propertyNames, types);
}
return modified;
}
示例4: onSave
import org.hibernate.Interceptor; //导入方法依赖的package包/类
@Override
public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException {
boolean modified = false;
for (Interceptor interceptor : interceptors) {
modified = interceptor.onSave(entity, id, state, propertyNames, types) || modified;
}
return modified;
}
示例5: onSave
import org.hibernate.Interceptor; //导入方法依赖的package包/类
public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types){
boolean bool = Boolean.FALSE;
if(null!=interceptors && !interceptors.isEmpty()){
Iterator it = interceptors.iterator();
while(it.hasNext()){
Interceptor interceptor = (Interceptor) it.next();
boolean temp = false;
if(interceptor!=null){
temp = interceptor.onSave(entity, id, state, propertyNames, types);
if(temp) bool = true;
}
}
}
return bool;
}
示例6: onSave
import org.hibernate.Interceptor; //导入方法依赖的package包/类
@Override
public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) {
if (exists()) {
for (Interceptor interceptor : interceptors) {
interceptor.onSave(entity, id, state, propertyNames, types);
}
}
return false;
}