001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.test.hibernate;
023:
024: import org.hibernate.Interceptor;
025: import org.hibernate.CallbackException;
026: import org.hibernate.EntityMode;
027: import org.hibernate.Transaction;
028: import org.hibernate.type.Type;
029:
030: import java.io.Serializable;
031: import java.util.Iterator;
032:
033: /**
034: * Implementation of SimpleInterceptor.
035: *
036: * @author Steve Ebersole
037: */
038: public class SimpleInterceptor implements Interceptor {
039: public boolean onLoad(Object o, Serializable serializable,
040: Object[] objects, String[] strings, Type[] types)
041: throws CallbackException {
042: return false;
043: }
044:
045: public boolean onFlushDirty(Object o, Serializable serializable,
046: Object[] objects, Object[] objects1, String[] strings,
047: Type[] types) throws CallbackException {
048: return false;
049: }
050:
051: public boolean onSave(Object o, Serializable serializable,
052: Object[] objects, String[] strings, Type[] types)
053: throws CallbackException {
054: return false;
055: }
056:
057: public void onDelete(Object o, Serializable serializable,
058: Object[] objects, String[] strings, Type[] types)
059: throws CallbackException {
060: }
061:
062: public void onCollectionRecreate(Object object,
063: Serializable serializable) throws CallbackException {
064: }
065:
066: public void onCollectionRemove(Object object,
067: Serializable serializable) throws CallbackException {
068: }
069:
070: public void onCollectionUpdate(Object object,
071: Serializable serializable) throws CallbackException {
072: }
073:
074: public void preFlush(Iterator iterator) throws CallbackException {
075: }
076:
077: public void postFlush(Iterator iterator) throws CallbackException {
078: }
079:
080: public Boolean isTransient(Object o) {
081: return null;
082: }
083:
084: public int[] findDirty(Object o, Serializable serializable,
085: Object[] objects, Object[] objects1, String[] strings,
086: Type[] types) {
087: return null;
088: }
089:
090: public Object instantiate(String name, EntityMode entityMode,
091: Serializable serializable) throws CallbackException {
092: return null;
093: }
094:
095: public String getEntityName(Object o) throws CallbackException {
096: return null;
097: }
098:
099: public Object getEntity(String name, Serializable serializable)
100: throws CallbackException {
101: return null;
102: }
103:
104: public void afterTransactionBegin(Transaction transaction) {
105: }
106:
107: public void beforeTransactionCompletion(Transaction transaction) {
108: }
109:
110: public void afterTransactionCompletion(Transaction transaction) {
111: }
112:
113: public String onPrepareStatement(String string) {
114: return string;
115: }
116: }
|