当前位置: 首页>>代码示例>>Java>>正文


Java CallbackException类代码示例

本文整理汇总了Java中org.hibernate.CallbackException的典型用法代码示例。如果您正苦于以下问题:Java CallbackException类的具体用法?Java CallbackException怎么用?Java CallbackException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CallbackException类属于org.hibernate包,在下文中一共展示了CallbackException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onFlushDirty

import org.hibernate.CallbackException; //导入依赖的package包/类
public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previuosState,String[] propertyNames, Type[] types) throws CallbackException {
	
	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.onFlushDirty(entity, id, currentState, previuosState, propertyNames, types);
				if(temp) bool = true;
			}
			}
	}
	return bool;
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:17,代码来源:GenericSecurityInterceptor.java

示例2: onLoad

import org.hibernate.CallbackException; //导入依赖的package包/类
@Override
public boolean onLoad(Object entity, Serializable id, Object[] state, String[] propertyNames,
		Type[] types) throws CallbackException {
	boolean changed = false;
	for (PersistListener listener: listeners) {
		if (listener.onLoad(entity, id, state, propertyNames, types))
			changed = true;
	}
		
	return changed;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:12,代码来源:HibernateInterceptor.java

示例3: onFlushDirty

import org.hibernate.CallbackException; //导入依赖的package包/类
@Override
public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState,
		Object[] previousState, String[] propertyNames, Type[] types) throws CallbackException {
	boolean changed = false;
	for (PersistListener listener: listeners) {
		if (listener.onFlushDirty(entity, id, currentState, previousState, propertyNames, types))
			changed = true;
	}
		
	return changed;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:12,代码来源:HibernateInterceptor.java

示例4: onSave

import org.hibernate.CallbackException; //导入依赖的package包/类
@Override
public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames,
		Type[] types) throws CallbackException {
	boolean changed = false;
	for (PersistListener listener: listeners) {
		if (listener.onSave(entity, id, state, propertyNames, types))
			changed = true;
	}
	
	return changed;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:12,代码来源:HibernateInterceptor.java

示例5: onFlushDirty

import org.hibernate.CallbackException; //导入依赖的package包/类
@Override
public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState,
        String[] propertyNames, Type[] types) throws CallbackException {
    boolean modified = false;
    for (Interceptor interceptor : chain) {
        modified |= interceptor.onFlushDirty(entity, id, currentState, previousState, propertyNames, types);
    }
    return modified;
}
 
开发者ID:jonestimd,项目名称:finances,代码行数:10,代码来源:InterceptorChain.java

示例6: onSave

import org.hibernate.CallbackException; //导入依赖的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;
}
 
开发者ID:jonestimd,项目名称:finances,代码行数:9,代码来源:InterceptorChain.java

示例7: onLoad

import org.hibernate.CallbackException; //导入依赖的package包/类
public boolean onLoad (
		Object entity,
		Serializable id,
		Object[] state,
		String[] propertyNames,
		Type[] types) throws CallbackException {
	return false;
}
 
开发者ID:GovernIB,项目名称:helium,代码行数:9,代码来源:AuditLogInterceptor.java

示例8: onFlushDirty

import org.hibernate.CallbackException; //导入依赖的package包/类
public boolean onFlushDirty(Object entity, Serializable id, Object[] newValues, Object[] oldValues, String[] propertyNames, Type[] types) throws CallbackException {
	if (entity instanceof Auditable) {
		getActionLogger().createLog(
				"update",
				entity,
				propertyNames,
				getUserId());
	}
	return false;
}
 
开发者ID:GovernIB,项目名称:helium,代码行数:11,代码来源:AuditLogInterceptor.java

示例9: onSave

import org.hibernate.CallbackException; //导入依赖的package包/类
public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException {
	if (entity instanceof Auditable) {
		getActionLogger().createLog(
				"create",
				entity,
				propertyNames,
				getUserId());
	}
	return false;
}
 
开发者ID:GovernIB,项目名称:helium,代码行数:11,代码来源:AuditLogInterceptor.java

示例10: onDelete

import org.hibernate.CallbackException; //导入依赖的package包/类
public void onDelete(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException {
	if (entity instanceof Auditable) {
		getActionLogger().createLog(
				"delete",
				entity,
				propertyNames,
				getUserId());
	}
}
 
开发者ID:GovernIB,项目名称:helium,代码行数:10,代码来源:AuditLogInterceptor.java

示例11: onFlushDirty

import org.hibernate.CallbackException; //导入依赖的package包/类
public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState,
        Object[] previousState, String[] propertyNames, Type[] types) throws CallbackException {
    if (entity.getClass().isAnnotationPresent(Audit.class)) {
        updates.add(entity);
    }
    return false;
}
 
开发者ID:nipunthathsara,项目名称:Audit4j-Hibernate,代码行数:8,代码来源:AuditInterceptor.java

示例12: onFlushDirty

import org.hibernate.CallbackException; //导入依赖的package包/类
@Override
public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) throws CallbackException {
    log.info( "Entity {0}#{1} changed from {2} to {3}",
            entity.getClass().getSimpleName(),
            id,
            Arrays.toString( previousState ),
            Arrays.toString( currentState )
    );
    return super.onFlushDirty(entity,id,currentState,previousState,propertyNames,types);
}
 
开发者ID:przodownikR1,项目名称:springJpaKata,代码行数:11,代码来源:LoggingInterceptor.java

示例13: onDelete

import org.hibernate.CallbackException; //导入依赖的package包/类
public boolean onDelete(Session s) throws CallbackException {
	if (friends==null) return false;
	try {
		Iterator iter = friends.iterator();
		while ( iter.hasNext() ) {
			s.delete( iter.next() );
		}
	}
	catch (Exception e) {
		throw new CallbackException(e);
	}
	return false;
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:14,代码来源:Fum.java

示例14: onSave

import org.hibernate.CallbackException; //导入依赖的package包/类
public boolean onSave(Session s) throws CallbackException {
	if (friends==null) return false;
	try {
		Iterator iter = friends.iterator();
		while ( iter.hasNext() ) {
			s.save( iter.next() );
		}
	}
	catch (Exception e) {
		throw new CallbackException(e);
	}
	return false;
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:14,代码来源:Fum.java

示例15: onSave

import org.hibernate.CallbackException; //导入依赖的package包/类
public boolean onSave(Session session) throws CallbackException {
	created=true;
	try {
		foo = new Foo();
		session.save(foo);
	}
	catch (Exception e) {
		throw new CallbackException(e);
	}
	foo.setString("child of a qux");
	return NO_VETO;
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:13,代码来源:Qux.java


注:本文中的org.hibernate.CallbackException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。