Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2011, Red Hat Inc. or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
* distributed under license by Red Hat Inc.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, as published by the Free Software Foundation.
*
* This program 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.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.event.spi;
import java.lang.reflect.Field;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import org.hibernate.HibernateException;
/**
* Enumeration of the recognized types of events, including meta-information about each.
*
* @author Steve Ebersole
*/
public class EventType {
public static final EventType LOAD
= new EventType( "load", LoadEventListener.class );
public static final EventType RESOLVE_NATURAL_ID
= new EventType( "resolve-natural-id", ResolveNaturalIdEventListener.class );
public static final EventType INIT_COLLECTION
= new EventType( "load-collection", InitializeCollectionEventListener.class );
public static final EventType SAVE_UPDATE
= new EventType( "save-update", SaveOrUpdateEventListener.class );
public static final EventType UPDATE
= new EventType( "update", SaveOrUpdateEventListener.class );
public static final EventType SAVE
= new EventType( "save", SaveOrUpdateEventListener.class );
public static final EventType PERSIST
= new EventType( "create", PersistEventListener.class );
public static final EventType PERSIST_ONFLUSH
= new EventType( "create-onflush", PersistEventListener.class );
public static final EventType MERGE
= new EventType( "merge", MergeEventListener.class );
public static final EventType DELETE
= new EventType( "delete", DeleteEventListener.class );
public static final EventType REPLICATE
= new EventType( "replicate", ReplicateEventListener.class );
public static final EventType FLUSH
= new EventType( "flush", FlushEventListener.class );
public static final EventType AUTO_FLUSH
= new EventType( "auto-flush", AutoFlushEventListener.class );
public static final EventType DIRTY_CHECK
= new EventType( "dirty-check", DirtyCheckEventListener.class );
public static final EventType FLUSH_ENTITY
= new EventType( "flush-entity", FlushEntityEventListener.class );
public static final EventType EVICT
= new EventType( "evict", EvictEventListener.class );
public static final EventType LOCK
= new EventType( "lock", LockEventListener.class );
public static final EventType REFRESH
= new EventType( "refresh", RefreshEventListener.class );
public static final EventType PRE_LOAD
= new EventType( "pre-load", PreLoadEventListener.class );
public static final EventType PRE_DELETE
= new EventType( "pre-delete", PreDeleteEventListener.class );
public static final EventType PRE_UPDATE
= new EventType( "pre-update", PreUpdateEventListener.class );
public static final EventType PRE_INSERT
= new EventType( "pre-insert", PreInsertEventListener.class );
public static final EventType POST_LOAD
= new EventType( "post-load", PostLoadEventListener.class );
public static final EventType POST_DELETE
= new EventType( "post-delete", PostDeleteEventListener.class );
public static final EventType POST_UPDATE
= new EventType( "post-update", PostUpdateEventListener.class );
public static final EventType POST_INSERT
= new EventType( "post-insert", PostInsertEventListener.class );
public static final EventType POST_COMMIT_DELETE
= new EventType( "post-commit-delete", PostDeleteEventListener.class );
public static final EventType POST_COMMIT_UPDATE
= new EventType( "post-commit-update", PostUpdateEventListener.class );
public static final EventType POST_COMMIT_INSERT
= new EventType( "post-commit-insert", PostInsertEventListener.class );
public static final EventType PRE_COLLECTION_RECREATE
= new EventType( "pre-collection-recreate", PreCollectionRecreateEventListener.class );
public static final EventType PRE_COLLECTION_REMOVE
= new EventType( "pre-collection-remove", PreCollectionRemoveEventListener.class );
public static final EventType PRE_COLLECTION_UPDATE
= new EventType( "pre-collection-update", PreCollectionUpdateEventListener.class );
public static final EventType POST_COLLECTION_RECREATE
= new EventType( "post-collection-recreate", PostCollectionRecreateEventListener.class );
public static final EventType POST_COLLECTION_REMOVE
= new EventType( "post-collection-remove", PostCollectionRemoveEventListener.class );
public static final EventType POST_COLLECTION_UPDATE
= new EventType( "post-collection-update", PostCollectionUpdateEventListener.class );
/**
* Maintain a map of {@link EventType} instances keyed by name for lookup by name as well as {@link #values()}
* resolution.
*/
public static final Map eventTypeByNameMap = AccessController.doPrivileged(
new PrivilegedAction