gr.interamerican.bo2.samples.hibernate.MockInterceptor.java Source code

Java tutorial

Introduction

Here is the source code for gr.interamerican.bo2.samples.hibernate.MockInterceptor.java

Source

/*******************************************************************************
 * Copyright (c) 2013 INTERAMERICAN PROPERTY AND CASUALTY INSURANCE COMPANY S.A.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Lesser Public License v3
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/copyleft/lesser.html
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Lesser General Public License for more details.
 ******************************************************************************/
package gr.interamerican.bo2.samples.hibernate;

import java.io.Serializable;
import java.util.Iterator;

import org.hibernate.CallbackException;
import org.hibernate.EntityMode;
import org.hibernate.Interceptor;
import org.hibernate.Transaction;
import org.hibernate.type.Type;

/**
 * 
 */
public class MockInterceptor implements Interceptor {

    @Override
    public boolean onLoad(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types)
            throws CallbackException {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState,
            String[] propertyNames, Type[] types) throws CallbackException {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types)
            throws CallbackException {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public void onDelete(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types)
            throws CallbackException {
        // TODO Auto-generated method stub

    }

    @Override
    public void onCollectionRecreate(Object collection, Serializable key) throws CallbackException {
        // TODO Auto-generated method stub

    }

    @Override
    public void onCollectionRemove(Object collection, Serializable key) throws CallbackException {
        // TODO Auto-generated method stub

    }

    @Override
    public void onCollectionUpdate(Object collection, Serializable key) throws CallbackException {
        // TODO Auto-generated method stub

    }

    @SuppressWarnings("rawtypes")
    @Override
    public void preFlush(Iterator entities) throws CallbackException {
        // TODO Auto-generated method stub

    }

    @SuppressWarnings("rawtypes")
    @Override
    public void postFlush(Iterator entities) throws CallbackException {
        // TODO Auto-generated method stub

    }

    @Override
    public Boolean isTransient(Object entity) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public int[] findDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState,
            String[] propertyNames, Type[] types) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public Object instantiate(String entityName, EntityMode entityMode, Serializable id) throws CallbackException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String getEntityName(Object object) throws CallbackException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public Object getEntity(String entityName, Serializable id) throws CallbackException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public void afterTransactionBegin(Transaction tx) {
        // TODO Auto-generated method stub

    }

    @Override
    public void beforeTransactionCompletion(Transaction tx) {
        // TODO Auto-generated method stub

    }

    @Override
    public void afterTransactionCompletion(Transaction tx) {
        // TODO Auto-generated method stub

    }

    @Override
    public String onPrepareStatement(String sql) {
        // TODO Auto-generated method stub
        return null;
    }

}