Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate In directory sc8-pr-cvs1:/tmp/cvs-serv14128/sf/hibernate Modified Files: Databinder.java Hibernate.java Interceptor.java SessionFactory.java hibernate-configuration.dtd Removed Files: Environment.java Log Message: redesigned configuration API Index: Databinder.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/Databinder.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Databinder.java 5 Jan 2003 02:11:19 -0000 1.3 --- Databinder.java 26 Jan 2003 01:33:34 -0000 1.4 *************** *** 7,11 **** /** ! * 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 --- 7,11 ---- /** ! * Provides XML Marshalling for classes registered with a <tt>SessionFactory</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 *************** *** 23,27 **** * <br> * It is not intended that implementors be threadsafe. ! * @see Datastore */ public interface Databinder { --- 23,27 ---- * <br> * It is not intended that implementors be threadsafe. ! * @see SessionFactory */ public interface Databinder { Index: Hibernate.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/Hibernate.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Hibernate.java 25 Jan 2003 09:35:52 -0000 1.4 --- Hibernate.java 26 Jan 2003 01:33:34 -0000 1.5 *************** *** 9,17 **** import java.sql.SQLException; - import net.sf.hibernate.cfg.Configuration; - import net.sf.hibernate.cfg.Datastore; import net.sf.hibernate.collection.PersistentCollection; - import net.sf.hibernate.impl.DatastoreImpl; - import net.sf.hibernate.impl.SessionFactoryObjectFactory; import net.sf.hibernate.lob.BlobImpl; import net.sf.hibernate.lob.ClobImpl; --- 9,13 ---- *************** *** 53,58 **** * Provides access to the full range of Hibernate built-in types. <tt>Type</tt> * instances may be used to bind values to query parameters. ! * Also a factory for <tt>Datastore</tt>. ! * @see Datastore * @see net.sf.hibernate.type.Type */ --- 49,55 ---- * Provides access to the full range of Hibernate built-in types. <tt>Type</tt> * instances may be used to bind values to query parameters. ! * Also a factory for new <tt>Blob</tt>s and <tt>Clob</tt>s. ! * @see java.sql.Clob ! * @see java.sql.Blob * @see net.sf.hibernate.type.Type */ *************** *** 198,231 **** public static Type custom(Class userTypeClass) throws HibernateException { return new CustomType(userTypeClass); - } - /** - * Create an new, uninitialized <tt>Datastore</tt>. - * @see Datastore - */ - public static Datastore createDatastore() { - return new DatastoreImpl(); - } - - private static boolean configured; - - /** - * Configure <tt>SessionFactory</tt>(s) from resource <tt>/hibernate.cfg.xml</tt>. The application - * may then obtain references to the factory(s) using JNDI lookups. This method may be called multiple - * times but will do its work exactly once. Mainly intended for J2EE clients who cannot fully control - * system initialization. - * @see net.sf.hibernate.cfg.Configuration - */ - public static void configure() throws HibernateException { - - synchronized (Hibernate.class) { - if (!configured) { - - //probably not really necessary ... but perhaps nice to have - SessionFactoryObjectFactory.clear(); - - new Configuration("/hibernate.cfg.xml").configure(); - configured = true; - } - } } --- 195,198 ---- Index: Interceptor.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/Interceptor.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Interceptor.java 22 Jan 2003 13:09:19 -0000 1.4 --- Interceptor.java 26 Jan 2003 01:33:34 -0000 1.5 *************** *** 20,24 **** * * @see SessionFactory#openSession(Interceptor) ! * @see Datastore#buildSessionFactory(Interceptor) */ public interface Interceptor { --- 20,24 ---- * * @see SessionFactory#openSession(Interceptor) ! * @see net.sf.hibernate.cfg.Configuration#buildSessionFactory(Interceptor) */ public interface Interceptor { Index: SessionFactory.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/SessionFactory.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SessionFactory.java 14 Jan 2003 14:07:11 -0000 1.5 --- SessionFactory.java 26 Jan 2003 01:33:34 -0000 1.6 *************** *** 22,26 **** * 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> * <table> --- 22,26 ---- * defined in a resource named <tt>/hibernate.properties</tt> in * the classpath or a <tt>java.util.Properties</tt> passed to ! * <tt>Configuration.buildSessionFactory()</tt><br> * <br> * <table> *************** *** 112,117 **** * </table> * - * @see Datastore * @see Session * @see net.sf.hibernate.connection.ConnectionProvider * @see net.sf.hibernate.transaction.TransactionFactory --- 112,117 ---- * </table> * * @see Session + * @see net.sf.hibernate.cfg.Configuration * @see net.sf.hibernate.connection.ConnectionProvider * @see net.sf.hibernate.transaction.TransactionFactory Index: hibernate-configuration.dtd =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/hibernate-configuration.dtd,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** hibernate-configuration.dtd 1 Jan 2003 13:53:42 -0000 1.1.1.1 --- hibernate-configuration.dtd 26 Jan 2003 01:33:34 -0000 1.2 *************** *** 11,16 **** --> - <!ELEMENT hibernate-configuration (property*,session-factory+)> - <!ELEMENT property (#PCDATA)> <!ATTLIST property name CDATA #REQUIRED> --- 11,14 ---- --- Environment.java DELETED --- |