Changes from requests at Hibernate meeting: message codes, use XXXf methods for debug and trace, use @Cause

This commit is contained in:
JPAV 2011-02-08 13:55:27 -06:00
parent c26763c2e9
commit 8c806d361d
4820 changed files with 6436 additions and 14368 deletions

View File

@ -62,7 +62,7 @@ libraries = [
// logging
logging: 'org.jboss.logging:jboss-logging:3.0.0.Beta4',
// logging_tools: 'org.jboss.logging:jboss-logging-tools:1.0.0.Beta2',
logging_tools: 'org.jboss.logging:jboss-logging-tools:1.0.0.Beta3',
slf4j_api: 'org.slf4j:slf4j-api:' + slf4jVersion,
slf4j_simple: 'org.slf4j:slf4j-simple:' + slf4jVersion,
jcl_slf4j: 'org.slf4j:jcl-over-slf4j:' + slf4jVersion,
@ -107,7 +107,7 @@ subprojects { subProject ->
// appropriately inject the common dependencies into each sub-project
dependencies {
compile(libraries.logging)
// compile(libraries.logging)
// compile(libraries.logging_tools)
compile( libraries.slf4j_api )
testCompile( libraries.junit )

View File

@ -22,7 +22,6 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate.service.jdbc.connections.internal;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Iterator;
@ -33,6 +32,7 @@ import org.hibernate.cfg.Environment;
import org.hibernate.internal.util.config.ConfigurationHelper;
import org.hibernate.service.jdbc.connections.spi.ConnectionProvider;
import org.hibernate.util.ReflectHelper;
import org.jboss.logging.Logger;
import com.mchange.v2.c3p0.DataSources;
/**
@ -44,7 +44,7 @@ import com.mchange.v2.c3p0.DataSources;
*/
public class C3P0ConnectionProvider implements ConnectionProvider {
private static final C3P0Logger LOG = org.jboss.logging.Logger.getMessageLogger(C3P0Logger.class, C3P0Logger.class.getPackage().getName());
private static final C3P0Logger LOG = Logger.getMessageLogger(C3P0Logger.class, C3P0ConnectionProvider.class.getName());
//swaldman 2006-08-28: define c3p0-style configuration parameters for properties with
// hibernate-specific overrides to detect and warn about conflicting
@ -196,7 +196,7 @@ public class C3P0ConnectionProvider implements ConnectionProvider {
DataSources.destroy( ds );
}
catch ( SQLException sqle ) {
LOG.warn(LOG.unableToDestroyC3p0ConnectionPool(), sqle);
LOG.unableToDestroyC3p0ConnectionPool(sqle);
}
}

View File

@ -9,53 +9,55 @@ package org.hibernate.service.jdbc.connections.internal;
import static org.jboss.logging.Logger.Level.INFO;
import static org.jboss.logging.Logger.Level.WARN;
import java.sql.SQLException;
import java.util.Properties;
import org.jboss.logging.BasicLogger;
import org.hibernate.HibernateLogger;
import org.jboss.logging.Cause;
import org.jboss.logging.LogMessage;
import org.jboss.logging.Message;
import org.jboss.logging.MessageLogger;
/**
* Interface defining messages that may be logged by the outer class
* Defines internationalized messages for this hibernate-c3p0, with IDs ranging from 10001 to 15000 inclusively. New messages must
* be added after the last message defined to ensure message codes are unique.
*/
@MessageLogger
public interface C3P0Logger extends BasicLogger {
public interface C3P0Logger extends HibernateLogger {
@LogMessage( level = INFO )
@Message( value = "Autocommit mode: %s" )
@Message( value = "Autocommit mode: %s", id = 10001 )
void autoCommitMode( boolean autocommit );
@LogMessage( level = WARN )
@Message( value = "Both hibernate-style property '%s' and c3p0-style property '%s' have been set in hibernate.properties. "
+ "Hibernate-style property '%s' will be used and c3p0-style property '%s' will be ignored!" )
+ "Hibernate-style property '%s' will be used and c3p0-style property '%s' will be ignored!", id = 10002 )
void bothHibernateAndC3p0StylesSet( String hibernateStyle,
String c3p0Style,
String hibernateStyle2,
String c3p0Style2 );
@LogMessage( level = INFO )
@Message( value = "C3P0 using driver: %s at URL: %s" )
@Message( value = "C3P0 using driver: %s at URL: %s", id = 10003 )
void c3p0UsingDriver( String jdbcDriverClass,
String jdbcUrl );
@LogMessage( level = INFO )
@Message( value = "Connection properties: %s" )
@Message( value = "Connection properties: %s", id = 10004 )
void connectionProperties( Properties maskOut );
@Message( value = "JDBC Driver class not found: %s" )
@Message( value = "JDBC Driver class not found: %s", id = 10005 )
String jdbcDriverNotFound( String jdbcDriverClass );
@LogMessage( level = WARN )
@Message( value = "No JDBC Driver class was specified by property %s" )
@Message( value = "No JDBC Driver class was specified by property %s", id = 10006 )
void jdbcDriverNotSpecified( String driver );
@LogMessage( level = INFO )
@Message( value = "JDBC isolation level: %s" )
@Message( value = "JDBC isolation level: %s", id = 10007 )
void jdbcIsolationLevel( String isolationLevelToString );
@Message( value = "Could not destroy C3P0 connection pool" )
Object unableToDestroyC3p0ConnectionPool();
@LogMessage( level = WARN )
@Message( value = "Could not destroy C3P0 connection pool", id = 10008 )
void unableToDestroyC3p0ConnectionPool( @Cause SQLException e );
@Message( value = "Could not instantiate C3P0 connection pool" )
@Message( value = "Could not instantiate C3P0 connection pool", id = 10009 )
String unableToInstantiateC3p0ConnectionPool();
}

View File

@ -4,7 +4,8 @@ apply plugin: 'antlr'
// todo : we need to jar up hibernate-testing.jar from here
dependencies {
compile( libraries.commons_collections )
compile fileTree(dir: 'lib', includes: ['*.jar'])
compile( libraries.commons_collections )
compile( libraries.jta )
compile( libraries.dom4j ) {
transitive = false

View File

@ -3,8 +3,8 @@ header
// $Id: hql-sql.g 10001 2006-06-08 21:08:04Z steve.ebersole@jboss.com $
package org.hibernate.hql.antlr;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.hibernate.HibernateLogger;
import org.jboss.logging.Logger;
}
/**
@ -56,7 +56,7 @@ tokens
// -- Declarations --
{
private static Logger log = LoggerFactory.getLogger( HqlSqlBaseWalker.class );
private static final HibernateLogger LOG = Logger.getMessageLogger(HibernateLogger.class, HqlSqlBaseWalker.class.getName());
private int level = 0;
private boolean inSelect = false;
@ -129,21 +129,15 @@ tokens
this.statementType = statementType;
}
currentStatementType = statementType;
if ( log.isDebugEnabled() ) {
log.debug( statementName + " << begin [level=" + level + ", statement=" + this.statementTypeName + "]" );
}
LOG.debugf("%s << begin [level=%s, statement=%s]", statementName, level, this.statementTypeName);
}
private void beforeStatementCompletion(String statementName) {
if ( log.isDebugEnabled() ) {
log.debug( statementName + " : finishing up [level=" + level + ", statement=" + statementTypeName + "]" );
}
LOG.debugf("%s : finishing up [level=%s, statement=%s]", statementName, level, this.statementTypeName);
}
private void afterStatementCompletion(String statementName) {
if ( log.isDebugEnabled() ) {
log.debug( statementName + " >> end [level=" + level + ", statement=" + statementTypeName + "]" );
}
LOG.debugf("%s >> end [level=%s, statement=%s]", statementName, level, this.statementTypeName);
level--;
}

View File

@ -3,9 +3,6 @@ header
// $Id: sql-gen.g 10001 2006-06-08 21:08:04Z steve.ebersole@jboss.com $
package org.hibernate.hql.antlr;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
}
/**
* SQL Generator Tree Parser, providing SQL rendering of SQL ASTs produced by the previous phase, HqlSqlWalker. All
@ -28,7 +25,6 @@ options {
}
{
private static Logger log = LoggerFactory.getLogger(SqlGeneratorBase.class);
/** the buffer resulting SQL statement is written to */
private StringBuffer buf = new StringBuffer();

View File

@ -23,6 +23,7 @@
*/
package org.hibernate;
/**
* Annotation related exception.
* The EJB3 EG will probably set a generic exception.

View File

@ -23,6 +23,7 @@
*
*/
package org.hibernate;
import org.jboss.logging.Logger;
/**
* Indicates failure of an assertion: a possible bug in Hibernate.
@ -33,7 +34,7 @@ public class AssertionFailure extends RuntimeException {
private static final long serialVersionUID = 1L;
private static final Logger LOG = org.jboss.logging.Logger.getMessageLogger(Logger.class, AssertionFailure.class.getName());
private static final HibernateLogger LOG = Logger.getMessageLogger(HibernateLogger.class, AssertionFailure.class.getName());
public AssertionFailure( String s ) {
super(s);

View File

@ -20,7 +20,6 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate;
import java.io.Serializable;
/**

View File

@ -23,7 +23,6 @@
*
*/
package org.hibernate;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

View File

@ -24,6 +24,7 @@
*/
package org.hibernate;
/**
* Should be thrown by persistent objects from <tt>Lifecycle</tt>
* or <tt>Interceptor</tt> callbacks.

View File

@ -23,7 +23,6 @@
*
*/
package org.hibernate;
import java.io.Serializable;
/**

View File

@ -23,9 +23,7 @@
*
*/
package org.hibernate;
import java.util.List;
import org.hibernate.criterion.CriteriaSpecification;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Order;

View File

@ -24,6 +24,7 @@
*/
package org.hibernate;
/**
* Raised whenever a duplicate for a certain type occurs.
* Duplicate class, table, property name etc.

View File

@ -23,10 +23,8 @@
*
*/
package org.hibernate;
import java.io.Serializable;
import java.util.Iterator;
import org.hibernate.type.Type;
/**

View File

@ -23,10 +23,9 @@
*
*/
package org.hibernate;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
/**
* Defines the representation modes available for entities.

View File

@ -24,6 +24,7 @@
*/
package org.hibernate;
/**
* Contract for resolving an entity-name from a given entity instance.
*

View File

@ -23,7 +23,6 @@
*
*/
package org.hibernate;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

View File

@ -23,10 +23,8 @@
*
*/
package org.hibernate;
import org.hibernate.engine.FilterDefinition;
import java.util.Collection;
import org.hibernate.engine.FilterDefinition;
/**
* Type definition of Filter. Filter defines the user's view into enabled dynamic filters,

View File

@ -23,7 +23,6 @@
*
*/
package org.hibernate;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

View File

@ -22,10 +22,8 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate;
import java.util.Iterator;
import java.util.Properties;
import org.hibernate.collection.PersistentCollection;
import org.hibernate.engine.HibernateIterator;
import org.hibernate.engine.SessionFactoryImplementor;

View File

@ -24,6 +24,7 @@
*/
package org.hibernate;
/**
* The base {@link Throwable} type for Hibernate.
* <p/>

View File

@ -24,6 +24,7 @@
*/
package org.hibernate;
/**
* Thrown if Hibernate can't instantiate an entity or component
* class at runtime.

View File

@ -23,10 +23,8 @@
*
*/
package org.hibernate;
import java.io.Serializable;
import java.util.Iterator;
import org.hibernate.type.Type;
/**

View File

@ -22,7 +22,8 @@
* Boston, MA 02110-1301 USA
*
*/
package org.hibernate;
package org.hibernate;
/**
* Thrown when a mapping is found to be invalid.

View File

@ -23,7 +23,6 @@
*
*/
package org.hibernate;
import java.sql.SQLException;

View File

@ -23,12 +23,11 @@
*
*/
package org.hibernate;
import org.slf4j.LoggerFactory;
import org.jboss.logging.Logger;
/**
* Indicates access to unfetched data outside of a session context.
* For example, when an uninitialized proxy or collection is accessed
* For example, when an uninitialized proxy or collection is accessed
* after the session was closed.
*
* @see Hibernate#initialize(java.lang.Object)
@ -37,9 +36,12 @@ import org.slf4j.LoggerFactory;
*/
public class LazyInitializationException extends HibernateException {
private static final HibernateLogger LOG = Logger.getMessageLogger(HibernateLogger.class,
LazyInitializationException.class.getName());
public LazyInitializationException(String msg) {
super(msg);
LoggerFactory.getLogger( LazyInitializationException.class ).error( msg, this );
LOG.error(msg, this);
}
}

View File

@ -22,7 +22,6 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate;
import java.io.InputStream;
import java.io.Reader;
import java.sql.Blob;

View File

@ -23,7 +23,6 @@
*
*/
package org.hibernate;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

View File

@ -23,11 +23,10 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import java.util.Iterator;
import java.util.Map;
/**

File diff suppressed because it is too large Load Diff

View File

@ -24,6 +24,7 @@
*/
package org.hibernate;
/**
* An exception that usually occurs at configuration time, rather
* than runtime, as a result of something screwy in the O-R mappings.

View File

@ -22,7 +22,8 @@
* Boston, MA 02110-1301 USA
*
*/
package org.hibernate;
package org.hibernate;
/**
* Thrown when a resource for a mapping could not be found.

View File

@ -23,9 +23,7 @@
*
*/
package org.hibernate;
import java.io.Serializable;
import org.hibernate.pretty.MessageHelper;
/**

View File

@ -24,6 +24,7 @@
*/
package org.hibernate;
/**
* Thrown when the application calls <tt>Query.uniqueResult()</tt> and
* the query returned more than one result. Unlike all other Hibernate

View File

@ -23,7 +23,6 @@
*
*/
package org.hibernate;
import java.io.Serializable;
/**

View File

@ -23,7 +23,6 @@
*
*/
package org.hibernate;
import java.io.Serializable;
/**

View File

@ -24,6 +24,7 @@
*/
package org.hibernate;
/**
*
* Throw when an optimistic locking conflict occurs.

View File

@ -24,6 +24,7 @@
*/
package org.hibernate;
/**
* Thrown when the user passes a persistent instance to a <tt>Session</tt>
* method that expects a transient instance.

View File

@ -23,7 +23,6 @@
*
*/
package org.hibernate;
import java.sql.SQLException;
/**

View File

@ -23,7 +23,6 @@
*
*/
package org.hibernate;
import org.hibernate.util.StringHelper;
/**

View File

@ -24,6 +24,7 @@
*/
package org.hibernate;
/**
* Indicates that an expected getter or setter method could not be
* found on a class.

View File

@ -23,7 +23,6 @@
*
*/
package org.hibernate;
import org.hibernate.util.StringHelper;
/**

View File

@ -23,7 +23,6 @@
*
*/
package org.hibernate;
import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
@ -34,7 +33,6 @@ import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import org.hibernate.transform.ResultTransformer;
import org.hibernate.type.Type;

View File

@ -24,6 +24,7 @@
*/
package org.hibernate;
/**
* A problem occurred translating a Hibernate query to SQL
* due to invalid query syntax, etc.

View File

@ -22,7 +22,8 @@
* Boston, MA 02110-1301 USA
*
*/
package org.hibernate;
package org.hibernate;
/**
* Parameter invalid or not found in the query

View File

@ -23,7 +23,6 @@
*
*/
package org.hibernate;
import java.sql.SQLException;
/**

View File

@ -23,11 +23,9 @@
*
*/
package org.hibernate;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import org.hibernate.type.VersionType;
/**

View File

@ -22,7 +22,6 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate;
import org.hibernate.type.Type;
/**

View File

@ -22,7 +22,6 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate;
import org.hibernate.engine.query.sql.NativeSQLQueryReturn;
import org.hibernate.type.Type;

View File

@ -23,7 +23,6 @@
*
*/
package org.hibernate;
import java.io.Serializable;
import java.sql.ResultSet;
import java.util.HashMap;

View File

@ -23,7 +23,6 @@
*
*/
package org.hibernate;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Blob;
@ -32,7 +31,6 @@ import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;
import org.hibernate.type.Type;
/**

View File

@ -23,10 +23,8 @@
*
*/
package org.hibernate;
import java.io.Serializable;
import java.sql.Connection;
import org.hibernate.jdbc.Work;
import org.hibernate.stat.SessionStatistics;

View File

@ -24,6 +24,7 @@
*/
package org.hibernate;
/**
* Thrown when the user calls a method of a {@link Session} that is in an
* inappropropriate state for the given call (for example, the the session

View File

@ -23,18 +23,15 @@
*
*/
package org.hibernate;
import java.io.Serializable;
import java.sql.Connection;
import java.util.Map;
import java.util.Set;
import javax.naming.Referenceable;
import org.hibernate.engine.FilterDefinition;
import org.hibernate.metadata.ClassMetadata;
import org.hibernate.metadata.CollectionMetadata;
import org.hibernate.stat.Statistics;
import org.hibernate.engine.FilterDefinition;
/**
* The main contract here is the creation of {@link Session} instances. Usually

View File

@ -23,7 +23,6 @@
*
*/
package org.hibernate;
import java.io.Serializable;
/**

View File

@ -23,9 +23,7 @@
*
*/
package org.hibernate;
import java.io.Serializable;
import org.hibernate.pretty.MessageHelper;
/**

View File

@ -24,6 +24,7 @@
*/
package org.hibernate;
/**
* Thrown when a version number or timestamp check failed, indicating that the
* <tt>Session</tt> contained stale data (when using long transactions

View File

@ -23,7 +23,6 @@
*
*/
package org.hibernate;
import java.io.Serializable;
import java.sql.Connection;

View File

@ -23,7 +23,6 @@
*
*/
package org.hibernate;
import javax.transaction.Synchronization;
/**

View File

@ -24,6 +24,7 @@
*/
package org.hibernate;
/**
* Indicates that a transaction could not be begun, committed
* or rolled back.

View File

@ -24,6 +24,7 @@
*/
package org.hibernate;
/**
* Thrown when the user passes a transient instance to a <tt>Session</tt>
* method that expects a persistent instance.

View File

@ -22,9 +22,7 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate;
import java.util.Properties;
import org.hibernate.type.BasicType;
import org.hibernate.type.Type;

View File

@ -22,7 +22,8 @@
* Boston, MA 02110-1301 USA
*
*/
package org.hibernate;
package org.hibernate;
/**
* Used when a user provided type does not match the expected one

View File

@ -24,6 +24,7 @@
*/
package org.hibernate;
/**
* Used to indicate a request against an unknown profile name.
*

View File

@ -23,9 +23,7 @@
*
*/
package org.hibernate;
import java.io.Serializable;
import org.hibernate.pretty.MessageHelper;
/**

View File

@ -23,6 +23,7 @@
*/
package org.hibernate;
/**
* Information about the Hibernate version.
*

View File

@ -23,7 +23,6 @@
*
*/
package org.hibernate;
import java.io.Serializable;
/**

View File

@ -22,7 +22,6 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate.action;
import org.hibernate.engine.SessionImplementor;
/**

View File

@ -22,7 +22,6 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate.action;
import org.hibernate.engine.SessionImplementor;
/**

View File

@ -22,14 +22,12 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate.action;
import java.io.Serializable;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Set;
import org.hibernate.HibernateException;
import org.hibernate.cache.access.CollectionRegionAccessStrategy;
import org.hibernate.cache.access.EntityRegionAccessStrategy;

View File

@ -23,20 +23,18 @@
*
*/
package org.hibernate.action;
import org.hibernate.cache.access.SoftLock;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.Serializable;
import org.hibernate.cache.CacheException;
import org.hibernate.cache.CacheKey;
import org.hibernate.cache.access.SoftLock;
import org.hibernate.collection.PersistentCollection;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.persister.collection.CollectionPersister;
import org.hibernate.pretty.MessageHelper;
import org.hibernate.util.StringHelper;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.Serializable;
/**
* Any action relating to insert/update/delete of a collection
*

View File

@ -23,20 +23,18 @@
*
*/
package org.hibernate.action;
import java.io.Serializable;
import org.hibernate.HibernateException;
import org.hibernate.event.PostCollectionRecreateEventListener;
import org.hibernate.event.PostCollectionRecreateEvent;
import org.hibernate.event.EventSource;
import org.hibernate.event.PreCollectionRecreateEvent;
import org.hibernate.event.PreCollectionRecreateEventListener;
import org.hibernate.cache.CacheException;
import org.hibernate.collection.PersistentCollection;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.event.EventSource;
import org.hibernate.event.PostCollectionRecreateEvent;
import org.hibernate.event.PostCollectionRecreateEventListener;
import org.hibernate.event.PreCollectionRecreateEvent;
import org.hibernate.event.PreCollectionRecreateEventListener;
import org.hibernate.persister.collection.CollectionPersister;
import java.io.Serializable;
public final class CollectionRecreateAction extends CollectionAction {
public CollectionRecreateAction(

View File

@ -23,21 +23,19 @@
*
*/
package org.hibernate.action;
import org.hibernate.HibernateException;
import java.io.Serializable;
import org.hibernate.AssertionFailure;
import org.hibernate.event.PostCollectionRemoveEvent;
import org.hibernate.event.PreCollectionRemoveEvent;
import org.hibernate.event.PreCollectionRemoveEventListener;
import org.hibernate.event.EventSource;
import org.hibernate.event.PostCollectionRemoveEventListener;
import org.hibernate.HibernateException;
import org.hibernate.cache.CacheException;
import org.hibernate.collection.PersistentCollection;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.event.EventSource;
import org.hibernate.event.PostCollectionRemoveEvent;
import org.hibernate.event.PostCollectionRemoveEventListener;
import org.hibernate.event.PreCollectionRemoveEvent;
import org.hibernate.event.PreCollectionRemoveEventListener;
import org.hibernate.persister.collection.CollectionPersister;
import java.io.Serializable;
public final class CollectionRemoveAction extends CollectionAction {
private boolean emptySnapshot;

View File

@ -23,22 +23,20 @@
*
*/
package org.hibernate.action;
import java.io.Serializable;
import org.hibernate.AssertionFailure;
import org.hibernate.HibernateException;
import org.hibernate.event.PostCollectionUpdateEvent;
import org.hibernate.event.PreCollectionUpdateEvent;
import org.hibernate.event.PreCollectionUpdateEventListener;
import org.hibernate.event.EventSource;
import org.hibernate.event.PostCollectionUpdateEventListener;
import org.hibernate.cache.CacheException;
import org.hibernate.collection.PersistentCollection;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.event.EventSource;
import org.hibernate.event.PostCollectionUpdateEvent;
import org.hibernate.event.PostCollectionUpdateEventListener;
import org.hibernate.event.PreCollectionUpdateEvent;
import org.hibernate.event.PreCollectionUpdateEventListener;
import org.hibernate.persister.collection.CollectionPersister;
import org.hibernate.pretty.MessageHelper;
import java.io.Serializable;
public final class CollectionUpdateAction extends CollectionAction {
private final boolean emptySnapshot;

View File

@ -22,8 +22,7 @@
* Boston, MA 02110-1301 USA
*
*/
package org.hibernate.action;
package org.hibernate.action;
import java.io.Serializable;
/**

View File

@ -23,17 +23,15 @@
*
*/
package org.hibernate.action;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.Serializable;
import org.hibernate.AssertionFailure;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.persister.entity.EntityPersister;
import org.hibernate.pretty.MessageHelper;
import org.hibernate.util.StringHelper;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.Serializable;
/**
* Base class for actions relating to insert/update/delete of an entity
* instance.

View File

@ -23,22 +23,19 @@
*
*/
package org.hibernate.action;
import java.io.Serializable;
import org.hibernate.AssertionFailure;
import org.hibernate.HibernateException;
import org.hibernate.cache.CacheKey;
import org.hibernate.cache.access.SoftLock;
import org.hibernate.engine.EntityEntry;
import org.hibernate.engine.EntityKey;
import org.hibernate.engine.PersistenceContext;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.event.EventSource;
import org.hibernate.event.PostDeleteEvent;
import org.hibernate.event.PostDeleteEventListener;
import org.hibernate.event.PreDeleteEvent;
import org.hibernate.event.PreDeleteEventListener;
import org.hibernate.event.EventSource;
import org.hibernate.persister.entity.EntityPersister;
public final class EntityDeleteAction extends EntityAction {

View File

@ -23,18 +23,16 @@
*
*/
package org.hibernate.action;
import java.io.Serializable;
import org.hibernate.HibernateException;
import org.hibernate.AssertionFailure;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.HibernateException;
import org.hibernate.engine.EntityKey;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.event.EventSource;
import org.hibernate.event.PostInsertEvent;
import org.hibernate.event.PostInsertEventListener;
import org.hibernate.event.PreInsertEvent;
import org.hibernate.event.PreInsertEventListener;
import org.hibernate.event.EventSource;
import org.hibernate.persister.entity.EntityPersister;
public final class EntityIdentityInsertAction extends EntityAction {

View File

@ -22,9 +22,8 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate.action;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.engine.EntityEntry;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.persister.entity.EntityPersister;
/**

View File

@ -23,9 +23,7 @@
*
*/
package org.hibernate.action;
import java.io.Serializable;
import org.hibernate.AssertionFailure;
import org.hibernate.HibernateException;
import org.hibernate.cache.CacheKey;
@ -34,11 +32,11 @@ import org.hibernate.engine.EntityEntry;
import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.engine.Versioning;
import org.hibernate.event.EventSource;
import org.hibernate.event.PostInsertEvent;
import org.hibernate.event.PostInsertEventListener;
import org.hibernate.event.PreInsertEvent;
import org.hibernate.event.PreInsertEventListener;
import org.hibernate.event.EventSource;
import org.hibernate.persister.entity.EntityPersister;
public final class EntityInsertAction extends EntityAction {

View File

@ -22,9 +22,7 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate.action;
import java.io.Serializable;
import org.hibernate.AssertionFailure;
import org.hibernate.HibernateException;
import org.hibernate.cache.CacheException;
@ -36,11 +34,11 @@ import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.engine.Status;
import org.hibernate.engine.Versioning;
import org.hibernate.event.EventSource;
import org.hibernate.event.PostUpdateEvent;
import org.hibernate.event.PostUpdateEventListener;
import org.hibernate.event.PreUpdateEvent;
import org.hibernate.event.PreUpdateEventListener;
import org.hibernate.event.EventSource;
import org.hibernate.persister.entity.EntityPersister;
import org.hibernate.type.TypeHelper;

View File

@ -22,7 +22,6 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate.action;
import org.hibernate.OptimisticLockException;
import org.hibernate.engine.EntityEntry;
import org.hibernate.engine.SessionImplementor;

View File

@ -23,10 +23,8 @@
*
*/
package org.hibernate.action;
import org.hibernate.HibernateException;
import java.io.Serializable;
import org.hibernate.HibernateException;
/**
* An operation which may be scheduled for later execution.

View File

@ -22,14 +22,12 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate.annotations;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
* Property Access type

View File

@ -22,14 +22,12 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate.annotations;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import javax.persistence.Column;
import javax.persistence.FetchType;
import static javax.persistence.FetchType.EAGER;
/**
* Define a ToOne association pointing to several entity types.

View File

@ -22,13 +22,12 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate.annotations;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.PACKAGE;
import static java.lang.annotation.ElementType.TYPE;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
/**
* Defines @Any and @manyToAny metadata

View File

@ -22,11 +22,10 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate.annotations;
import static java.lang.annotation.ElementType.PACKAGE;
import static java.lang.annotation.ElementType.TYPE;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
/**
* Defines @Any and @ManyToAny set of metadata.

View File

@ -22,10 +22,11 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate.annotations;
import static java.lang.annotation.ElementType.*;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**

View File

@ -22,10 +22,11 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate.annotations;
import static java.lang.annotation.ElementType.*;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**

View File

@ -22,7 +22,6 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate.annotations;
import org.hibernate.cache.access.AccessType;
/**

View File

@ -23,6 +23,7 @@
*/
package org.hibernate.annotations;
/**
* Enumeration for the different interaction modes between the session and
* the Level 2 Cache.

View File

@ -22,11 +22,10 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate.annotations;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**

View File

@ -23,6 +23,7 @@
*/
package org.hibernate.annotations;
/**
* Cascade types (can override default EJB3 cascades
*/

View File

@ -22,10 +22,11 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate.annotations;
import static java.lang.annotation.ElementType.*;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**

View File

@ -21,13 +21,12 @@
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.annotations;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import static java.lang.annotation.ElementType.METHOD;
package org.hibernate.annotations;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import javax.persistence.Column;
/**

View File

@ -22,14 +22,12 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate.annotations;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import javax.persistence.FetchType;
import static javax.persistence.FetchType.LAZY;
/**
* Annotation used to mark a collection as a collection of elements or

View File

@ -22,12 +22,10 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate.annotations;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
/**
* Custom SQL expression used to read the value from and write a value to a column.

View File

@ -22,12 +22,10 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate.annotations;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
/**
* Plural annotation for @ColumnTransformer.

View File

@ -22,11 +22,10 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate.annotations;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import javax.persistence.Column;

Some files were not shown because too many files have changed in this diff Show More