Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate In directory sc8-pr-cvs1:/tmp/cvs-serv14211/src/net/sf/hibernate Modified Files: AssertionFailure.java CallbackException.java Databinder.java Environment.java FlushMode.java Hibernate.java HibernateException.java InstantiationException.java Interceptor.java LazyInitializationException.java Lifecycle.java LockMode.java MappingException.java ObjectDeletedException.java ObjectNotFoundException.java PersistentEnum.java PersistentObjectException.java PropertyAccessException.java PropertyNotFoundException.java Query.java QueryException.java ScrollableResults.java Session.java SessionFactory.java StaleObjectStateException.java Transaction.java TransactionException.java TransientObjectException.java UserType.java Validatable.java ValidationFailure.java WrongClassException.java Log Message: reformatted code with beautiful, shiny, happy TABS! improved an exception Index: AssertionFailure.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/AssertionFailure.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** AssertionFailure.java 1 Jan 2003 13:53:40 -0000 1.1.1.1 --- AssertionFailure.java 4 Jan 2003 11:15:27 -0000 1.2 *************** *** 13,26 **** private static final Log log = LogFactory.getLog(AssertionFailure.class); ! public AssertionFailure(String s) { super(s); log.error("An AssertionFailure occured - this may indicate a bug in Hibernate", this); } ! public AssertionFailure(String s, Throwable t) { super(s, t); log.error("An AssertionFailure occured - this may indicate a bug in Hibernate", t); } ! } --- 13,29 ---- private static final Log log = LogFactory.getLog(AssertionFailure.class); ! public AssertionFailure(String s) { super(s); log.error("An AssertionFailure occured - this may indicate a bug in Hibernate", this); } ! public AssertionFailure(String s, Throwable t) { super(s, t); log.error("An AssertionFailure occured - this may indicate a bug in Hibernate", t); } ! } + + + Index: CallbackException.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/CallbackException.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** CallbackException.java 1 Jan 2003 13:53:40 -0000 1.1.1.1 --- CallbackException.java 4 Jan 2003 11:15:27 -0000 1.2 *************** *** 17,24 **** super(message); } ! public CallbackException(String message, Exception e) { super(message, e); } ! } --- 17,27 ---- super(message); } ! public CallbackException(String message, Exception e) { super(message, e); } ! } + + + Index: Databinder.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/Databinder.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Databinder.java 1 Jan 2003 13:53:40 -0000 1.1.1.1 --- Databinder.java 4 Jan 2003 11:15:27 -0000 1.2 *************** *** 7,17 **** /** ! * Provides XML Marshalling for classes registered with a <tt>Datastore</tt>. ! * Hibernate defines a <i>generic</i> XML format that may be used to ! * represent any class (<tt>hibernate-generic.dtd</tt>). The user configures ! * an XSLT stylesheet for marshalling data from this generic format to an * application and / or user readable format. By default, Hibernate will * use <tt>hibernate-default.xslt</tt> which maps data to a useful human - ! * readable format.<br> * <br> * The property <tt>hibernate.xml.output_stylesheet</tt> --- 7,17 ---- /** ! * Provides XML Marshalling for classes registered with a <tt>Datastore</tt>. ! * Hibernate defines a <i>generic</i> XML format that may be used to ! * represent any class (<tt>hibernate-generic.dtd</tt>). The user configures ! * an XSLT stylesheet for marshalling data from this generic format to an * application and / or user readable format. By default, Hibernate will * use <tt>hibernate-default.xslt</tt> which maps data to a useful human - ! * readable format.<br> * <br> * The property <tt>hibernate.xml.output_stylesheet</tt> *************** *** 43,64 **** /** * Output the generic XML representation of the bound objects ! * * @return String generic XML representation * @throws HibernateException */ public String toGenericXML() throws HibernateException; ! /** * Output the generic XML representation of the bound objects * as a DOM tree ! * * @return Node generic XML tree * @throws HibernateException */ public Document toGenericDOM() throws HibernateException; ! /** * Output the custom XML representation of the bound objects ! * * @return String custom XML representation * @throws HibernateException --- 43,64 ---- /** * Output the generic XML representation of the bound objects ! * * @return String generic XML representation * @throws HibernateException */ public String toGenericXML() throws HibernateException; ! /** * Output the generic XML representation of the bound objects * as a DOM tree ! * * @return Node generic XML tree * @throws HibernateException */ public Document toGenericDOM() throws HibernateException; ! /** * Output the custom XML representation of the bound objects ! * * @return String custom XML representation * @throws HibernateException *************** *** 66,74 **** */ public String toXML() throws HibernateException, TransformerException; ! /** * Output the custom XML representation of the bound objects as * a DOM tree ! * * @return Node custom XML tree * @throws HibernateException --- 66,74 ---- */ public String toXML() throws HibernateException, TransformerException; ! /** * Output the custom XML representation of the bound objects as * a DOM tree ! * * @return Node custom XML tree * @throws HibernateException *************** *** 80,84 **** * Controls whether bound objects (and their associated objects) that are lazily initialized are * explicitly initialized or left as they are. ! * * @param initializeLazy true to explicitly initialize lazy objects, false to leave them in * the state they are in. --- 80,84 ---- * Controls whether bound objects (and their associated objects) that are lazily initialized are * explicitly initialized or left as they are. ! * * @param initializeLazy true to explicitly initialize lazy objects, false to leave them in * the state they are in. *************** *** 86,87 **** --- 86,90 ---- public void setInitializeLazy(boolean initializeLazy); } + + + Index: Environment.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/Environment.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Environment.java 1 Jan 2003 13:53:42 -0000 1.1.1.1 --- Environment.java 4 Jan 2003 11:15:27 -0000 1.2 *************** *** 38,44 **** public final class Environment { ! private static final String VERSION = "2.0 beta 1"; ! /** * <tt>ConnectionProvider</tt> implementor to use when obtaining connections --- 38,44 ---- public final class Environment { ! private static final String VERSION = "2.0 beta 1"; ! /** * <tt>ConnectionProvider</tt> implementor to use when obtaining connections *************** *** 77,86 **** */ public static final String CONNECTION_PREFIX = "hibernate.connection"; ! /** * Maximum size for Hibernate's statement cache */ public static final String STATEMENT_CACHE_SIZE ="hibernate.statement_cache.size"; ! /** * JNDI initial context class, <tt>Context.INITIAL_CONTEXT_FACTORY</tt> --- 77,86 ---- */ public static final String CONNECTION_PREFIX = "hibernate.connection"; ! /** * Maximum size for Hibernate's statement cache */ public static final String STATEMENT_CACHE_SIZE ="hibernate.statement_cache.size"; ! /** * JNDI initial context class, <tt>Context.INITIAL_CONTEXT_FACTORY</tt> *************** *** 99,103 **** */ public static final String SESSION_FACTORY_NAME = "hibernate.session_factory_name"; ! /** * Hibernate SQL <tt>Dialect</tt> class --- 99,103 ---- */ public static final String SESSION_FACTORY_NAME = "hibernate.session_factory_name"; ! /** * Hibernate SQL <tt>Dialect</tt> class *************** *** 108,112 **** */ public static final String DEFAULT_SCHEMA = "hibernate.default_schema"; ! /** * Enable logging of generated SQL to the console --- 108,112 ---- */ public static final String DEFAULT_SCHEMA = "hibernate.default_schema"; ! /** * Enable logging of generated SQL to the console *************** *** 126,144 **** */ public static final String USE_SCROLLABLE_RESULTSET = "hibernate.jdbc.use_scrollable_resultset"; ! /** ! * Gives the JDBC driver a hint as to the number of rows that should be fetched from the database ! * when more rows are needed. If <tt>0</tt>, JDBC driver default settings will be used. ! */ ! public static final String STATEMENT_FETCH_SIZE = "hibernate.jdbc.fetch_size"; /** * Maximum JDBC batch size. A nonzero value enables batch updates. */ public static final String STATEMENT_BATCH_SIZE = "hibernate.jdbc.batch_size"; ! /** * An XSLT resource used to generate "custom" XML */ public static final String OUTPUT_STYLESHEET ="hibernate.xml.output_stylesheet"; ! /** * Maximum size of C3P0 connection pool --- 126,144 ---- */ public static final String USE_SCROLLABLE_RESULTSET = "hibernate.jdbc.use_scrollable_resultset"; ! /** ! * Gives the JDBC driver a hint as to the number of rows that should be fetched from the database ! * when more rows are needed. If <tt>0</tt>, JDBC driver default settings will be used. ! */ ! public static final String STATEMENT_FETCH_SIZE = "hibernate.jdbc.fetch_size"; /** * Maximum JDBC batch size. A nonzero value enables batch updates. */ public static final String STATEMENT_BATCH_SIZE = "hibernate.jdbc.batch_size"; ! /** * An XSLT resource used to generate "custom" XML */ public static final String OUTPUT_STYLESHEET ="hibernate.xml.output_stylesheet"; ! /** * Maximum size of C3P0 connection pool *************** *** 161,165 **** */ public static final String C3P0_VALIDATE_CONNECTION = "hibernate.c3p0.validate"; ! /** * Maximum number of checked out connections for DBCP connection pool --- 161,165 ---- */ public static final String C3P0_VALIDATE_CONNECTION = "hibernate.c3p0.validate"; ! /** * Maximum number of checked out connections for DBCP connection pool *************** *** 198,202 **** */ public static final String DBCP_PS_WHENEXHAUSTED = "hibernate.dbcp.ps.whenExhaustedAction"; ! /** * <tt>TransactionFactory</tt> implementor to use for creating <tt>Transaction</tt>s --- 198,202 ---- */ public static final String DBCP_PS_WHENEXHAUSTED = "hibernate.dbcp.ps.whenExhaustedAction"; ! /** * <tt>TransactionFactory</tt> implementor to use for creating <tt>Transaction</tt>s *************** *** 211,215 **** */ public static final String USER_TRANSACTION = "jta.UserTransaction"; ! /** * A comma-seperated list of token substitutions to use when translating a Hibernate --- 211,215 ---- */ public static final String USER_TRANSACTION = "jta.UserTransaction"; ! /** * A comma-seperated list of token substitutions to use when translating a Hibernate *************** *** 221,227 **** */ public static final String QUERY_IMPORTS = "hibernate.query.imports"; ! //Obsolete properties: ! private static final String OUTPUT_STYLESHEET_OLD ="hibernate.output_stylesheet"; private static final String CONNECTION_PROVIDER_OLD ="hibernate.connection_provider"; --- 221,227 ---- */ public static final String QUERY_IMPORTS = "hibernate.query.imports"; ! //Obsolete properties: ! private static final String OUTPUT_STYLESHEET_OLD ="hibernate.output_stylesheet"; private static final String CONNECTION_PROVIDER_OLD ="hibernate.connection_provider"; *************** *** 236,240 **** private static final String URL_OLD ="hibernate.url"; private static final String USE_STREAMS_FOR_BINARY_OLD = "hibernate.use_streams_for_binary"; ! private static final String STATEMENT_FETCH_SIZE_OLD = "hibernate.statement.fetch_size"; private static final String USE_SCROLLABLE_RESULTSET_OLD = "hibernate.use_scrollable_resultset"; /** --- 236,240 ---- private static final String URL_OLD ="hibernate.url"; private static final String USE_STREAMS_FOR_BINARY_OLD = "hibernate.use_streams_for_binary"; ! private static final String STATEMENT_FETCH_SIZE_OLD = "hibernate.statement.fetch_size"; private static final String USE_SCROLLABLE_RESULTSET_OLD = "hibernate.use_scrollable_resultset"; /** *************** *** 243,257 **** */ public static final String USE_JDBC_BATCH = "hibernate.use_jdbc_batch"; ! private static final boolean jvmSupportsProxies; private static final boolean useStreamsForBinary; private static final boolean jvmSupportsLinkedHashCollections; ! private static final Properties properties; private static final HashMap isolationLevels = new HashMap(); private static final Map obsoleteProperties = new HashMap(); ! private static final Log log = LogFactory.getLog(Environment.class); ! /** * Issues warnings to the user when any obsolete property names are used. --- 243,257 ---- */ public static final String USE_JDBC_BATCH = "hibernate.use_jdbc_batch"; ! private static final boolean jvmSupportsProxies; private static final boolean useStreamsForBinary; private static final boolean jvmSupportsLinkedHashCollections; ! private static final Properties properties; private static final HashMap isolationLevels = new HashMap(); private static final Map obsoleteProperties = new HashMap(); ! private static final Log log = LogFactory.getLog(Environment.class); ! /** * Issues warnings to the user when any obsolete property names are used. *************** *** 265,273 **** } } ! static { ! log.info("Hibernate " + VERSION); ! isolationLevels.put( new Integer(Connection.TRANSACTION_NONE), "NONE" ); isolationLevels.put( new Integer(Connection.TRANSACTION_READ_UNCOMMITTED), "READ_UNCOMMITTED" ); --- 265,273 ---- } } ! static { ! log.info("Hibernate " + VERSION); ! isolationLevels.put( new Integer(Connection.TRANSACTION_NONE), "NONE" ); isolationLevels.put( new Integer(Connection.TRANSACTION_READ_UNCOMMITTED), "READ_UNCOMMITTED" ); *************** *** 275,279 **** isolationLevels.put( new Integer(Connection.TRANSACTION_REPEATABLE_READ), "REPEATABLE_READ" ); isolationLevels.put( new Integer(Connection.TRANSACTION_SERIALIZABLE), "SERIALIZABLE" ); ! obsoleteProperties.put(CONNECTION_PROVIDER_OLD, CONNECTION_PROVIDER); obsoleteProperties.put(DRIVER_OLD, DRIVER); --- 275,279 ---- isolationLevels.put( new Integer(Connection.TRANSACTION_REPEATABLE_READ), "REPEATABLE_READ" ); isolationLevels.put( new Integer(Connection.TRANSACTION_SERIALIZABLE), "SERIALIZABLE" ); ! obsoleteProperties.put(CONNECTION_PROVIDER_OLD, CONNECTION_PROVIDER); obsoleteProperties.put(DRIVER_OLD, DRIVER); *************** *** 291,297 **** obsoleteProperties.put(USE_STREAMS_FOR_BINARY_OLD, USE_STREAMS_FOR_BINARY); obsoleteProperties.put(STATEMENT_FETCH_SIZE_OLD, STATEMENT_FETCH_SIZE); ! properties = new Properties(); ! InputStream stream = Environment.class.getResourceAsStream("/hibernate.properties"); if ( stream==null ) { --- 291,297 ---- obsoleteProperties.put(USE_STREAMS_FOR_BINARY_OLD, USE_STREAMS_FOR_BINARY); obsoleteProperties.put(STATEMENT_FETCH_SIZE_OLD, STATEMENT_FETCH_SIZE); ! properties = new Properties(); ! InputStream stream = Environment.class.getResourceAsStream("/hibernate.properties"); if ( stream==null ) { *************** *** 307,319 **** } } ! properties.putAll( System.getProperties() ); ! verifyProperties(properties); ! useStreamsForBinary = PropertiesHelper.getBoolean(USE_STREAMS_FOR_BINARY, properties); ! if (useStreamsForBinary) log.info("using java.io streams to persist binary types"); ! boolean proxySupport; try { --- 307,319 ---- } } ! properties.putAll( System.getProperties() ); ! verifyProperties(properties); ! useStreamsForBinary = PropertiesHelper.getBoolean(USE_STREAMS_FOR_BINARY, properties); ! if (useStreamsForBinary) log.info("using java.io streams to persist binary types"); ! boolean proxySupport; try { *************** *** 326,330 **** log.info("JVM proxy support: " + proxySupport); jvmSupportsProxies = proxySupport; ! boolean linkedHashSupport; try { --- 326,330 ---- log.info("JVM proxy support: " + proxySupport); jvmSupportsProxies = proxySupport; ! boolean linkedHashSupport; try { *************** *** 336,369 **** } jvmSupportsLinkedHashCollections = linkedHashSupport; ! } ! ! /** ! * Does this JVM support dynamic proxies? (Now return true because CGLIB ! * proxies work on all supported JDK) ! */ ! public static boolean jvmSupportsProxies() { ! return true;//jvmSupportsProxies; ! } ! ! /** ! * Does this JVM support <tt>LinkedHashSet</tt>, <tt>LinkedHashMap</tt>? ! * @see java.util.LinkedHashSet ! * @see java.util.LinkedHashMap ! */ ! public static boolean jvmSupportsLinkedHashCollections() { ! return jvmSupportsLinkedHashCollections; ! } ! ! /** ! * Should we use streams to bind binary types to JDBC IN parameters? ! * Property <tt>hibernate.jdbc.use_streams_for_binary</tt>. ! */ public static boolean useStreamsForBinary() { ! return useStreamsForBinary; ! } ! ! private Environment() { throw new UnsupportedOperationException(); } ! /** * Return <tt>System</tt> properties, extended by any properties specified --- 336,369 ---- } jvmSupportsLinkedHashCollections = linkedHashSupport; ! } ! ! /** ! * Does this JVM support dynamic proxies? (Now return true because CGLIB ! * proxies work on all supported JDK) ! */ ! public static boolean jvmSupportsProxies() { ! return true;//jvmSupportsProxies; ! } ! ! /** ! * Does this JVM support <tt>LinkedHashSet</tt>, <tt>LinkedHashMap</tt>? ! * @see java.util.LinkedHashSet ! * @see java.util.LinkedHashMap ! */ ! public static boolean jvmSupportsLinkedHashCollections() { ! return jvmSupportsLinkedHashCollections; ! } ! ! /** ! * Should we use streams to bind binary types to JDBC IN parameters? ! * Property <tt>hibernate.jdbc.use_streams_for_binary</tt>. ! */ public static boolean useStreamsForBinary() { ! return useStreamsForBinary; ! } ! ! private Environment() { throw new UnsupportedOperationException(); } ! /** * Return <tt>System</tt> properties, extended by any properties specified *************** *** 371,378 **** * @return Properties */ ! public static Properties getProperties() { ! return properties; ! } ! /** * Get the name of a JDBC transaction isolation level --- 371,378 ---- * @return Properties */ ! public static Properties getProperties() { ! return properties; ! } ! /** * Get the name of a JDBC transaction isolation level *************** *** 382,389 **** * @return String */ ! public static String isolationLevelToString(int isolation) { ! return (String) isolationLevels.get( new Integer(isolation) ); ! } ! } --- 382,392 ---- * @return String */ ! public static String isolationLevelToString(int isolation) { ! return (String) isolationLevels.get( new Integer(isolation) ); ! } ! } + + + Index: FlushMode.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/FlushMode.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** FlushMode.java 1 Jan 2003 13:53:42 -0000 1.1.1.1 --- FlushMode.java 4 Jan 2003 11:15:27 -0000 1.2 *************** *** 8,14 **** /** * Represents a flushing strategy. The flush process synchronizes ! * database state with session state by detecting state changes * and executing SQL statements. ! * * @see Session#setFlushMode(FlushMode) */ --- 8,14 ---- /** * Represents a flushing strategy. The flush process synchronizes ! * database state with session state by detecting state changes * and executing SQL statements. ! * * @see Session#setFlushMode(FlushMode) */ *************** *** 27,31 **** /** * The <tt>Session</tt> is never flushed unless <tt>flush()</tt> ! * is explicitly called by the application. This mode is very * efficient for read only transactions. */ --- 27,31 ---- /** * The <tt>Session</tt> is never flushed unless <tt>flush()</tt> ! * is explicitly called by the application. This mode is very * efficient for read only transactions. */ *************** *** 42,46 **** */ public static final FlushMode AUTO = new FlushMode(10, "AUTO"); ! static { instances.put( new Integer(NEVER.level), NEVER ); --- 42,46 ---- */ public static final FlushMode AUTO = new FlushMode(10, "AUTO"); ! static { instances.put( new Integer(NEVER.level), NEVER ); *************** *** 52,55 **** return instances.get( new Integer(level) ); } ! } --- 52,58 ---- return instances.get( new Integer(level) ); } ! } + + + Index: Hibernate.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/Hibernate.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Hibernate.java 1 Jan 2003 13:53:47 -0000 1.1.1.1 --- Hibernate.java 4 Jan 2003 11:15:27 -0000 1.2 *************** *** 92,103 **** */ public static final NullableType BINARY = new BinaryType(); ! /** ! * Hibernate <tt>blob</tt> type ! */ ! public static final NullableType BLOB = new BlobType(); ! /** ! * Hibernate <tt>clob</tt> type ! */ ! public static final NullableType CLOB = new ClobType(); /** * Hibernate <tt>calendar</tt> type --- 92,103 ---- */ public static final NullableType BINARY = new BinaryType(); ! /** ! * Hibernate <tt>blob</tt> type ! */ ! public static final NullableType BLOB = new BlobType(); ! /** ! * Hibernate <tt>clob</tt> type ! */ ! public static final NullableType CLOB = new ClobType(); /** * Hibernate <tt>calendar</tt> type *************** *** 132,137 **** */ public static final NullableType SERIALIZABLE = new SerializableType(Serializable.class); ! ! /** * Cannot be instantiated. --- 132,137 ---- */ public static final NullableType SERIALIZABLE = new SerializableType(Serializable.class); ! ! /** * Cannot be instantiated. *************** *** 174,180 **** return new DatastoreImpl(); } ! private static boolean configured; ! /** * Configure <tt>SessionFactory</tt>(s) from resource <tt>/hibernate.cfg.xml</tt>. The application --- 174,180 ---- return new DatastoreImpl(); } ! private static boolean configured; ! /** * Configure <tt>SessionFactory</tt>(s) from resource <tt>/hibernate.cfg.xml</tt>. The application *************** *** 185,190 **** */ public static void configure() throws HibernateException { ! ! synchronized (Hibernate.class) { if (!configured) { --- 185,190 ---- */ public static void configure() throws HibernateException { ! ! synchronized (Hibernate.class) { if (!configured) { *************** *** 230,233 **** public static Clob createClob(String string) { return new ClobImpl(string); ! } } --- 230,236 ---- public static Clob createClob(String string) { return new ClobImpl(string); ! } } + + + Index: HibernateException.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/HibernateException.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** HibernateException.java 1 Jan 2003 13:53:47 -0000 1.1.1.1 --- HibernateException.java 4 Jan 2003 11:15:27 -0000 1.2 *************** *** 13,22 **** public HibernateException(Throwable root) { ! super(root); } ! public HibernateException(String string, Throwable root) { ! super(string, root); } --- 13,22 ---- public HibernateException(Throwable root) { ! super(root); } ! public HibernateException(String string, Throwable root) { ! super(string, root); } *************** *** 25,26 **** --- 25,29 ---- } } + + + Index: InstantiationException.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/InstantiationException.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** InstantiationException.java 1 Jan 2003 13:53:47 -0000 1.1.1.1 --- InstantiationException.java 4 Jan 2003 11:15:27 -0000 1.2 *************** *** 10,26 **** private final Class clazz; ! public InstantiationException(String s, Class clazz, Throwable root) { super(s, root); this.clazz = clazz; } ! public Class getPersistentClass() { return clazz; } ! public String getMessage() { return super.getMessage() + clazz.getName(); } ! } --- 10,29 ---- private final Class clazz; ! public InstantiationException(String s, Class clazz, Throwable root) { super(s, root); this.clazz = clazz; } ! public Class getPersistentClass() { return clazz; } ! public String getMessage() { return super.getMessage() + clazz.getName(); } ! } + + + Index: Interceptor.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/Interceptor.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Interceptor.java 1 Jan 2003 13:53:47 -0000 1.1.1.1 --- Interceptor.java 4 Jan 2003 11:15:27 -0000 1.2 *************** *** 8,22 **** /** ! * Allows user code to inspect and / or change property values before they are written and after they are read * from the database.<br> * <br> ! * There might be a single instance of <tt>Interceptor</tt> for a <tt>SessionFactory</tt>, or a new instance ! * might be specified for each <tt>Session</tt>. Whichever approach is used, the interceptor must be ! * serializable if the <tt>Session</tt> is to be serializable. This means that <tt>SessionFactory</tt>-scoped * interceptors should implement <tt>readResolve()</tt>.<br> * <br> ! * The <tt>Session</tt> may not be invoked from a callback (nor may a callback cause a collection or proxy to * be lazily initialized).<br> ! * * @see SessionFactory#openSession(Interceptor) * @see Datastore#buildSessionFactory(Interceptor) --- 8,22 ---- /** ! * Allows user code to inspect and / or change property values before they are written and after they are read * from the database.<br> * <br> ! * There might be a single instance of <tt>Interceptor</tt> for a <tt>SessionFactory</tt>, or a new instance ! * might be specified for each <tt>Session</tt>. Whichever approach is used, the interceptor must be ! * serializable if the <tt>Session</tt> is to be serializable. This means that <tt>SessionFactory</tt>-scoped * interceptors should implement <tt>readResolve()</tt>.<br> * <br> ! * The <tt>Session</tt> may not be invoked from a callback (nor may a callback cause a collection or proxy to * be lazily initialized).<br> ! * * @see SessionFactory#openSession(Interceptor) * @see Datastore#buildSessionFactory(Interceptor) *************** *** 24,34 **** public interface Interceptor { /** ! * Called just before an object is initialized. The interceptor may change the <tt>state</tt>, which will ! * be propagated to the persistent object. Note that when this method is called, <tt>entity</tt> will be * an empty uninitialized instance of the class. ! * * @return <tt>true</tt> if the user modified the <tt>state</tt> in any way. */ ! public boolean onLoad(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types); /** * Called when an object is detected to be dirty, during a flush. The interceptor may modify the detected --- 24,34 ---- public interface Interceptor { /** ! * Called just before an object is initialized. The interceptor may change the <tt>state</tt>, which will ! * be propagated to the persistent object. Note that when this method is called, <tt>entity</tt> will be * an empty uninitialized instance of the class. ! * * @return <tt>true</tt> if the user modified the <tt>state</tt> in any way. */ ! public boolean onLoad(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types); /** * Called when an object is detected to be dirty, during a flush. The interceptor may modify the detected *************** *** 37,41 **** * new <tt>currentState</tt> will be propagated to the object, but not necessarily (immediately) to * the database. It is strongly recommended that the interceptor <b>not</b> modify the <tt>previousState</tt>. ! * * @return <tt>true</tt> if the user modified the <tt>currentState</tt> in any way. */ --- 37,41 ---- * new <tt>currentState</tt> will be propagated to the object, but not necessarily (immediately) to * the database. It is strongly recommended that the interceptor <b>not</b> modify the <tt>previousState</tt>. ! * * @return <tt>true</tt> if the user modified the <tt>currentState</tt> in any way. */ *************** *** 45,49 **** * Called before an object is saved. The interceptor may modify the <tt>state</tt>, which will be used for * the SQL <tt>INSERT</tt> and propagated to the persistent object. ! * * @return <tt>true</tt> if the user modified the <tt>state</tt> in any way. */ --- 45,49 ---- * Called before an object is saved. The interceptor may modify the <tt>state</tt>, which will be used for * the SQL <tt>INSERT</tt> and propagated to the persistent object. ! * * @return <tt>true</tt> if the user modified the <tt>state</tt> in any way. */ *************** *** 63,64 **** --- 63,67 ---- public void postFlush(Iterator entities); } + + + Index: LazyInitializationException.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/LazyInitializationException.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** LazyInitializationException.java 1 Jan 2003 13:53:47 -0000 1.1.1.1 --- LazyInitializationException.java 4 Jan 2003 11:15:27 -0000 1.2 *************** *** 16,25 **** super("Hibernate lazy instantiation problem", root); } ! public LazyInitializationException(String msg) { super(msg); LogFactory.getLog(LazyInitializationException.class).error(msg, this); } ! public LazyInitializationException(String msg, Exception root) { super(msg, root); --- 16,25 ---- super("Hibernate lazy instantiation problem", root); } ! public LazyInitializationException(String msg) { super(msg); LogFactory.getLog(LazyInitializationException.class).error(msg, this); } ! public LazyInitializationException(String msg, Exception root) { super(msg, root); *************** *** 33,36 **** return (Exception) super.getCause(); } ! } --- 33,39 ---- return (Exception) super.getCause(); } ! } + + + Index: Lifecycle.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/Lifecycle.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Lifecycle.java 1 Jan 2003 13:53:47 -0000 1.1.1.1 --- Lifecycle.java 4 Jan 2003 11:15:27 -0000 1.2 *************** *** 38,52 **** */ public interface Lifecycle { ! /** * Return value to veto the action (true) */ public static final boolean VETO = true; ! /** * Return value to accept the action (false) */ public static final boolean NO_VETO = false; ! /** * Called when an entity is saved. --- 38,52 ---- */ public interface Lifecycle { ! /** * Return value to veto the action (true) */ public static final boolean VETO = true; ! /** * Return value to accept the action (false) */ public static final boolean NO_VETO = false; ! /** * Called when an entity is saved. *************** *** 56,60 **** */ public boolean onSave(Session s) throws CallbackException; ! /** * Called when an entity is passed to <tt>Session.update()</tt>. --- 56,60 ---- */ public boolean onSave(Session s) throws CallbackException; ! /** * Called when an entity is passed to <tt>Session.update()</tt>. *************** *** 66,70 **** */ public boolean onUpdate(Session s) throws CallbackException; ! /** * Called when an entity is deleted. --- 66,70 ---- */ public boolean onUpdate(Session s) throws CallbackException; ! /** * Called when an entity is deleted. *************** *** 74,78 **** */ public boolean onDelete(Session s) throws CallbackException; ! /** * Called after an entity is loaded. <em>It is illegal to --- 74,78 ---- */ public boolean onDelete(Session s) throws CallbackException; ! /** * Called after an entity is loaded. <em>It is illegal to *************** *** 86,87 **** --- 86,90 ---- public void onLoad(Session s, Serializable id); } + + + Index: LockMode.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/LockMode.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** LockMode.java 1 Jan 2003 13:53:47 -0000 1.1.1.1 --- LockMode.java 4 Jan 2003 11:15:27 -0000 1.2 *************** *** 7,17 **** /** ! * Instances represent a lock mode for a row of a relational ! * database table. It is not intended that users spend much * time worrying about locking since Hibernate usually * obtains exactly the right lock level automatically. ! * Some "advanced" users may wish to explicitly specify lock * levels. ! * * @see Session#lock(Object,LockMode) */ --- 7,17 ---- /** ! * Instances represent a lock mode for a row of a relational ! * database table. It is not intended that users spend much * time worrying about locking since Hibernate usually * obtains exactly the right lock level automatically. ! * Some "advanced" users may wish to explicitly specify lock * levels. ! * * @see Session#lock(Object,LockMode) */ *************** *** 41,45 **** } /** ! * No lock required. If an object is requested with this lock * mode, a <tt>READ</tt> lock might be obtained if necessary. */ --- 41,45 ---- } /** ! * No lock required. If an object is requested with this lock * mode, a <tt>READ</tt> lock might be obtained if necessary. */ *************** *** 51,55 **** public static final LockMode READ = new LockMode(5, "READ"); /** ! * An upgrade lock. Objects loaded in this lock mode are * materialized using an SQL <tt>select ... for update</tt>. */ --- 51,55 ---- public static final LockMode READ = new LockMode(5, "READ"); /** ! * An upgrade lock. Objects loaded in this lock mode are * materialized using an SQL <tt>select ... for update</tt>. */ *************** *** 57,62 **** /** * Attempt to obtain an upgrade lock, using an Oracle-style ! * <tt>select ... for update nowait</tt>. The semantics of ! * this lock mode, once obtained, are the same as * <tt>UPGRADE</tt>.<br> */ --- 57,62 ---- /** * Attempt to obtain an upgrade lock, using an Oracle-style ! * <tt>select ... for update nowait</tt>. The semantics of ! * this lock mode, once obtained, are the same as * <tt>UPGRADE</tt>.<br> */ *************** *** 68,72 **** */ public static final LockMode WRITE = new LockMode(10, "WRITE"); ! static { instances.put( new Integer(NONE.level), NONE ); --- 68,72 ---- */ public static final LockMode WRITE = new LockMode(10, "WRITE"); ! static { instances.put( new Integer(NONE.level), NONE ); *************** *** 80,83 **** return instances.get( new Integer(level) ); } ! } --- 80,86 ---- return instances.get( new Integer(level) ); } ! } + + + Index: MappingException.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/MappingException.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** MappingException.java 1 Jan 2003 13:53:47 -0000 1.1.1.1 --- MappingException.java 4 Jan 2003 11:15:27 -0000 1.2 *************** *** 9,16 **** public class MappingException extends HibernateException { ! public MappingException(String msg, Throwable root) { ! super( msg, root ); ! } ! public MappingException(Throwable root) { super(root); --- 9,16 ---- public class MappingException extends HibernateException { ! public MappingException(String msg, Throwable root) { ! super( msg, root ); ! } ! public MappingException(Throwable root) { super(root); *************** *** 22,23 **** --- 22,26 ---- } + + + Index: ObjectDeletedException.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/ObjectDeletedException.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** ObjectDeletedException.java 1 Jan 2003 13:53:47 -0000 1.1.1.1 --- ObjectDeletedException.java 4 Jan 2003 11:15:27 -0000 1.2 *************** *** 23,27 **** return super.getMessage() + ": " + identifier; } ! } --- 23,30 ---- return super.getMessage() + ": " + identifier; } ! } + + + Index: ObjectNotFoundException.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/ObjectNotFoundException.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** ObjectNotFoundException.java 1 Jan 2003 13:53:47 -0000 1.1.1.1 --- ObjectNotFoundException.java 4 Jan 2003 11:15:27 -0000 1.2 *************** *** 25,33 **** return super.getMessage() + ": " + identifier + ", of class: " + clazz.getName(); } ! public Class getPersistentClass() { return clazz; } ! } --- 25,36 ---- return super.getMessage() + ": " + identifier + ", of class: " + clazz.getName(); } ! public Class getPersistentClass() { return clazz; } ! } + + + Index: PersistentEnum.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/PersistentEnum.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** PersistentEnum.java 1 Jan 2003 13:53:47 -0000 1.1.1.1 --- PersistentEnum.java 4 Jan 2003 11:15:27 -0000 1.2 *************** *** 9,13 **** * <br> * <tt>public static PersistentEnum fromInt(int i)</tt> ! * */ --- 9,13 ---- * <br> * <tt>public static PersistentEnum fromInt(int i)</tt> ! * */ *************** *** 15,16 **** --- 15,19 ---- public int toInt(); } + + + Index: PersistentObjectException.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/PersistentObjectException.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** PersistentObjectException.java 1 Jan 2003 13:53:47 -0000 1.1.1.1 --- PersistentObjectException.java 4 Jan 2003 11:15:27 -0000 1.2 *************** *** 8,15 **** public class PersistentObjectException extends HibernateException { ! public PersistentObjectException(String s) { super(s); } ! } --- 8,18 ---- public class PersistentObjectException extends HibernateException { ! public PersistentObjectException(String s) { super(s); } ! } + + + Index: PropertyAccessException.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/PropertyAccessException.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** PropertyAccessException.java 1 Jan 2003 13:53:48 -0000 1.1.1.1 --- PropertyAccessException.java 4 Jan 2003 11:15:27 -0000 1.2 *************** *** 3,7 **** /** ! * A problem occurred accessing a property of an instance of a * persistent class by reflection. */ --- 3,7 ---- /** ! * A problem occurred accessing a property of an instance of a * persistent class by reflection. */ *************** *** 12,16 **** private final String propertyName; private final boolean wasSetter; ! public PropertyAccessException(Exception root, String s, boolean wasSetter, Class persistentClass, String propertyName) { super(s, root); --- 12,16 ---- private final String propertyName; private final boolean wasSetter; ! public PropertyAccessException(Exception root, String s, boolean wasSetter, Class persistentClass, String propertyName) { super(s, root); *************** *** 19,27 **** this.propertyName = propertyName; } ! public Class getPersistentClass() { return persistentClass; } ! public String getPropertyName() { return propertyName; --- 19,27 ---- this.propertyName = propertyName; } ! public Class getPersistentClass() { return persistentClass; } ! public String getPropertyName() { return propertyName; *************** *** 29,37 **** public String getMessage() { ! return super.getMessage() + ! ( wasSetter ? " setter of " : " getter of ") + ! persistentClass.getName() + ! '.' + ! propertyName; } } --- 29,40 ---- public String getMessage() { ! return super.getMessage() + ! ( wasSetter ? " setter of " : " getter of ") + ! persistentClass.getName() + ! '.' + ! propertyName; } } + + + Index: PropertyNotFoundException.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/PropertyNotFoundException.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** PropertyNotFoundException.java 1 Jan 2003 13:53:48 -0000 1.1.1.1 --- PropertyNotFoundException.java 4 Jan 2003 11:15:27 -0000 1.2 *************** *** 3,22 **** /** ! * Indicates that an expected getter or setter method could not be * found on a class. */ public class PropertyNotFoundException extends MappingException { ! public PropertyNotFoundException(String msg, Throwable root) { super(msg, root); } ! public PropertyNotFoundException(Throwable root) { super(root); } ! public PropertyNotFoundException(String s) { super(s); } ! } --- 3,25 ---- /** ! * Indicates that an expected getter or setter method could not be * found on a class. */ public class PropertyNotFoundException extends MappingException { ! public PropertyNotFoundException(String msg, Throwable root) { super(msg, root); } ! public PropertyNotFoundException(Throwable root) { super(root); } ! public PropertyNotFoundException(String s) { super(s); } ! } + + + Index: Query.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/Query.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Query.java 1 Jan 2003 13:53:48 -0000 1.1.1.1 --- Query.java 4 Jan 2003 11:15:27 -0000 1.2 *************** *** 63,68 **** public String[] getNamedParameters() throws HibernateException; /** ! * Return the query results as an <tt>Iterator</tt>. If the query ! * contains multiple results pre row, the results are returned in * an instance of <tt>Object[]</tt>.<br> * <br> --- 63,68 ---- public String[] getNamedParameters() throws HibernateException; /** ! * Return the query results as an <tt>Iterator</tt>. If the query ! * contains multiple results pre row, the results are returned in * an instance of <tt>Object[]</tt>.<br> * <br> *************** *** 76,81 **** public Iterator iterate() throws SQLException, HibernateException; /** ! * Return the query results as <tt>ScrollableResults</tt>. The ! * scrollability of the returned results depends upon JDBC driver * support for scrollable <tt>ResultSet</tt>s.<br> * <br> --- 76,81 ---- public Iterator iterate() throws SQLException, HibernateException; /** ! * Return the query results as <tt>ScrollableResults</tt>. The ! * scrollability of the returned results depends upon JDBC driver * support for scrollable <tt>ResultSet</tt>s.<br> * <br> *************** *** 107,111 **** public void setMaxResults(int maxResults); /** ! * Set the first row to retrieve. If not set, rows will be * retrieved beginnning from row <tt>0</tt>. This method * is more efficient if the JDBC driver supports scrollable --- 107,111 ---- public void setMaxResults(int maxResults); /** ! * Set the first row to retrieve. If not set, rows will be * retrieved beginnning from row <tt>0</tt>. This method * is more efficient if the JDBC driver supports scrollable *************** *** 138,142 **** /** ! * Bind a value to a JDBC-style query parameter, guessing the * Hibernate type from the class of the given object. * @param position the position of the parameter in the query --- 138,142 ---- /** ! * Bind a value to a JDBC-style query parameter, guessing the * Hibernate type from the class of the given object. * @param position the position of the parameter in the query *************** *** 166,170 **** /** * Bind multiple values to a named query parameter, guessing the Hibernate type from the ! * class of the first object in the collection. This is useful for binding a list of values * to an expression such as <tt>foo.bar in (:value_list)</tt>. * @param name the name of the parameter --- 166,170 ---- /** * Bind multiple values to a named query parameter, guessing the Hibernate type from the ! * class of the first object in the collection. This is useful for binding a list of values * to an expression such as <tt>foo.bar in (:value_list)</tt>. * @param name the name of the parameter *************** *** 219,223 **** public void setTime(String name, Date date); public void setTimestamp(String name, Date date); ! public void setCalendar(String name, Calendar calendar); public void setCalendarDate(String name, Calendar calendar); --- 219,223 ---- public void setTime(String name, Date date); public void setTimestamp(String name, Date date); ! public void setCalendar(String name, Calendar calendar); public void setCalendarDate(String name, Calendar calendar); *************** *** 237,241 **** */ public void setEnum(int position, Object val) throws MappingException; // use setParameter for null values ! /** * Bind an instance of a mapped persistent class to a named query parameter. --- 237,241 ---- */ public void setEnum(int position, Object val) throws MappingException; // use setParameter for null values ! /** * Bind an instance of a mapped persistent class to a named query parameter. *************** *** 251,253 **** --- 251,256 ---- public void setEnum(String name, Object val) throws MappingException; // use setParameter for null values } + + + Index: QueryException.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/QueryException.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** QueryException.java 1 Jan 2003 13:53:48 -0000 1.1.1.1 --- QueryException.java 4 Jan 2003 11:15:27 -0000 1.2 *************** *** 22,26 **** return queryString; } ! public void setQueryString(String queryString) { this.queryString = queryString; --- 22,26 ---- return queryString; } ! public void setQueryString(String queryString) { this.queryString = queryString; *************** *** 30,34 **** return super.getMessage() + " [" + queryString + ']'; } ! } --- 30,37 ---- return super.getMessage() + " [" + queryString + ']'; } ! } + + + Index: ScrollableResults.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/ScrollableResults.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** ScrollableResults.java 1 Jan 2003 13:53:49 -0000 1.1.1.1 --- ScrollableResults.java 4 Jan 2003 11:15:27 -0000 1.2 *************** *** 21,25 **** * <br> * Contrary to JDBC, columns of results are numbered from zero. ! * * @see Query#scroll() */ --- 21,25 ---- * <br> * Contrary to JDBC, columns of results are numbered from zero. ! * * @see Query#scroll() */ *************** *** 36,40 **** * @return <tt>true</tt> if there is a previous result */ ! public boolean previous() throws SQLException, HibernateException; /** * Scroll an arbitrary number of locations --- 36,40 ---- * @return <tt>true</tt> if there is a previous result */ ! public boolean previous() throws SQLException, HibernateException; /** * Scroll an arbitrary number of locations *************** *** 75,79 **** * Get the <tt>i</tt>th object in the current row of results, without * initializing any other results in the row. This method may be used ! * safely, regardless of the type of the column (ie. even for scalar * results). * @param i the column, numbered from zero --- 75,79 ---- * Get the <tt>i</tt>th object in the current row of results, without * initializing any other results in the row. This method may be used ! * safely, regardless of the type of the column (ie. even for scalar * results). * @param i the column, numbered from zero *************** *** 88,92 **** */ public Type getType(int i); ! /** * Convenience method to read an <tt>integer</tt> --- 88,92 ---- */ public Type getType(int i); ! /** * Convenience method to read an <tt>integer</tt> *************** *** 125,136 **** */ public byte[] getBinary(int col) throws SQLException, HibernateException; ! /** ! * Convenience method to read a <tt>blob</tt> ! */ ! public Blob getBlob(int col) throws SQLException, HibernateException; ! /** ! * Convenience method to read a <tt>clob</tt> ! */ ! public Clob getClob(int col) throws SQLException, HibernateException; /** * Convenience method to read a <tt>string</tt> --- 125,136 ---- */ public byte[] getBinary(int col) throws SQLException, HibernateException; ! /** ! * Convenience method to read a <tt>blob</tt> ! */ ! public Blob getBlob(int col) throws SQLException, HibernateException; ! /** ! * Convenience method to read a <tt>clob</tt> ! */ ! public Clob getClob(int col) throws SQLException, HibernateException; /** * Convenience method to read a <tt>string</tt> *************** *** 162,163 **** --- 162,166 ---- public TimeZone getTimeZone(int col) throws SQLException, HibernateException; } + + + Index: Session.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/Session.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Session.java 1 Jan 2003 13:53:51 -0000 1.1.1.1 --- Session.java 4 Jan 2003 11:15:27 -0000 1.2 *************** *** 13,17 **** * central API class abstracting the notion of a persistence service.<br> * <br> ! * The lifecycle of a <tt>Session</tt> is bounded by the beginning and end of a logical * transaction. (Long transactions might span several database transactions.)<br> * <br> --- 13,17 ---- * central API class abstracting the notion of a persistence service.<br> * <br> ! * The lifecycle of a <tt>Session</tt> is bounded by the beginning and end of a logical * transaction. (Long transactions might span several database transactions.)<br> [...974 lines suppressed...] ! * @param queryString a Hibernate query ! * @return Query ! * @throws HibernateException ! */ ! public Query createFilter(Object collection, String queryString) throws HibernateException; ! ! /** ! * Obtain an instance of <tt>Query</tt> for a named query string defined in the ! * mapping file. ! * ! * @param queryString the name of a query defined externally ! * @return Query ! * @throws HibernateException ! */ ! public Query getNamedQuery(String queryName) throws HibernateException; ! ! } ! ! ! Index: SessionFactory.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/SessionFactory.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** SessionFactory.java 1 Jan 2003 13:53:51 -0000 1.1.1.1 --- SessionFactory.java 4 Jan 2003 11:15:27 -0000 1.2 *************** *** 12,16 **** import net.sf.hibernate.metadata.CollectionMetadata; ! /** * Creates <tt>Session</tt>s. Usually an application has a single * <tt>SessionFactory</tt>. Threads servicing client requests obtain --- 12,16 ---- import net.sf.hibernate.metadata.CollectionMetadata; ! /** * Creates <tt>Session</tt>s. Usually an application has a single * <tt>SessionFactory</tt>. Threads servicing client requests obtain *************** *** 22,26 **** * Properties may be either be <tt>System</tt> properties, properties * defined in a resource named <tt>/hibernate.properties</tt> in ! * the classpath or a <tt>java.util.Properties</tt> passed to * <tt>Datastore.buildSessionFactory()</tt><br> * <br> --- 22,26 ---- * Properties may be either be <tt>System</tt> properties, properties * defined in a resource named <tt>/hibernate.properties</tt> in ! * the classpath or a <tt>java.util.Properties</tt> passed to * <tt>Datastore.buildSessionFactory()</tt><br> * <br> *************** *** 33,37 **** * <tr> * <td><tt>hibernate.connection.provider_class</tt></td> ! * <td>classname of <tt>net.sf.hibernate.connection.ConnectionProvider</tt> * subclass (if not specified hueristics are used)</td> * </tr> --- 33,37 ---- * <tr> * <td><tt>hibernate.connection.provider_class</tt></td> ! * <td>classname of <tt>net.sf.hibernate.connection.ConnectionProvider</tt> * subclass (if not specified hueristics are used)</td> * </tr> *************** *** 48,57 **** * <tr> * <td><tt>hibernate.connection.isolation</tt></td> ! * <td>JDBC transaction isolation level (only when using * <tt>java.sql.DriverManager</tt>) * </td> * </tr> * <td><tt>hibernate.connection.pool_size</tt></td> ! * <td>the maximum size of the connection pool (only when using * <tt>java.sql.DriverManager</tt>) * </td> --- 48,57 ---- * <tr> * <td><tt>hibernate.connection.isolation</tt></td> ! * <td>JDBC transaction isolation level (only when using * <tt>java.sql.DriverManager</tt>) * </td> * </tr> * <td><tt>hibernate.connection.pool_size</tt></td> ! * <td>the maximum size of the connection pool (only when using * <tt>java.sql.DriverManager</tt>) * </td> *************** *** 59,63 **** * <tr> * <td><tt>hibernate.statement_cache.size</tt></td> ! * <td>the maximum size of the prepared statement cache (only when using * <tt>java.sql.DriverManager</tt>) * </td> --- 59,63 ---- * <tr> * <td><tt>hibernate.statement_cache.size</tt></td> ! * <td>the maximum size of the prepared statement cache (only when using * <tt>java.sql.DriverManager</tt>) * </td> *************** *** 96,100 **** * <tr> * <td><tt>hibernate.session_factory_name</tt></td> ! * <td>If set, the factory attempts to bind this name to itself in the * JNDI context. This name is also used to support cross JVM <tt> * Session</tt> (de)serialization.</td> --- 96,100 ---- * <tr> * <td><tt>hibernate.session_factory_name</tt></td> ! * <td>If set, the factory attempts to bind this name to itself in the * JNDI context. This name is also used to support cross JVM <tt> * Session</tt> (de)serialization.</td> *************** *** 112,116 **** * </tr> * </table> ! * * @see Datastore * @see Session --- 112,116 ---- * </tr> * </table> ! * * @see Datastore * @see Session *************** *** 122,126 **** /** * Open a <tt>Session</tt> on the given connection. ! * * @param connection a connection provided by the application. * @return Session --- 122,126 ---- /** * Open a <tt>Session</tt> on the given connection. ! * * @param connection a connection provided by the application. * @return Session *************** *** 129,135 **** /** ! * Create database connection and open a <tt>Session</tt> on it, specifying an * interceptor. ! * * @param interceptor a session-scoped interceptor * @return Session --- 129,135 ---- /** ! * Create database connection and open a <tt>Session</tt> on it, specifying an * interceptor. ! * * @param interceptor a session-scoped interceptor * @return Session *************** *** 140,144 **** /** * Open a <tt>Session</tt> on the given connection, specifying an interceptor. ! * * @param connection a connection provided by the application. * @param interceptor a session-scoped interceptor --- 140,144 ---- /** * Open a <tt>Session</tt> on the given connection, specifying an interceptor. ! * * @param connection a connection provided by the application. * @param interceptor a session-scoped interceptor *************** *** 149,153 **** /** * Create database connection and open a <tt>Session</tt> on it. ! * * @return Session * @throws SQLException --- 149,153 ---- /** * Create database connection and open a <tt>Session</tt> on it. ! * * @return Session * @throws SQLException *************** *** 157,161 **** /** * Create a new databinder. ! * * @return Databinder */ --- 157,161 ---- /** * Create a new databinder. ! * * @return Databinder */ *************** *** 164,196 **** /** * Get the <tt>ClassMetadata</tt> associated with the given entity class ! * * @see net.sf.hibernate.metadata.ClassMetadata */ public ClassMetadata getClassMetadata(Class persistentClass) throws HibernateException; ! /** * Get the <tt>CollectionMetadata</tt> associated with the named collection role ! * * @see net.sf.hibernate.metadata.CollectionMetadata */ public CollectionMetadata getCollectionMetadata(String roleName) throws HibernateException; - /** - *... [truncated message content] |