|
Hibernate example source code file (CollectionInterceptor.java)
The Hibernate CollectionInterceptor.java source code//$Id: CollectionInterceptor.java 7700 2005-07-30 05:02:47Z oneovthafew $ package org.hibernate.test.interceptor; import java.io.Serializable; import org.hibernate.EmptyInterceptor; import org.hibernate.type.Type; public class CollectionInterceptor extends EmptyInterceptor { public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) { ( (User) entity ).getActions().add("updated"); return false; } public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) { ( (User) entity ).getActions().add("created"); return false; } } Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate CollectionInterceptor.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.