You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(22) |
Nov
(308) |
Dec
(131) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(369) |
Feb
(171) |
Mar
(236) |
Apr
(187) |
May
(218) |
Jun
(217) |
Jul
(127) |
Aug
(448) |
Sep
(270) |
Oct
(231) |
Nov
(422) |
Dec
(255) |
2004 |
Jan
(111) |
Feb
(73) |
Mar
(338) |
Apr
(351) |
May
(349) |
Jun
(495) |
Jul
(394) |
Aug
(1048) |
Sep
(499) |
Oct
(142) |
Nov
(269) |
Dec
(638) |
2005 |
Jan
(825) |
Feb
(1272) |
Mar
(593) |
Apr
(690) |
May
(950) |
Jun
(958) |
Jul
(767) |
Aug
(839) |
Sep
(525) |
Oct
(449) |
Nov
(585) |
Dec
(455) |
2006 |
Jan
(603) |
Feb
(656) |
Mar
(195) |
Apr
(114) |
May
(136) |
Jun
(100) |
Jul
(128) |
Aug
(68) |
Sep
(7) |
Oct
(1) |
Nov
(1) |
Dec
(8) |
2007 |
Jan
(4) |
Feb
(3) |
Mar
(8) |
Apr
(16) |
May
(5) |
Jun
(4) |
Jul
(6) |
Aug
(23) |
Sep
(15) |
Oct
(5) |
Nov
(7) |
Dec
(5) |
2008 |
Jan
(5) |
Feb
(1) |
Mar
(1) |
Apr
(5) |
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(2) |
2013 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <one...@us...> - 2003-01-14 13:42:52
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/util In directory sc8-pr-cvs1:/tmp/cvs-serv19888/net/sf/hibernate/util Modified Files: JDBCExceptionReporter.java Log Message: wrap all SQLExceptions fixed a bug in SchemaExport where generated foreign key constraints did not used qualified tablename for referenced table Index: JDBCExceptionReporter.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/util/JDBCExceptionReporter.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** JDBCExceptionReporter.java 5 Jan 2003 02:11:25 -0000 1.3 --- JDBCExceptionReporter.java 14 Jan 2003 13:42:18 -0000 1.4 *************** *** 16,48 **** if ( log.isDebugEnabled() && warning!=null ) log.debug( "SQL Warning", warning ); while (warning != null) { ! log.warn( new StringBuffer(30) ! .append("SQL Warning: ") ! .append( warning.getErrorCode() ) ! .append(", SQLState: ") ! .append( warning.getSQLState() ) ! .toString() ! ); ! log.warn( warning.getMessage() ); ! warning = warning.getNextWarning(); } } - } ! public static void logExceptions(SQLException ex) { ! if ( log.isErrorEnabled() ) { ! if ( log.isDebugEnabled() ) log.debug( "SQL Exception", ex ); ! while (ex != null) { ! log.warn( new StringBuffer(30) ! .append("SQL Error: ") ! .append( ex.getErrorCode() ) ! .append(", SQLState: ") ! .append( ex.getSQLState() ) ! .toString() ! ); ! log.error( ex.getMessage() ); ! ex = ex.getNextException(); } - } - } } --- 16,50 ---- if ( log.isDebugEnabled() && warning!=null ) log.debug( "SQL Warning", warning ); while (warning != null) { ! log.warn( ! new StringBuffer(30) ! .append("SQL Warning: ") ! .append( warning.getErrorCode() ) ! .append(", SQLState: ") ! .append( warning.getSQLState() ) ! .toString() ! ); ! log.warn( warning.getMessage() ); ! warning = warning.getNextWarning(); ! } } } ! public static void logExceptions(SQLException ex) { ! if ( log.isErrorEnabled() ) { ! if ( log.isDebugEnabled() ) log.debug( "SQL Exception", ex ); ! while (ex != null) { ! log.warn( ! new StringBuffer(30) ! .append("SQL Error: ") ! .append( ex.getErrorCode() ) ! .append(", SQLState: ") ! .append( ex.getSQLState() ) ! .toString() ! ); ! log.error( ex.getMessage() ); ! ex = ex.getNextException(); ! } ! } } } |
From: <one...@us...> - 2003-01-14 13:42:51
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/proxy In directory sc8-pr-cvs1:/tmp/cvs-serv19888/net/sf/hibernate/proxy Modified Files: HibernateProxyHelper.java LazyInitializer.java Log Message: wrap all SQLExceptions fixed a bug in SchemaExport where generated foreign key constraints did not used qualified tablename for referenced table Index: HibernateProxyHelper.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/proxy/HibernateProxyHelper.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** HibernateProxyHelper.java 5 Jan 2003 02:11:22 -0000 1.3 --- HibernateProxyHelper.java 14 Jan 2003 13:42:17 -0000 1.4 *************** *** 2,7 **** package net.sf.hibernate.proxy; - import java.sql.SQLException; - import net.sf.cglib.proxy.Enhancer; --- 2,5 ---- *************** *** 14,18 **** * Initializes the proxy if necessary! */ ! public static Object unproxy(Object object, SessionImplementor session) throws SQLException, HibernateException { if ( object instanceof HibernateProxy ) { --- 12,16 ---- * Initializes the proxy if necessary! */ ! public static Object unproxy(Object object, SessionImplementor session) throws HibernateException { if ( object instanceof HibernateProxy ) { Index: LazyInitializer.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/proxy/LazyInitializer.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** LazyInitializer.java 5 Jan 2003 02:11:22 -0000 1.3 --- LazyInitializer.java 14 Jan 2003 13:42:18 -0000 1.4 *************** *** 146,150 **** * Return the underlying persistent object, initializing if necessary */ ! public final Object getImplementation() throws HibernateException, SQLException { initializeWrapExceptions(); return target; --- 146,150 ---- * Return the underlying persistent object, initializing if necessary */ ! public final Object getImplementation() throws HibernateException { initializeWrapExceptions(); return target; |
From: <one...@us...> - 2003-01-14 13:42:51
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/odmg In directory sc8-pr-cvs1:/tmp/cvs-serv19888/net/sf/hibernate/odmg Modified Files: Database.java OQLQuery.java Transaction.java Log Message: wrap all SQLExceptions fixed a bug in SchemaExport where generated foreign key constraints did not used qualified tablename for referenced table Index: Database.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/odmg/Database.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Database.java 5 Jan 2003 02:11:22 -0000 1.3 --- Database.java 14 Jan 2003 13:42:16 -0000 1.4 *************** *** 1,5 **** //$Id$ package net.sf.hibernate.odmg; ! import java.sql.SQLException; import org.odmg.ODMGException; import org.odmg.ODMGRuntimeException; --- 1,5 ---- //$Id$ package net.sf.hibernate.odmg; ! import org.odmg.ODMGException; import org.odmg.ODMGRuntimeException; *************** *** 120,126 **** throw new ODMGRuntimeException( he.getMessage() ); } - catch (SQLException sqle) { - throw new ODMGRuntimeException( sqle.getMessage() ); - } } --- 120,123 ---- *************** *** 144,150 **** throw new ODMGRuntimeException( he.getMessage() ); } - catch (SQLException sqle) { - throw new ODMGRuntimeException( sqle.getMessage() ); - } } --- 141,144 ---- *************** *** 168,174 **** throw new ODMGRuntimeException( he.getMessage() ); } - catch (SQLException sqle) { - throw new ODMGRuntimeException( sqle.getMessage() ); - } } --- 162,165 ---- *************** *** 184,190 **** throw new ODMGRuntimeException( he.getMessage() ); } - catch (SQLException sqle) { - throw new ODMGRuntimeException( sqle.getMessage() ); - } } /** --- 175,178 ---- *************** *** 198,204 **** catch (HibernateException he) { throw new ODMGRuntimeException( he.getMessage() ); - } - catch (SQLException sqle) { - throw new ODMGRuntimeException( sqle.getMessage() ); } } --- 186,189 ---- Index: OQLQuery.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/odmg/OQLQuery.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** OQLQuery.java 5 Jan 2003 02:11:22 -0000 1.3 --- OQLQuery.java 14 Jan 2003 13:42:16 -0000 1.4 *************** *** 1,3 **** ! //$Id$ package net.sf.hibernate.odmg; import java.sql.SQLException; import org.odmg.ODMGRuntimeException; import org.odmg.QueryException; import org.odmg.QueryInvalidException; import org.odmg.QueryParameterCountInvalidException; import org.odmg.QueryParameterTypeInvalidException; import net.sf.hibernate.HibernateException; import net.sf.hibernate.Query; /** Experimental implementation of the ODMG <tt>OQLQuery</tt> interface. The supported query language is actually the Hibernate query language and the <tt>execute()</tt> method returns results in the same format as <tt>Session.find()</tt>.<br> <br> Warning: this implementation will change significantly as ODMG support matures! */ public class OQLQuery implements org.odmg.OQLQuery { private Transaction tx; private Query query; private int param=0; /** * Instantiate an <tt>OQLQuery</tt> for the current transaction. */ public OQLQuery(Database db) { this.tx = db.currentTransaction(); } /** * Instantiate an <tt>OQLQuery</tt> for the given transaction. */ public OQLQuery(Transaction tx) { this.tx = tx; } /** * Instantiate an <tt>OQLQuery</tt> for the current transaction. */ public OQLQuery() { this.tx = (Transaction) Implementation.getInstance().currentTransaction(); } /** * Get the underlying Hibernate <tt>Query</tt>. */ public Query getQuery() { return query; } /** * Set the HIbernate query string. Scalar return values are not supported. * @see org.odmg.OQLQuery#create(String) */ public void create(String queryString) throws QueryInvalidException { //TODO: the right exception try { this.query = tx.getSession().createQuery(queryString); } catch (HibernateException he) { throw new ODMGRuntimeException( he.getMessage() ); } } /** * Bind a value to the next <tt>?</tt> style parameter. * @see org.odmg.OQLQuery#bind(Object) */ public void bind(Object parameter) throws QueryParameterCountInvalidException, QueryParameterTypeInvalidException { //TODO: the right exception try { query.setParameter(param++, parameter); } catch (HibernateException he) { throw new ODMGRuntimeException( he.getMessage() ); } } /** * Get the query results as a collection. * @see org.odmg.OQLQuery#execute() */ public Object execute() throws QueryException { //TODO: how are results meant to be returned in ODMG? try { return query.list(); } catch (SQLException sqle) { throw new QueryException( sqle.getMessage() ); } catch (HibernateException he) { throw new QueryException( he.getMessage() ); } } } --- 1,3 ---- ! //$Id$ package net.sf.hibernate.odmg; import org.odmg.ODMGRuntimeException; import org.odmg.QueryException; import org.odmg.QueryInvalidException; import org.odmg.QueryParameterCountInvalidException; import org.odmg.QueryParameterTypeInvalidException; import net.sf.hibernate.HibernateException; import net.sf.hibernate.Query; /** Experimental implementation of the ODMG <tt>OQLQuery</tt> interface. The supported query language is actually the Hibernate query language and the <tt>execute()</tt> method returns results in the same format as <tt>Session.find()</tt>.<br> <br> Warning: this implementation will change significantly as ODMG support matures! */ public class OQLQuery implements org.odmg.OQLQuery { private Transaction tx; private Query query; private int param=0; /** * Instantiate an <tt>OQLQuery</tt> for the current transaction. */ public OQLQuery(Database db) { this.tx = db.currentTransaction(); } /** * Instantiate an <tt>OQLQuery</tt> for the given transaction. */ public OQLQuery(Transaction tx) { this.tx = tx; } /** * Instantiate an <tt>OQLQuery</tt> for the current transaction. */ public OQLQuery() { this.tx = (Transaction) Implementation.getInstance().currentTransaction(); } /** * Get the underlying Hibernate <tt>Query</tt>. */ public Query getQuery() { return query; } /** * Set the HIbernate query string. Scalar return values are not supported. * @see org.odmg.OQLQuery#create(String) */ public void create(String queryString) throws QueryInvalidException { //TODO: the right exception try { this.query = tx.getSession().createQuery(queryString); } catch (HibernateException he) { throw new ODMGRuntimeException( he.getMessage() ); } } /** * Bind a value to the next <tt>?</tt> style parameter. * @see org.odmg.OQLQuery#bind(Object) */ public void bind(Object parameter) throws QueryParameterCountInvalidException, QueryParameterTypeInvalidException { //TODO: the right exception try { query.setParameter(param++, parameter); } catch (HibernateException he) { throw new ODMGRuntimeException( he.getMessage() ); } } /** * Get the query results as a collection. * @see org.odmg.OQLQuery#execute() */ public Object execute() throws QueryException { //TODO: how are results meant to be returned in ODMG? try { return query.list(); } catch (HibernateException he) { throw new QueryException( he.getMessage() ); } } } Index: Transaction.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/odmg/Transaction.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Transaction.java 5 Jan 2003 02:11:22 -0000 1.3 --- Transaction.java 14 Jan 2003 13:42:17 -0000 1.4 *************** *** 1,3 **** ! //$Id$ package net.sf.hibernate.odmg; import java.sql.SQLException; import org.odmg.LockNotGrantedException; import org.odmg.ODMGException; import org.odmg.ODMGRuntimeException; import net.sf.hibernate.HibernateException; import net.sf.hibernate.LockMode; import net.sf.hibernate.Session; /** * Implements the ODMG <tt>Transaction</tt> API. */ public class Transaction implements org.odmg.Transaction { private final Database database; private final Session session; private net.sf.hibernate.Transaction tx; /** * Instantiate a <tt>Transaction</tt> for the given <tt>Database</tt>. */ public Transaction(org.odmg.Database database) throws ODMGException { this.database = (Database) database; try { this.session = this.database.getSessionFactory().openSession(); } catch (SQLException sqle) { throw new ODMGException( sqle.getMessage() ); } this.database.associateThread(this); } /** * Instantiate a <tt>Transaction</tt> for a <tt>Database</tt> created * by the current thread. */ public Transaction() throws ODMGException { this( Implementation.getInstance().currentDatabase() ); } /** * Get the underlying Hibernate <tt>Session</tt>. (Very useful!) */ public Session getSession() { return session; } /** * Associate the current thread with this <tt>Transaction</tt> and * disassociate the thread from any other <tt>Transaction</tt>. * @see org.odmg.Transaction#join() */ public void join() { //database.disassociateThread(); database.associateThread(this); } /** * Disassociate the thread the <tt>Transaction</tt>. * @see org.odmg.Transaction#leave() */ public void leave() { database.disassociateThread(); } /** * Begin the transaction. * @see org.odmg.Transaction#begin() */ public void begin() { try { tx = session.beginTransaction(); } catch (HibernateException he) { throw new ODMGRuntimeException( he.getMessage() ); } } /** * Is the transaction open? Returns true if <tt>begin()</tt> was called but * neither <tt>commit()</tt> nor <tt>abort()</tt> was called. * @see org.odmg.Transaction#isOpen() */ public boolean isOpen() { return tx==null; } /** * Commit the transaction. * @see org.odmg.Transaction#commit() */ public void commit() { database.disassociateThread(); try { tx.commit(); } catch (HibernateException he) { throw new ODMGRuntimeException( he.getMessage() ); } catch (SQLException sqle) { throw new ODMGRuntimeException( sqle.getMessage() ); } finally { tx=null; try { session.close(); } catch (HibernateException he) { throw new ODMGRuntimeException( he.getMessage() ); } catch (SQLException sqle) { throw new ODMGRuntimeException( sqle.getMessage() ); } } } /** * Abort the transaction. * @see org.odmg.Transaction#abort() */ public void abort() { database.disassociateThread(); try { tx.rollback(); } catch (HibernateException he) { throw new ODMGRuntimeException( he.getMessage() ); } finally { tx=null; try { session.close(); } catch (HibernateException he) { throw new ODMGRuntimeException( he.getMessage() ); } catch (SQLException sqle) { throw new ODMGRuntimeException( sqle.getMessage() ); } } } /** * Commit the changes, but leave the transaction open. This implementation * does not have quite the same semantics os ODMG (locks are not retained). * So you should only use this with versioned data. * @see org.odmg.Transaction#checkpoint() */ public void checkpoint() { try { tx.commit(); tx = session.beginTransaction(); } catch (HibernateException he) { throw new ODMGRuntimeException( he.getMessage() ); } catch (SQLException sqle) { throw new ODMGRuntimeException( sqle.getMessage() ); } } /** * Obtain a lock upon the given object. In the present implementation, * <tt>READ</tt> lock mode is ignored while <tt>UPGRADE</tt> and * <tt>WRITE</tt> lock modes obtain an <tt>UPGRADE</tt> lock for databases * which support <tt>for update</tt>. We should improve this eventually.... * @see org.odmg.Transaction#lock(Object, int) */ public void lock(Object obj, int lockMode) throws LockNotGrantedException { //TODO: check the semantics of this... try { if ( lockMode==org.odmg.Transaction.READ ) { session.lock(obj, LockMode.READ); } else { session.lock(obj, LockMode.UPGRADE); } } catch (HibernateException he) { throw new ODMGRuntimeException( he.getMessage() ); } catch (SQLException sqle) { throw new ODMGRuntimeException( sqle.getMessage() ); } } /** * Not implemented. * @see org.odmg.Transaction#tryLock(Object, int) */ public boolean tryLock(Object obj, int lockMode) { throw new UnsupportedOperationException("try using lock()"); } } --- 1,3 ---- ! //$Id$ package net.sf.hibernate.odmg; import org.odmg.LockNotGrantedException; import org.odmg.ODMGException; import org.odmg.ODMGRuntimeException; import net.sf.hibernate.HibernateException; import net.sf.hibernate.LockMode; import net.sf.hibernate.Session; /** * Implements the ODMG <tt>Transaction</tt> API. */ public class Transaction implements org.odmg.Transaction { private final Database database; private final Session session; private net.sf.hibernate.Transaction tx; /** * Instantiate a <tt>Transaction</tt> for the given <tt>Database</tt>. */ public Transaction(org.odmg.Database database) throws ODMGException { this.database = (Database) database; try { this.session = this.database.getSessionFactory().openSession(); } catch (HibernateException he) { throw new ODMGException( he.getMessage() ); } this.database.associateThread(this); } /** * Instantiate a <tt>Transaction</tt> for a <tt>Database</tt> created * by the current thread. */ public Transaction() throws ODMGException { this( Implementation.getInstance().currentDatabase() ); } /** * Get the underlying Hibernate <tt>Session</tt>. (Very useful!) */ public Session getSession() { return session; } /** * Associate the current thread with this <tt>Transaction</tt> and * disassociate the thread from any other <tt>Transaction</tt>. * @see org.odmg.Transaction#join() */ public void join() { //database.disassociateThread(); database.associateThread(this); } /** * Disassociate the thread the <tt>Transaction</tt>. * @see org.odmg.Transaction#leave() */ public void leave() { database.disassociateThread(); } /** * Begin the transaction. * @see org.odmg.Transaction#begin() */ public void begin() { try { tx = session.beginTransaction(); } catch (HibernateException he) { throw new ODMGRuntimeException( he.getMessage() ); } } /** * Is the transaction open? Returns true if <tt>begin()</tt> was called but * neither <tt>commit()</tt> nor <tt>abort()</tt> was called. * @see org.odmg.Transaction#isOpen() */ public boolean isOpen() { return tx==null; } /** * Commit the transaction. * @see org.odmg.Transaction#commit() */ public void commit() { database.disassociateThread(); try { tx.commit(); } catch (HibernateException he) { throw new ODMGRuntimeException( he.getMessage() ); } finally { tx=null; try { session.close(); } catch (HibernateException he) { throw new ODMGRuntimeException( he.getMessage() ); } } } /** * Abort the transaction. * @see org.odmg.Transaction#abort() */ public void abort() { database.disassociateThread(); try { tx.rollback(); } catch (HibernateException he) { throw new ODMGRuntimeException( he.getMessage() ); } finally { tx=null; try { session.close(); } catch (HibernateException he) { throw new ODMGRuntimeException( he.getMessage() ); } } } /** * Commit the changes, but leave the transaction open. This implementation * does not have quite the same semantics os ODMG (locks are not retained). * So you should only use this with versioned data. * @see org.odmg.Transaction#checkpoint() */ public void checkpoint() { try { tx.commit(); tx = session.beginTransaction(); } catch (HibernateException he) { throw new ODMGRuntimeException( he.getMessage() ); } } /** * Obtain a lock upon the given object. In the present implementation, * <tt>READ</tt> lock mode is ignored while <tt>UPGRADE</tt> and * <tt>WRITE</tt> lock modes obtain an <tt>UPGRADE</tt> lock for databases * which support <tt>for update</tt>. We should improve this eventually.... * @see org.odmg.Transaction#lock(Object, int) */ public void lock(Object obj, int lockMode) throws LockNotGrantedException { //TODO: check the semantics of this... try { if ( lockMode==org.odmg.Transaction.READ ) { session.lock(obj, LockMode.READ); } else { session.lock(obj, LockMode.UPGRADE); } } catch (HibernateException he) { throw new ODMGRuntimeException( he.getMessage() ); } } /** * Not implemented. * @see org.odmg.Transaction#tryLock(Object, int) */ public boolean tryLock(Object obj, int lockMode) { throw new UnsupportedOperationException("try using lock()"); } } |
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/impl In directory sc8-pr-cvs1:/tmp/cvs-serv19888/net/sf/hibernate/impl Modified Files: DatastoreImpl.java FilterImpl.java QueryImpl.java ScrollableResultsImpl.java SessionFactoryImpl.java SessionImpl.java Log Message: wrap all SQLExceptions fixed a bug in SchemaExport where generated foreign key constraints did not used qualified tablename for referenced table Index: DatastoreImpl.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/impl/DatastoreImpl.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DatastoreImpl.java 9 Jan 2003 12:24:51 -0000 1.4 --- DatastoreImpl.java 14 Jan 2003 13:42:11 -0000 1.5 *************** *** 15,33 **** import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; ! import org.w3c.dom.*; import org.xml.sax.InputSource; ! import net.sf.hibernate.engine.*; ! import net.sf.hibernate.util.*; ! import net.sf.hibernate.mapping.*; ! import net.sf.hibernate.type.*; ! import net.sf.hibernate.*; import net.sf.hibernate.MappingException; import net.sf.hibernate.tool.hbm2ddl.JdbcDatabaseInfo; import net.sf.hibernate.tool.hbm2ddl.JdbcTableInfo; import net.sf.hibernate.id.IdentifierGenerator; import net.sf.hibernate.id.PersistentIdentifierGenerator; ! import net.sf.hibernate.cfg.*; import net.sf.hibernate.dialect.Dialect; /** --- 15,42 ---- import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; ! import org.w3c.dom.Document; import org.xml.sax.InputSource; ! import net.sf.hibernate.util.ArrayHelper; ! import net.sf.hibernate.util.XMLHelper; ! import net.sf.hibernate.Environment; ! import net.sf.hibernate.HibernateException; ! import net.sf.hibernate.Interceptor; import net.sf.hibernate.MappingException; + import net.sf.hibernate.SessionFactory; import net.sf.hibernate.tool.hbm2ddl.JdbcDatabaseInfo; import net.sf.hibernate.tool.hbm2ddl.JdbcTableInfo; + import net.sf.hibernate.type.Type; import net.sf.hibernate.id.IdentifierGenerator; import net.sf.hibernate.id.PersistentIdentifierGenerator; ! import net.sf.hibernate.mapping.Collection; ! import net.sf.hibernate.mapping.ForeignKey; ! import net.sf.hibernate.mapping.Index; ! import net.sf.hibernate.mapping.PersistentClass; ! import net.sf.hibernate.mapping.Root; ! import net.sf.hibernate.mapping.Table; ! import net.sf.hibernate.cfg.Datastore; import net.sf.hibernate.dialect.Dialect; + import net.sf.hibernate.engine.Mapping; /** Index: FilterImpl.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/impl/FilterImpl.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FilterImpl.java 5 Jan 2003 02:11:21 -0000 1.4 --- FilterImpl.java 14 Jan 2003 13:42:11 -0000 1.5 *************** *** 1,5 **** package net.sf.hibernate.impl; - import java.sql.SQLException; import java.util.Iterator; import java.util.List; --- 1,4 ---- *************** *** 26,30 **** * @see net.sf.hibernate.Query#iterate() */ ! public Iterator iterate() throws SQLException, HibernateException { getValues().add(0, null); getTypes().add(0, null); --- 25,29 ---- * @see net.sf.hibernate.Query#iterate() */ ! public Iterator iterate() throws HibernateException { getValues().add(0, null); getTypes().add(0, null); *************** *** 35,39 **** * @see net.sf.hibernate.Query#list() */ ! public List list() throws SQLException, HibernateException { getValues().add(0, null); getTypes().add(0, null); --- 34,38 ---- * @see net.sf.hibernate.Query#list() */ ! public List list() throws HibernateException { getValues().add(0, null); getTypes().add(0, null); *************** *** 44,48 **** * @see net.sf.hibernate.Query#scroll() */ ! public ScrollableResults scroll() throws SQLException, HibernateException { throw new UnsupportedOperationException("Can't scroll filters"); } --- 43,47 ---- * @see net.sf.hibernate.Query#scroll() */ ! public ScrollableResults scroll() throws HibernateException { throw new UnsupportedOperationException("Can't scroll filters"); } Index: QueryImpl.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/impl/QueryImpl.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** QueryImpl.java 5 Jan 2003 02:11:21 -0000 1.4 --- QueryImpl.java 14 Jan 2003 13:42:12 -0000 1.5 *************** *** 4,8 **** import java.io.Serializable; import java.math.BigDecimal; - import java.sql.SQLException; import java.util.ArrayList; import java.util.Calendar; --- 4,7 ---- *************** *** 48,60 **** static final Type[] NO_TYPES = new Type[0]; ! public Iterator iterate() throws SQLException, HibernateException { return session.iterate(queryString, values.toArray(), (Type[]) types.toArray(NO_TYPES), selection, namedParams); } ! public ScrollableResults scroll() throws SQLException, HibernateException { return session.scroll(queryString, values.toArray(), (Type[]) types.toArray(NO_TYPES), selection, namedParams); } ! public List list() throws SQLException, HibernateException { return session.find(queryString, values.toArray(), (Type[]) types.toArray(NO_TYPES), selection, namedParams); } --- 47,59 ---- static final Type[] NO_TYPES = new Type[0]; ! public Iterator iterate() throws HibernateException { return session.iterate(queryString, values.toArray(), (Type[]) types.toArray(NO_TYPES), selection, namedParams); } ! public ScrollableResults scroll() throws HibernateException { return session.scroll(queryString, values.toArray(), (Type[]) types.toArray(NO_TYPES), selection, namedParams); } ! public List list() throws HibernateException { return session.find(queryString, values.toArray(), (Type[]) types.toArray(NO_TYPES), selection, namedParams); } Index: ScrollableResultsImpl.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/impl/ScrollableResultsImpl.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ScrollableResultsImpl.java 12 Jan 2003 07:07:49 -0000 1.4 --- ScrollableResultsImpl.java 14 Jan 2003 13:42:12 -0000 1.5 *************** *** 13,18 **** import net.sf.hibernate.HibernateException; import net.sf.hibernate.ScrollableResults; ! import net.sf.hibernate.engine.*; import net.sf.hibernate.hql.QueryTranslator; import net.sf.hibernate.type.Type; --- 13,19 ---- import net.sf.hibernate.HibernateException; + import net.sf.hibernate.JDBCException; import net.sf.hibernate.ScrollableResults; ! import net.sf.hibernate.engine.SessionImplementor; import net.sf.hibernate.hql.QueryTranslator; import net.sf.hibernate.type.Type; *************** *** 29,34 **** * @see net.sf.hibernate.ScrollableResults#advance(int) */ ! public boolean scroll(int i) throws SQLException, HibernateException { ! return rs.relative(i); } --- 30,40 ---- * @see net.sf.hibernate.ScrollableResults#advance(int) */ ! public boolean scroll(int i) throws HibernateException { ! try { ! return rs.relative(i); ! } ! catch (SQLException sqle) { ! throw new JDBCException(sqle); ! } } *************** *** 36,41 **** * @see net.sf.hibernate.ScrollableResults#first() */ ! public boolean first() throws SQLException, HibernateException { ! return rs.first(); } --- 42,52 ---- * @see net.sf.hibernate.ScrollableResults#first() */ ! public boolean first() throws HibernateException { ! try { ! return rs.first(); ! } ! catch (SQLException sqle) { ! throw new JDBCException(sqle); ! } } *************** *** 43,48 **** * @see net.sf.hibernate.ScrollableResults#last() */ ! public boolean last() throws SQLException, HibernateException { ! return rs.last(); } --- 54,64 ---- * @see net.sf.hibernate.ScrollableResults#last() */ ! public boolean last() throws HibernateException { ! try { ! return rs.last(); ! } ! catch (SQLException sqle) { ! throw new JDBCException(sqle); ! } } *************** *** 50,55 **** * @see net.sf.hibernate.ScrollableResults#advance() */ ! public boolean next() throws SQLException, HibernateException { ! return rs.next(); } --- 66,76 ---- * @see net.sf.hibernate.ScrollableResults#advance() */ ! public boolean next() throws HibernateException { ! try { ! return rs.next(); ! } ! catch (SQLException sqle) { ! throw new JDBCException(sqle); ! } } *************** *** 57,62 **** * @see net.sf.hibernate.ScrollableResults#retreat() */ ! public boolean previous() throws SQLException, HibernateException { ! return rs.previous(); } --- 78,88 ---- * @see net.sf.hibernate.ScrollableResults#retreat() */ ! public boolean previous() throws HibernateException { ! try { ! return rs.previous(); ! } ! catch (SQLException sqle) { ! throw new JDBCException(sqle); ! } } *************** *** 64,71 **** * @see net.sf.hibernate.ScrollableResults#get() */ ! public Object[] get() throws SQLException, HibernateException { Object[] row = new Object[types.length]; for (int i=0; i<types.length; i++) { ! row[i] = types[i].nullSafeGet( rs, names[i], sess, null ); } return row; --- 90,102 ---- * @see net.sf.hibernate.ScrollableResults#get() */ ! public Object[] get() throws HibernateException { Object[] row = new Object[types.length]; for (int i=0; i<types.length; i++) { ! try { ! row[i] = types[i].nullSafeGet( rs, names[i], sess, null ); ! } ! catch (SQLException sqle) { ! throw new JDBCException(sqle); ! } } return row; *************** *** 75,80 **** * @see net.sf.hibernate.ScrollableResults#get(int) */ ! public Object get(int col) throws SQLException, HibernateException { ! return types[col].nullSafeGet( rs, names[col], sess, null ); } --- 106,116 ---- * @see net.sf.hibernate.ScrollableResults#get(int) */ ! public Object get(int col) throws HibernateException { ! try { ! return types[col].nullSafeGet( rs, names[col], sess, null ); ! } ! catch (SQLException sqle) { ! throw new JDBCException(sqle); ! } } *************** *** 103,107 **** */ public BigDecimal getBigDecimal(int col) ! throws SQLException, HibernateException { return (BigDecimal) get(col); } --- 139,143 ---- */ public BigDecimal getBigDecimal(int col) ! throws HibernateException { return (BigDecimal) get(col); } *************** *** 110,114 **** * @see net.sf.hibernate.ScrollableResults#getBinary(int) */ ! public byte[] getBinary(int col) throws SQLException, HibernateException { return (byte[]) get(col); } --- 146,150 ---- * @see net.sf.hibernate.ScrollableResults#getBinary(int) */ ! public byte[] getBinary(int col) throws HibernateException { return (byte[]) get(col); } *************** *** 117,121 **** * @see net.sf.hibernate.ScrollableResults#getBlob(int) */ ! public Blob getBlob(int col) throws SQLException, HibernateException { return (Blob) get(col); } --- 153,157 ---- * @see net.sf.hibernate.ScrollableResults#getBlob(int) */ ! public Blob getBlob(int col) throws HibernateException { return (Blob) get(col); } *************** *** 124,128 **** * @see net.sf.hibernate.ScrollableResults#getClob(int) */ ! public Clob getClob(int col) throws SQLException, HibernateException { return (Clob) get(col); } --- 160,164 ---- * @see net.sf.hibernate.ScrollableResults#getClob(int) */ ! public Clob getClob(int col) throws HibernateException { return (Clob) get(col); } *************** *** 131,135 **** * @see net.sf.hibernate.ScrollableResults#getBoolean(int) */ ! public Boolean getBoolean(int col) throws SQLException, HibernateException { return (Boolean) get(col); } --- 167,171 ---- * @see net.sf.hibernate.ScrollableResults#getBoolean(int) */ ! public Boolean getBoolean(int col) throws HibernateException { return (Boolean) get(col); } *************** *** 138,142 **** * @see net.sf.hibernate.ScrollableResults#getByte(int) */ ! public Byte getByte(int col) throws SQLException, HibernateException { return (Byte) get(col); } --- 174,178 ---- * @see net.sf.hibernate.ScrollableResults#getByte(int) */ ! public Byte getByte(int col) throws HibernateException { return (Byte) get(col); } *************** *** 145,149 **** * @see net.sf.hibernate.ScrollableResults#getCharacter(int) */ ! public Character getCharacter(int col) throws SQLException, HibernateException { return (Character) get(col); } --- 181,185 ---- * @see net.sf.hibernate.ScrollableResults#getCharacter(int) */ ! public Character getCharacter(int col) throws HibernateException { return (Character) get(col); } *************** *** 152,160 **** * @see net.sf.hibernate.ScrollableResults#getDate(int) */ ! public Date getDate(int col) throws SQLException, HibernateException { return (Date) get(col); } ! public Calendar getCalendar(int col) throws SQLException, HibernateException { return (Calendar) get(col); } --- 188,196 ---- * @see net.sf.hibernate.ScrollableResults#getDate(int) */ ! public Date getDate(int col) throws HibernateException { return (Date) get(col); } ! public Calendar getCalendar(int col) throws HibernateException { return (Calendar) get(col); } *************** *** 163,167 **** * @see net.sf.hibernate.ScrollableResults#getDouble(int) */ ! public Double getDouble(int col) throws SQLException, HibernateException { return (Double) get(col); } --- 199,203 ---- * @see net.sf.hibernate.ScrollableResults#getDouble(int) */ ! public Double getDouble(int col) throws HibernateException { return (Double) get(col); } *************** *** 170,174 **** * @see net.sf.hibernate.ScrollableResults#getFloat(int) */ ! public Float getFloat(int col) throws SQLException, HibernateException { return (Float) get(col); } --- 206,210 ---- * @see net.sf.hibernate.ScrollableResults#getFloat(int) */ ! public Float getFloat(int col) throws HibernateException { return (Float) get(col); } *************** *** 177,181 **** * @see net.sf.hibernate.ScrollableResults#getInteger(int) */ ! public Integer getInteger(int col) throws SQLException, HibernateException { return (Integer) get(col); } --- 213,217 ---- * @see net.sf.hibernate.ScrollableResults#getInteger(int) */ ! public Integer getInteger(int col) throws HibernateException { return (Integer) get(col); } *************** *** 184,188 **** * @see net.sf.hibernate.ScrollableResults#getLong(int) */ ! public Long getLong(int col) throws SQLException, HibernateException { return (Long) get(col); } --- 220,224 ---- * @see net.sf.hibernate.ScrollableResults#getLong(int) */ ! public Long getLong(int col) throws HibernateException { return (Long) get(col); } *************** *** 191,195 **** * @see net.sf.hibernate.ScrollableResults#getShort(int) */ ! public Short getShort(int col) throws SQLException, HibernateException { return (Short) get(col); } --- 227,231 ---- * @see net.sf.hibernate.ScrollableResults#getShort(int) */ ! public Short getShort(int col) throws HibernateException { return (Short) get(col); } *************** *** 198,202 **** * @see net.sf.hibernate.ScrollableResults#getString(int) */ ! public String getString(int col) throws SQLException, HibernateException { return (String) get(col); } --- 234,238 ---- * @see net.sf.hibernate.ScrollableResults#getString(int) */ ! public String getString(int col) throws HibernateException { return (String) get(col); } *************** *** 205,210 **** * @see net.sf.hibernate.ScrollableResults#afterLast() */ ! public void afterLast() throws SQLException, HibernateException { ! rs.afterLast(); } --- 241,251 ---- * @see net.sf.hibernate.ScrollableResults#afterLast() */ ! public void afterLast() throws HibernateException { ! try { ! rs.afterLast(); ! } ! catch (SQLException sqle) { ! throw new JDBCException(sqle); ! } } *************** *** 212,217 **** * @see net.sf.hibernate.ScrollableResults#beforeFirst() */ ! public void beforeFirst() throws SQLException, HibernateException { ! rs.beforeFirst(); } --- 253,263 ---- * @see net.sf.hibernate.ScrollableResults#beforeFirst() */ ! public void beforeFirst() throws HibernateException { ! try { ! rs.beforeFirst(); ! } ! catch (SQLException sqle) { ! throw new JDBCException(sqle); ! } } *************** *** 219,224 **** * @see net.sf.hibernate.ScrollableResults#close() */ ! public void close() throws SQLException, HibernateException { ! rs.close(); } --- 265,275 ---- * @see net.sf.hibernate.ScrollableResults#close() */ ! public void close() throws HibernateException { ! try { ! rs.close(); ! } ! catch (SQLException sqle) { ! throw new JDBCException(sqle); ! } } *************** *** 226,230 **** * @see net.sf.hibernate.ScrollableResults#getLocale(int) */ ! public Locale getLocale(int col) throws SQLException, HibernateException { return (Locale) get(col); } --- 277,281 ---- * @see net.sf.hibernate.ScrollableResults#getLocale(int) */ ! public Locale getLocale(int col) throws HibernateException { return (Locale) get(col); } *************** *** 233,237 **** * @see net.sf.hibernate.ScrollableResults#getCurrency(int) */ ! /*public Currency getCurrency(int col) throws SQLException, HibernateException { return (Currency) get(col); }*/ --- 284,288 ---- * @see net.sf.hibernate.ScrollableResults#getCurrency(int) */ ! /*public Currency getCurrency(int col) throws HibernateException { return (Currency) get(col); }*/ *************** *** 240,244 **** * @see net.sf.hibernate.ScrollableResults#getTimeZone(int) */ ! public TimeZone getTimeZone(int col) throws SQLException, HibernateException { return (TimeZone) get(col); } --- 291,295 ---- * @see net.sf.hibernate.ScrollableResults#getTimeZone(int) */ ! public TimeZone getTimeZone(int col) throws HibernateException { return (TimeZone) get(col); } *************** *** 255,260 **** * @see net.sf.hibernate.ScrollableResults#isFirst() */ ! public boolean isFirst() throws SQLException, HibernateException { ! return rs.isFirst(); } --- 306,316 ---- * @see net.sf.hibernate.ScrollableResults#isFirst() */ ! public boolean isFirst() throws HibernateException { ! try { ! return rs.isFirst(); ! } ! catch (SQLException sqle) { ! throw new JDBCException(sqle); ! } } *************** *** 262,267 **** * @see net.sf.hibernate.ScrollableResults#isLast() */ ! public boolean isLast() throws SQLException, HibernateException { ! return rs.isLast(); } --- 318,328 ---- * @see net.sf.hibernate.ScrollableResults#isLast() */ ! public boolean isLast() throws HibernateException { ! try { ! return rs.isLast(); ! } ! catch (SQLException sqle) { ! throw new JDBCException(sqle); ! } } Index: SessionFactoryImpl.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/impl/SessionFactoryImpl.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SessionFactoryImpl.java 5 Jan 2003 02:11:21 -0000 1.4 --- SessionFactoryImpl.java 14 Jan 2003 13:42:13 -0000 1.5 *************** *** 2,6 **** package net.sf.hibernate.impl; - import java.util.HashMap; import java.io.FileInputStream; import java.io.IOException; --- 2,5 ---- *************** *** 18,37 **** import java.sql.SQLException; import java.util.ArrayList; import java.util.Iterator; import java.util.Map; import java.util.Properties; - import java.util.Collections; import javax.xml.transform.Templates; import javax.xml.transform.TransformerFactory; import javax.xml.transform.TransformerFactoryConfigurationError; import javax.xml.transform.stream.StreamSource; - import javax.naming.NamingException; - import javax.naming.Reference; - import javax.naming.StringRefAddr; - - import org.apache.commons.logging.Log; - import org.apache.commons.logging.LogFactory; - import org.apache.commons.collections.ReferenceMap; import net.sf.hibernate.AssertionFailure; --- 17,33 ---- import java.sql.SQLException; import java.util.ArrayList; + import java.util.Collections; + import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Properties; + import javax.naming.NamingException; + import javax.naming.Reference; + import javax.naming.StringRefAddr; import javax.xml.transform.Templates; import javax.xml.transform.TransformerFactory; import javax.xml.transform.TransformerFactoryConfigurationError; import javax.xml.transform.stream.StreamSource; import net.sf.hibernate.AssertionFailure; *************** *** 40,43 **** --- 36,40 ---- import net.sf.hibernate.HibernateException; import net.sf.hibernate.Interceptor; + import net.sf.hibernate.JDBCException; import net.sf.hibernate.MappingException; import net.sf.hibernate.QueryException; *************** *** 45,56 **** import net.sf.hibernate.SessionFactory; import net.sf.hibernate.cache.Timestamper; ! import net.sf.hibernate.collection.*; import net.sf.hibernate.connection.ConnectionProvider; import net.sf.hibernate.connection.ConnectionProviderFactory; ! import net.sf.hibernate.engine.*; ! import net.sf.hibernate.util.JDBCExceptionReporter; ! import net.sf.hibernate.util.PropertiesHelper; ! import net.sf.hibernate.util.ReflectHelper; ! import net.sf.hibernate.util.StringHelper; import net.sf.hibernate.id.IdentifierGenerator; import net.sf.hibernate.id.UUIDHexGenerator; --- 42,53 ---- import net.sf.hibernate.SessionFactory; import net.sf.hibernate.cache.Timestamper; ! import net.sf.hibernate.collection.CollectionPersister; import net.sf.hibernate.connection.ConnectionProvider; import net.sf.hibernate.connection.ConnectionProviderFactory; ! import net.sf.hibernate.dialect.Dialect; ! import net.sf.hibernate.dialect.GenericDialect; ! import net.sf.hibernate.engine.SessionFactoryImplementor; ! import net.sf.hibernate.hql.FilterTranslator; ! import net.sf.hibernate.hql.QueryTranslator; import net.sf.hibernate.id.IdentifierGenerator; import net.sf.hibernate.id.UUIDHexGenerator; *************** *** 59,73 **** import net.sf.hibernate.metadata.ClassMetadata; import net.sf.hibernate.metadata.CollectionMetadata; ! import net.sf.hibernate.persister.*; ! import net.sf.hibernate.ps.*; ! import net.sf.hibernate.hql.FilterTranslator; ! import net.sf.hibernate.hql.QueryTranslator; ! import net.sf.hibernate.dialect.Dialect; ! import net.sf.hibernate.dialect.GenericDialect; import net.sf.hibernate.transaction.JDBCTransactionFactory; import net.sf.hibernate.transaction.TransactionFactory; import net.sf.hibernate.type.Type; import net.sf.hibernate.xml.XMLDatabinder; /** * Concrete implementation of a SessionFactory --- 56,77 ---- import net.sf.hibernate.metadata.ClassMetadata; import net.sf.hibernate.metadata.CollectionMetadata; ! import net.sf.hibernate.persister.ClassPersister; ! import net.sf.hibernate.persister.EntityPersister; ! import net.sf.hibernate.persister.MultiTableEntityPersister; ! import net.sf.hibernate.persister.Queryable; ! import net.sf.hibernate.ps.PreparedStatementCache; import net.sf.hibernate.transaction.JDBCTransactionFactory; import net.sf.hibernate.transaction.TransactionFactory; import net.sf.hibernate.type.Type; + import net.sf.hibernate.util.JDBCExceptionReporter; + import net.sf.hibernate.util.PropertiesHelper; + import net.sf.hibernate.util.ReflectHelper; + import net.sf.hibernate.util.StringHelper; import net.sf.hibernate.xml.XMLDatabinder; + import org.apache.commons.collections.ReferenceMap; + import org.apache.commons.logging.Log; + import org.apache.commons.logging.LogFactory; + /** * Concrete implementation of a SessionFactory *************** *** 209,213 **** collectionPersisters.put( map.getRole(), ! new CollectionPersister(map, datastore, defaultSchema, this) ); } --- 213,217 ---- collectionPersisters.put( map.getRole(), ! new CollectionPersister(map, datastore, this) ); } *************** *** 333,337 **** } ! public Session openSession(Interceptor interceptor) throws SQLException { long timestamp = Timestamper.next();//System.currentTimeMillis(); return openSession( null, true, timestamp, interceptor ); --- 337,341 ---- } ! public Session openSession(Interceptor interceptor) throws HibernateException { long timestamp = Timestamper.next();//System.currentTimeMillis(); return openSession( null, true, timestamp, interceptor ); *************** *** 342,356 **** } ! public Session openSession() throws SQLException { return openSession(interceptor); } ! public Connection openConnection() throws SQLException { ! return connections.getConnection(); } ! public void closeConnection(Connection conn) throws SQLException { ! JDBCExceptionReporter.logWarnings( conn.getWarnings() ); ! conn.clearWarnings(); ! connections.closeConnection(conn); } --- 346,370 ---- } ! public Session openSession() throws HibernateException { return openSession(interceptor); } ! public Connection openConnection() throws HibernateException { ! try { ! return connections.getConnection(); ! } ! catch (SQLException sqle) { ! throw new JDBCException("Cannot open connection", sqle); ! } } ! public void closeConnection(Connection conn) throws HibernateException { ! try { ! JDBCExceptionReporter.logWarnings( conn.getWarnings() ); ! conn.clearWarnings(); ! connections.closeConnection(conn); ! } ! catch (SQLException sqle) { ! throw new JDBCException("Cannot close connection", sqle); ! } } Index: SessionImpl.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/impl/SessionImpl.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SessionImpl.java 9 Jan 2003 12:24:51 -0000 1.7 --- SessionImpl.java 14 Jan 2003 13:42:13 -0000 1.8 *************** *** 28,31 **** --- 28,32 ---- import net.sf.hibernate.HibernateException; import net.sf.hibernate.Interceptor; + import net.sf.hibernate.JDBCException; import net.sf.hibernate.Lifecycle; import net.sf.hibernate.LockMode; *************** *** 353,357 **** } ! public Connection close() throws HibernateException, SQLException { log.trace("closing session"); --- 354,358 ---- } ! public Connection close() throws HibernateException { log.trace("closing session"); *************** *** 486,490 **** * object and returned. */ ! public Serializable save(Object object) throws SQLException, HibernateException { if (object==null) throw new NullPointerException("attempted to save null"); --- 487,491 ---- * object and returned. */ ! public Serializable save(Object object) throws HibernateException { if (object==null) throw new NullPointerException("attempted to save null"); *************** *** 496,500 **** } else { ! Serializable id = getPersister(object).getIdentifierGenerator().generate(this, object); return doSave(object, id); } --- 497,507 ---- } else { ! Serializable id; ! try { ! id = getPersister(object).getIdentifierGenerator().generate(this, object); ! } ! catch (SQLException sqle) { ! throw new JDBCException("Could not save object", sqle); ! } return doSave(object, id); } *************** *** 504,508 **** * Save a transient object with a manually assigned ID. */ ! public void save(Object object, Serializable id) throws SQLException, HibernateException { if (object==null) throw new NullPointerException("attempted to insert null"); --- 511,515 ---- * Save a transient object with a manually assigned ID. */ ! public void save(Object object, Serializable id) throws HibernateException { if (object==null) throw new NullPointerException("attempted to insert null"); *************** *** 522,526 **** } ! private Serializable doSave(Object object, Serializable id) throws SQLException, HibernateException { ClassPersister persister = getPersister(object); --- 529,533 ---- } ! private Serializable doSave(Object object, Serializable id) throws HibernateException { ClassPersister persister = getPersister(object); *************** *** 567,571 **** // cascade-save to many-to-one BEFORE the parent is saved - Cascades.cascade(this, persister, object, Cascades.ACTION_SAVE_UPDATE, Cascades.CASCADE_BEFORE_INSERT_AFTER_DELETE); --- 574,577 ---- *************** *** 587,591 **** if (identityCol) { ! id = persister.insert(values, object, this); key = new Key(id, persister); --- 593,602 ---- if (identityCol) { ! try { ! id = persister.insert(values, object, this); ! } ! catch (SQLException sqle) { ! throw new JDBCException("Could not insert", sqle); ! } key = new Key(id, persister); *************** *** 657,664 **** object = li.getImplementation(); } - catch (SQLException sqle) { - //does not occur - throw new AssertionFailure("Unexpected SQLException occurred in isTransient()", sqle); - } catch (HibernateException he) { //does not occur --- 668,671 ---- *************** *** 710,714 **** * Delete a persistent object */ ! public void delete(Object object) throws SQLException, HibernateException { if (object==null) throw new NullPointerException("attempted to delete null"); --- 717,721 ---- * Delete a persistent object */ ! public void delete(Object object) throws HibernateException { if (object==null) throw new NullPointerException("attempted to delete null"); *************** *** 865,869 **** ! private void removeCollectionsFor(ClassPersister persister, Serializable id, Object object) throws SQLException, HibernateException { if ( persister.hasCollections() ) { Type[] types = persister.getPropertyTypes(); --- 872,876 ---- ! private void removeCollectionsFor(ClassPersister persister, Serializable id, Object object) throws HibernateException { if ( persister.hasCollections() ) { Type[] types = persister.getPropertyTypes(); *************** *** 876,880 **** //TODO: rename this method ! private void removeCollectionsFor(Type type, Serializable id, Object value) throws SQLException, HibernateException { if ( type.isPersistentCollectionType() ) { CollectionPersister role = getCollectionPersister( ( (PersistentCollectionType) type ).getRole() ); --- 883,887 ---- //TODO: rename this method ! private void removeCollectionsFor(Type type, Serializable id, Object value) throws HibernateException { if ( type.isPersistentCollectionType() ) { CollectionPersister role = getCollectionPersister( ( (PersistentCollectionType) type ).getRole() ); *************** *** 909,913 **** //deprecated: ! public void update(Object obj) throws SQLException, HibernateException { if (obj==null) throw new NullPointerException("attempted to update null"); --- 916,920 ---- //deprecated: ! public void update(Object obj) throws HibernateException { if (obj==null) throw new NullPointerException("attempted to update null"); *************** *** 943,947 **** } ! public void saveOrUpdate(Object obj) throws SQLException, HibernateException { if (obj==null) throw new NullPointerException("attempted to update null"); Object object = HibernateProxyHelper.unproxy(obj, this); --- 950,954 ---- } ! public void saveOrUpdate(Object obj) throws HibernateException { if (obj==null) throw new NullPointerException("attempted to update null"); Object object = HibernateProxyHelper.unproxy(obj, this); *************** *** 976,980 **** } ! public void update(Object obj, Serializable id) throws SQLException, HibernateException { if (id==null) throw new NullPointerException("null is not a valid identifier"); if (obj==null) throw new NullPointerException("attempted to update null"); --- 983,987 ---- } ! public void update(Object obj, Serializable id) throws HibernateException { if (id==null) throw new NullPointerException("null is not a valid identifier"); if (obj==null) throw new NullPointerException("attempted to update null"); *************** *** 994,998 **** } ! private void doUpdate(Object object, Object proxy, Serializable id) throws SQLException, HibernateException { ClassPersister persister = getPersister(object); --- 1001,1005 ---- } ! private void doUpdate(Object object, Object proxy, Serializable id) throws HibernateException { ClassPersister persister = getPersister(object); *************** *** 1040,1056 **** * Retrieve a list of persistent objects using a hibernate query */ ! public List find(String query) throws SQLException, HibernateException { return find(query, NO_ARGS, NO_TYPES); } ! public List find(String query, Object value, Type type) throws SQLException, HibernateException { return find( query, new Object[] { value }, new Type[] { type } ); } ! public List find(String query, Object[] values, Type[] types) throws SQLException, HibernateException { return find(query, values, types, null, null); } ! public List find(String query, Object[] values, Type[] types, RowSelection selection, Map namedParams) throws SQLException, HibernateException { if ( log.isTraceEnabled() ) { --- 1047,1063 ---- * Retrieve a list of persistent objects using a hibernate query */ ! public List find(String query) throws HibernateException { return find(query, NO_ARGS, NO_TYPES); } ! public List find(String query, Object value, Type type) throws HibernateException { return find( query, new Object[] { value }, new Type[] { type } ); } ! public List find(String query, Object[] values, Type[] types) throws HibernateException { return find(query, values, types, null, null); } ! public List find(String query, Object[] values, Type[] types, RowSelection selection, Map namedParams) throws HibernateException { if ( log.isTraceEnabled() ) { *************** *** 1068,1073 **** try { for ( int i=0; i<q.length; i++ ) { ! ! List currentResults = q[i].find(this, values, types, true, selection, namedParams); currentResults.addAll(results); results = currentResults; --- 1075,1085 ---- try { for ( int i=0; i<q.length; i++ ) { ! List currentResults; ! try { ! currentResults = q[i].find(this, values, types, true, selection, namedParams); ! } ! catch (SQLException sqle) { ! throw new JDBCException("Could not execute query", sqle); ! } currentResults.addAll(results); results = currentResults; *************** *** 1080,1084 **** } ! private QueryTranslator[] getQueries(String query, boolean scalar) throws HibernateException, SQLException { // a query that names an interface or unmapped class in the from clause --- 1092,1096 ---- } ! private QueryTranslator[] getQueries(String query, boolean scalar) throws HibernateException { // a query that names an interface or unmapped class in the from clause *************** *** 1099,1115 **** } ! public Iterator iterate(String query) throws HibernateException, SQLException { return iterate(query, NO_ARGS, NO_TYPES); } ! public Iterator iterate(String query, Object value, Type type) throws HibernateException, SQLException { return iterate( query, new Object[] { value }, new Type[] { type } ); } ! public Iterator iterate(String query, Object[] values, Type[] types) throws HibernateException, SQLException { return iterate(query, values, types, null, null); } ! public Iterator iterate(String query, Object[] values, Type[] types, RowSelection selection, Map namedParams) throws HibernateException, SQLException { if ( log.isTraceEnabled() ) { --- 1111,1127 ---- } ! public Iterator iterate(String query) throws HibernateException { return iterate(query, NO_ARGS, NO_TYPES); } ! public Iterator iterate(String query, Object value, Type type) throws HibernateException { return iterate( query, new Object[] { value }, new Type[] { type } ); } ! public Iterator iterate(String query, Object[] values, Type[] types) throws HibernateException { return iterate(query, values, types, null, null); } ! public Iterator iterate(String query, Object[] values, Type[] types, RowSelection selection, Map namedParams) throws HibernateException { if ( log.isTraceEnabled() ) { *************** *** 1130,1134 **** for ( int i=0; i<q.length; i++ ) { ! result = q[i].iterate(values, types, selection, namedParams, this); if ( many ) { results[i] = result; --- 1142,1151 ---- for ( int i=0; i<q.length; i++ ) { ! try { ! result = q[i].iterate(values, types, selection, namedParams, this); ! } ! catch (SQLException sqle) { ! throw new JDBCException("Could not execute query", sqle); ! } if ( many ) { results[i] = result; *************** *** 1140,1144 **** } ! public ScrollableResults scroll(String query, Object[] values, Type[] types, RowSelection selection, Map namedParams) throws HibernateException, SQLException { if ( log.isTraceEnabled() ) { --- 1157,1161 ---- } ! public ScrollableResults scroll(String query, Object[] values, Type[] types, RowSelection selection, Map namedParams) throws HibernateException { if ( log.isTraceEnabled() ) { *************** *** 1151,1166 **** QueryTranslator q = factory.getShallowQuery( concreteQueries[0] ); autoFlushIfRequired( q.getQuerySpaces() ); ! return q.scroll(values, types, selection, namedParams, this); } ! public int delete(String query) throws HibernateException, SQLException { return delete(query, NO_ARGS, NO_TYPES); } ! public int delete(String query, Object value, Type type) throws HibernateException, SQLException { return delete( query, new Object[] { value }, new Type[] { type } ); } ! public int delete(String query, Object[] values, Type[] types) throws HibernateException, SQLException { if ( log.isTraceEnabled() ) { --- 1168,1188 ---- QueryTranslator q = factory.getShallowQuery( concreteQueries[0] ); autoFlushIfRequired( q.getQuerySpaces() ); ! try { ! return q.scroll(values, types, selection, namedParams, this); ! } ! catch (SQLException sqle) { ! throw new JDBCException("Could not execute query", sqle); ! } } ! public int delete(String query) throws HibernateException { return delete(query, NO_ARGS, NO_TYPES); } ! public int delete(String query, Object value, Type type) throws HibernateException { return delete( query, new Object[] { value }, new Type[] { type } ); } ! public int delete(String query, Object[] values, Type[] types) throws HibernateException { if ( log.isTraceEnabled() ) { *************** *** 1175,1179 **** } ! public void lock(Object object, LockMode lockMode) throws SQLException, HibernateException { if (object==null) throw new NullPointerException("attempted to lock null"); --- 1197,1201 ---- } ! public void lock(Object object, LockMode lockMode) throws HibernateException { if (object==null) throw new NullPointerException("attempted to lock null"); *************** *** 1198,1201 **** --- 1220,1226 ---- e.lockMode = lockMode; } + catch (SQLException sqle) { + throw new JDBCException("Could not lock object", sqle); + } finally { // the database now holds a lock + the object is flushed from the cache, *************** *** 1226,1230 **** } ! private boolean autoFlushIfRequired(Set querySpaces) throws HibernateException, SQLException { if ( flushMode==FlushMode.AUTO && dontFlushFromFind==0 ) { --- 1251,1255 ---- } ! private boolean autoFlushIfRequired(Set querySpaces) throws HibernateException { if ( flushMode==FlushMode.AUTO && dontFlushFromFind==0 ) { *************** *** 1349,1358 **** } ! public void load(Object object, Serializable id) throws SQLException, HibernateException { if (id==null) throw new NullPointerException("null is not a valid identifier"); doLoadByObject(object, id, true); } ! public Object load(Class clazz, Serializable id) throws SQLException, HibernateException { if (id==null) throw new NullPointerException("null is not a valid identifier"); Object result = doLoadByClass(clazz, id, true, true); --- 1374,1383 ---- } ! public void load(Object object, Serializable id) throws HibernateException { if (id==null) throw new NullPointerException("null is not a valid identifier"); doLoadByObject(object, id, true); } ! public Object load(Class clazz, Serializable id) throws HibernateException { if (id==null) throw new NullPointerException("null is not a valid identifier"); Object result = doLoadByClass(clazz, id, true, true); *************** *** 1395,1399 **** * as the application is concerned. */ ! private void doLoadByObject(Object object, Serializable id, boolean checkDeleted) throws SQLException, HibernateException { Class clazz = object.getClass(); --- 1420,1424 ---- * as the application is concerned. */ ! private void doLoadByObject(Object object, Serializable id, boolean checkDeleted) throws HibernateException { Class clazz = object.getClass(); *************** *** 1417,1421 **** * later. This should return an existing proxy where appropriate. */ ! private Object doLoadByClass(Class clazz, Serializable id, boolean checkDeleted, boolean allowProxyCreation) throws SQLException, HibernateException { if ( log.isTraceEnabled() ) log.trace( "loading " + infoString(clazz, id) ); --- 1442,1446 ---- * later. This should return an existing proxy where appropriate. */ ! private Object doLoadByClass(Class clazz, Serializable id, boolean checkDeleted, boolean allowProxyCreation) throws HibernateException { if ( log.isTraceEnabled() ) log.trace( "loading " + infoString(clazz, id) ); *************** *** 1460,1464 **** } ! public Object loadWithLock(Class clazz, Serializable id) throws SQLException, HibernateException { return load(clazz, id, LockMode.UPGRADE); } --- 1485,1489 ---- } ! public Object loadWithLock(Class clazz, Serializable id) throws HibernateException { return load(clazz, id, LockMode.UPGRADE); } *************** *** 1469,1473 **** * This should return an existing proxy where appropriate. */ ! public Object load(Class clazz, Serializable id, LockMode lockMode) throws SQLException, HibernateException { if (lockMode==LockMode.WRITE) throw new HibernateException("Invalid lock mode for load()"); --- 1494,1498 ---- * This should return an existing proxy where appropriate. */ ! public Object load(Class clazz, Serializable id, LockMode lockMode) throws HibernateException { if (lockMode==LockMode.WRITE) throw new HibernateException("Invalid lock mode for load()"); *************** *** 1507,1511 **** LockMode lockMode, boolean checkDeleted ! ) throws SQLException, HibernateException { //DONT need to flush before a load by id --- 1532,1536 ---- LockMode lockMode, boolean checkDeleted ! ) throws HibernateException { //DONT need to flush before a load by id *************** *** 1537,1541 **** addEntry(result, LOADING, null, id, null, LockMode.NONE, true, subclassPersister); //make it circular-reference safe addEntity( new Key(id, persister), result ); ! Object[] values = entry.assemble(result, id, subclassPersister, this); // intializes cached by side-effect Type[] types = subclassPersister.getPropertyTypes(); TypeFactory.deepCopy(values, types, values); --- 1562,1572 ---- addEntry(result, LOADING, null, id, null, LockMode.NONE, true, subclassPersister); //make it circular-reference safe addEntity( new Key(id, persister), result ); ! Object[] values; ! try { ! values = entry.assemble(result, id, subclassPersister, this); // intializes cached by side-effect ! } ! catch (SQLException sqle) { ! throw new JDBCException("Could not reassemble cached object", sqle); ! } Type[] types = subclassPersister.getPropertyTypes(); TypeFactory.deepCopy(values, types, values); *************** *** 1553,1557 **** //otherwise go ahead and load it! // Note: you can't use "for update" with an outer join ! return persister.load(id, optionalObject, lockMode, this); } --- 1584,1593 ---- //otherwise go ahead and load it! // Note: you can't use "for update" with an outer join ! try { ! return persister.load(id, optionalObject, lockMode, this); ! } ! catch (SQLException sqle) { ! throw new JDBCException("Could not load object", sqle); ! } } *************** *** 1561,1565 **** } ! public void refresh(Object object) throws SQLException, HibernateException { if (object==null) throw new NullPointerException("attempted to refresh null"); --- 1597,1601 ---- } ! public void refresh(Object object) throws HibernateException { if (object==null) throw new NullPointerException("attempted to refresh null"); *************** *** 1571,1575 **** removeEntity( new Key(e.id, e.persister) ); ! e.persister.load( e.id, object, LockMode.READ, this); getEntry(object).lockMode = e.lockMode; } --- 1607,1616 ---- removeEntity( new Key(e.id, e.persister) ); ! try { ! e.persister.load( e.id, object, LockMode.READ, this); ! } ! catch (SQLException sqle) { ! throw new JDBCException("Could not refresh object", sqle); ! } getEntry(object).lockMode = e.lockMode; } *************** *** 1621,1625 **** * holding. If they had a nonpersistable collection, substitute a persistable one */ ! public void flush() throws SQLException, HibernateException { flushEverything(); execute(); --- 1662,1666 ---- * holding. If they had a nonpersistable collection, substitute a persistable one */ ! public void flush() throws HibernateException { flushEverything(); execute(); *************** *** 1627,1631 **** } ! private void flushEverything() throws HibernateException, SQLException { log.trace("flushing session"); --- 1668,1672 ---- } ! private void flushEverything() throws HibernateException { log.trace("flushing session"); *************** *** 1674,1687 **** ! private void execute() throws SQLException, HibernateException { log.trace("Executing"); ! executeAll( insertions.iterator() ); ! executeAll( updates.values().iterator() ); ! executeAll( collectionRemovals.iterator() ); ! executeAll( collectionUpdates.iterator() ); ! executeAll( collectionCreations.iterator() ); ! executeAll( deletions.iterator() ); } --- 1715,1733 ---- ! private void execute() throws HibernateException { log.trace("Executing"); ! try { ! executeAll( insertions.iterator() ); ! executeAll( updates.values().iterator() ); ! executeAll( collectionRemovals.iterator() ); ! executeAll( collectionUpdates.iterator() ); ! executeAll( collectionCreations.iterator() ); ! executeAll( deletions.iterator() ); ! } ! catch (SQLException sqle) { ! throw new JDBCException("Could not synchronize database state with session", sqle); ! } } *************** *** 1704,1708 **** } ! private void flushEntities() throws HibernateException, SQLException { log.trace("Flushing entities and processing referenced collections"); --- 1750,1754 ---- } ! private void flushEntities() throws HibernateException { log.trace("Flushing entities and processing referenced collections"); *************** *** 1835,1839 **** } ! private void preFlushEntities() throws HibernateException, SQLException { Iterator iter = entries.entrySet().iterator(); --- 1881,1885 ---- } ! private void preFlushEntities() throws HibernateException { Iterator iter = entries.entrySet().iterator(); *************** *** 1896,1900 **** // COLLECTIONS /////////////////////////////////////////////////////////////////// ! private void flushCollections() throws HibernateException, SQLException { log.trace("Processing unreferenced collections"); --- 1942,1946 ---- // COLLECTIONS /////////////////////////////////////////////////////////////////// ! private void flushCollections() throws HibernateException { log.trace("Processing unreferenced collections"); *************** *** 2028,2032 **** * circular or shared references between/to collections. */ ! private void updateReachableCollection(PersistentCollection coll, Type type, Object owner) throws HibernateException, SQLException { CollectionEntry ce = getCollectionEntry(coll); --- 2074,2078 ---- * circular or shared references between/to collections. */ ! private void updateReachableCollection(PersistentCollection coll, Type type, Object owner) throws HibernateException { CollectionEntry ce = getCollectionEntry(coll); *************** *** 2058,2062 **** * If so, recursively update contained collections */ ! private void updateReachable(Object obj, Type type, Object owner) throws HibernateException, SQLException { // This method assumes wrap was already called on obj! --- 2104,2108 ---- * If so, recursively update contained collections */ ! private void updateReachable(Object obj, Type type, Object owner) throws HibernateException { // This method assumes wrap was already called on obj! *************** *** 2089,2093 **** } ! private void updateUnreachableCollection(PersistentCollection coll) throws HibernateException, SQLException { CollectionEntry entry = getCollectionEntry(coll); if ( log.isDebugEnabled() && entry.loadedPersister!=null ) log.debug( --- 2135,2139 ---- } ! private void updateUnreachableCollection(PersistentCollection coll) throws HibernateException { CollectionEntry entry = getCollectionEntry(coll); if ( log.isDebugEnabled() && entry.loadedPersister!=null ) log.debug( *************** *** 2101,2105 **** } ! private void prepareCollectionForUpdate(PersistentCollection coll, CollectionEntry entry) throws HibernateException, SQLException { if (entry.processed) throw new AssertionFailure("Hibernate has a bug processing collections"); --- 2147,2151 ---- } ! private void prepareCollectionForUpdate(PersistentCollection coll, CollectionEntry entry) throws HibernateException { if (entry.processed) throw new AssertionFailure("Hibernate has a bug processing collections"); *************** *** 2136,2140 **** * Given an array of fields, search recursively for collections and update them */ ! private void updateReachables( Object[] fields, Type[] types, Object owner ) throws HibernateException, SQLException { // This method assumes wrap was already called on fields --- 2182,2186 ---- * Given an array of fields, search recursively for collections and update them */ ! private void updateReachables( Object[] fields, Type[] types, Object owner ) throws HibernateException { // This method assumes wrap was already called on fields *************** *** 2265,2269 **** } ! public Connection connection() throws HibernateException, SQLException { if (connection==null) { if (connect) { --- 2311,2315 ---- } ! public Connection connection() throws HibernateException { if (connection==null) { if (connect) { *************** *** 2282,2286 **** } ! public Connection disconnect() throws HibernateException, SQLException { log.debug("disconnecting session"); --- 2328,2332 ---- } ! public Connection disconnect() throws HibernateException { log.debug("disconnecting session"); *************** *** 2316,2320 **** } ! public void reconnect() throws SQLException, HibernateException { if ( isConnected() ) throw new HibernateException("Session already connected"); --- 2362,2366 ---- } ! public void reconnect() throws HibernateException { if ( isConnected() ) throw new HibernateException("Session already connected"); *************** *** 2351,2358 **** } ! public static void handle(Exception e) throws SQLException, HibernateException { ! if (e instanceof SQLException) { ! throw (SQLException) e; ! } if (e instanceof HibernateException) { throw (HibernateException) e; --- 2397,2401 ---- } ! public static void handle(Exception e) throws HibernateException { if (e instanceof HibernateException) { throw (HibernateException) e; *************** *** 2367,2379 **** * @see net.sf.hibernate.Session#filter(Collection, String) */ ! public Collection filter(Object collection, String filter) throws SQLException, HibernateException { return filter( collection, filter, new Object[1], new Type[1], null, null ); } ! public Collection filter(Object collection, String filter, Object value, Type type) throws SQLException, HibernateException { return filter(collection, filter, new Object[] { null, value }, new Type[] { null, type }, null, null ); } ! public Collection filter(Object collection, String filter, Object[] values, Type[] types) throws SQLException, HibernateException { Object[] vals = new Object[ values.length + 1 ]; Type[] typs = new Type[ types.length + 1]; --- 2410,2422 ---- * @see net.sf.hibernate.Session#filter(Collection, String) */ ! public Collection filter(Object collection, String filter) throws HibernateException { return filter( collection, filter, new Object[1], new Type[1], null, null ); } ! public Collection filter(Object collection, String filter, Object value, Type type) throws HibernateException { return filter(collection, filter, new Object[] { null, value }, new Type[] { null, type }, null, null ); } ! public Collection filter(Object collection, String filter, Object[] values, Type[] types) throws HibernateException { Object[] vals = new Object[ values.length + 1 ]; Type[] typs = new Type[ types.length + 1]; *************** *** 2384,2388 **** ! private FilterTranslator getFilterTranslator(Object collection, String filter, Object[] values, Type[] types, RowSelection selection, Map namedParams, boolean scalar) throws SQLException, HibernateException { if ( log.isTraceEnabled() ) { --- 2427,2431 ---- ! private FilterTranslator getFilterTranslator(Object collection, String filter, Object[] values, Type[] types, RowSelection selection, Map namedParams, boolean scalar) throws HibernateException { if ( log.isTraceEnabled() ) { *************** *** 2421,2425 **** } ! public List filter(Object collection, String filter, Object[] values, Type[] types, RowSelection selection, Map namedParams) throws SQLException, HibernateException { String[] concreteFilters = QueryTranslator.concreteQueries(filter, factory); --- 2464,2468 ---- } ! public List filter(Object collection, String filter, Object[] values, Type[] types, RowSelection selection, Map namedParams) throws HibernateException { String[] concreteFilters = QueryTranslator.concreteQueries(filter, factory); *************** *** 2435,2439 **** try { for ( int i=0; i<concreteFilters.length; i++ ) { ! List currentResults = filters[i].find(this, values, types, true, selection, namedParams); currentResults.addAll(results); results = currentResults; --- 2478,2488 ---- try { for ( int i=0; i<concreteFilters.length; i++ ) { ! List currentResults; ! try { ! currentResults = filters[i].find(this, values, types, true, selection, namedParams); ! } ! catch (SQLException sqle) { ! throw new JDBCException("Could not execute query", sqle); ! } currentResults.addAll(results); results = currentResults; *************** *** 2447,2451 **** } ! public Iterator iterateFilter(Object collection, String filter, Object[] values, Type[] types, RowSelection selection, Map namedParams) throws SQLException, HibernateException { String[] concreteFilters = QueryTranslator.concreteQueries(filter, factory); --- 2496,2500 ---- } ! public Iterator iterateFilter(Object collection, String filter, Object[] values, Type[] types, RowSelection selection, Map namedParams) throws HibernateException { String[] concreteFilters = QueryTranslator.concreteQueries(filter, factory); *************** *** 2466,2470 **** for ( int i=0; i<filters.length; i++ ) { ! result = filters[i].iterate(values, types, selection, namedParams, this); if ( many ) { results[i] = result; --- 2515,2524 ---- for ( int i=0; i<filters.length; i++ ) { ! try { ! result = filters[i].iterate(values, types, selection, namedParams, this); ! } ! catch (SQLException sqle) { ! throw new JDBCException("Could not execute query", sqle); ! } if ( many ) { results[i] = result; |
From: <one...@us...> - 2003-01-14 13:42:49
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/mapping In directory sc8-pr-cvs1:/tmp/cvs-serv19888/net/sf/hibernate/mapping Modified Files: ForeignKey.java Log Message: wrap all SQLExceptions fixed a bug in SchemaExport where generated foreign key constraints did not used qualified tablename for referenced table Index: ForeignKey.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/mapping/ForeignKey.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ForeignKey.java 5 Jan 2003 02:11:22 -0000 1.3 --- ForeignKey.java 14 Jan 2003 13:42:15 -0000 1.4 *************** *** 24,28 **** i++; } ! return d.getAddForeignKeyConstraintString(constraintName, cols, referencedTable.getName(), refcols); } public Table getReferencedTable() { --- 24,28 ---- i++; } ! return d.getAddForeignKeyConstraintString(constraintName, cols, referencedTable.getQualifiedName(), refcols); } public Table getReferencedTable() { |
From: <one...@us...> - 2003-01-14 13:42:48
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/jmx In directory sc8-pr-cvs1:/tmp/cvs-serv19888/net/sf/hibernate/jmx Modified Files: SessionFactoryStub.java Log Message: wrap all SQLExceptions fixed a bug in SchemaExport where generated foreign key constraints did not used qualified tablename for referenced table Index: SessionFactoryStub.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/jmx/SessionFactoryStub.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SessionFactoryStub.java 5 Jan 2003 02:11:21 -0000 1.3 --- SessionFactoryStub.java 14 Jan 2003 13:42:15 -0000 1.4 *************** *** 5,9 **** import java.io.ObjectStreamException; import java.sql.Connection; - import java.sql.SQLException; import java.util.Map; import java.util.Properties; --- 5,8 ---- *************** *** 64,68 **** } ! public Session openSession() throws SQLException { return getImpl().openSession(); } --- 63,67 ---- } ! public Session openSession() throws HibernateException { return getImpl().openSession(); } *************** *** 138,142 **** } ! public Session openSession(Interceptor interceptor) throws SQLException { return getImpl().openSession(interceptor); } --- 137,141 ---- } ! public Session openSession(Interceptor interceptor) throws HibernateException { return getImpl().openSession(interceptor); } |
From: <one...@us...> - 2003-01-14 13:42:44
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/engine In directory sc8-pr-cvs1:/tmp/cvs-serv19888/net/sf/hibernate/engine Modified Files: Cascades.java SessionFactoryImplementor.java SessionImplementor.java Log Message: wrap all SQLExceptions fixed a bug in SchemaExport where generated foreign key constraints did not used qualified tablename for referenced table Index: Cascades.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/engine/Cascades.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Cascades.java 5 Jan 2003 02:11:20 -0000 1.4 --- Cascades.java 14 Jan 2003 13:42:08 -0000 1.5 *************** *** 3,7 **** import java.io.Serializable; - import java.sql.SQLException; import java.util.Iterator; --- 3,6 ---- *************** *** 39,43 **** * cascade the action to the child object */ ! abstract void cascade(Session session, Object child) throws SQLException, HibernateException; /** * Should this action be cascaded to the given (possibly uninitialized) collection? --- 38,42 ---- * cascade the action to the child object */ ! abstract void cascade(Session session, Object child) throws HibernateException; /** * Should this action be cascaded to the given (possibly uninitialized) collection? *************** *** 50,54 **** */ public static final CascadingAction ACTION_DELETE = new CascadingAction() { ! void cascade(Session session, Object child) throws SQLException, HibernateException { log.trace("cacading to delete()"); session.delete(child); --- 49,53 ---- */ public static final CascadingAction ACTION_DELETE = new CascadingAction() { ! void cascade(Session session, Object child) throws HibernateException { log.trace("cacading to delete()"); session.delete(child); *************** *** 63,67 **** */ public static final CascadingAction ACTION_SAVE_UPDATE = new CascadingAction() { ! void cascade(Session session, Object child) throws SQLException, HibernateException { if ( !(child instanceof HibernateProxy) || --- 62,66 ---- */ public static final CascadingAction ACTION_SAVE_UPDATE = new CascadingAction() { ! void cascade(Session session, Object child) throws HibernateException { if ( !(child instanceof HibernateProxy) || *************** *** 204,208 **** * Cascade an action to the child */ ! private static void cascade(SessionImplementor session, Object child, Type type, CascadingAction action, int cascadeTo) throws SQLException, HibernateException { if (child!=null) { if ( type.isAssociationType() ) { --- 203,207 ---- * Cascade an action to the child */ ! private static void cascade(SessionImplementor session, Object child, Type type, CascadingAction action, int cascadeTo) throws HibernateException { if (child!=null) { if ( type.isAssociationType() ) { *************** *** 264,268 **** * Cascade an action from the parent object to all its children */ ! public static void cascade(SessionImplementor session, ClassPersister persister, Object parent, Cascades.CascadingAction action, int cascadeTo) throws SQLException, HibernateException { if ( persister.hasCascades() ) { // performance opt if ( log.isTraceEnabled() ) log.trace( "processing cascades for: " + persister.getClassName() ); --- 263,267 ---- * Cascade an action from the parent object to all its children */ ! public static void cascade(SessionImplementor session, ClassPersister persister, Object parent, Cascades.CascadingAction action, int cascadeTo) throws HibernateException { if ( persister.hasCascades() ) { // performance opt if ( log.isTraceEnabled() ) log.trace( "processing cascades for: " + persister.getClassName() ); Index: SessionFactoryImplementor.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/engine/SessionFactoryImplementor.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SessionFactoryImplementor.java 5 Jan 2003 02:11:20 -0000 1.4 --- SessionFactoryImplementor.java 14 Jan 2003 13:42:09 -0000 1.5 *************** *** 65,73 **** * Obtain a JDBC connection */ ! public Connection openConnection() throws SQLException; /** * Release a JDBC connection */ ! public void closeConnection(Connection conn) throws SQLException; /** * Get the names of all persistent classes that implement/extend the given interface/class --- 65,73 ---- * Obtain a JDBC connection */ ! public Connection openConnection() throws HibernateException; /** * Release a JDBC connection */ ! public void closeConnection(Connection conn) throws HibernateException; /** * Get the names of all persistent classes that implement/extend the given interface/class Index: SessionImplementor.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/engine/SessionImplementor.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SessionImplementor.java 5 Jan 2003 02:11:20 -0000 1.4 --- SessionImplementor.java 14 Jan 2003 13:42:10 -0000 1.5 *************** *** 109,130 **** * Execute a <tt>find()</tt> query */ ! public List find(String query, Object[] values, Type[] types, RowSelection selection, Map namedParams) throws SQLException, HibernateException; /** * Execute an <tt>iterate()</tt> query */ ! public Iterator iterate(String query, Object[] values, Type[] types, RowSelection selection, Map namedParams) throws SQLException, HibernateException; /** * Execute a <tt>scroll()</tt> query */ ! public ScrollableResults scroll(String query, Object[] values, Type[] types, RowSelection selection, Map namedParams) throws SQLException, HibernateException; /** * Execute a filter */ ! public List filter(Object collection, String filter, Object[] values, Type[] types, RowSelection selection, Map namedParams) throws SQLException, HibernateException; /** * Iterate a filter */ ! public Iterator iterateFilter(Object collection, String filter, Object[] values, Type[] types, RowSelection selection, Map namedParams) throws SQLException, HibernateException; /** * Get the <tt>ClassPersister</tt> for an object --- 109,130 ---- * Execute a <tt>find()</tt> query */ ! public List find(String query, Object[] values, Type[] types, RowSelection selection, Map namedParams) throws HibernateException; /** * Execute an <tt>iterate()</tt> query */ ! public Iterator iterate(String query, Object[] values, Type[] types, RowSelection selection, Map namedParams) throws HibernateException; /** * Execute a <tt>scroll()</tt> query */ ! public ScrollableResults scroll(String query, Object[] values, Type[] types, RowSelection selection, Map namedParams) throws HibernateException; /** * Execute a filter */ ! public List filter(Object collection, String filter, Object[] values, Type[] types, RowSelection selection, Map namedParams) throws HibernateException; /** * Iterate a filter */ ! public Iterator iterateFilter(Object collection, String filter, Object[] values, Type[] types, RowSelection selection, Map namedParams) throws HibernateException; /** * Get the <tt>ClassPersister</tt> for an object |
From: <one...@us...> - 2003-01-14 13:42:41
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/collection In directory sc8-pr-cvs1:/tmp/cvs-serv19888/net/sf/hibernate/collection Modified Files: CollectionPersister.java ODMGCollection.java Log Message: wrap all SQLExceptions fixed a bug in SchemaExport where generated foreign key constraints did not used qualified tablename for referenced table Index: CollectionPersister.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/collection/CollectionPersister.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CollectionPersister.java 5 Jan 2003 02:11:20 -0000 1.3 --- CollectionPersister.java 14 Jan 2003 13:42:07 -0000 1.4 *************** *** 86,90 **** ! public CollectionPersister(Collection collection, DatastoreImpl datastore, String defaultSchema, SessionFactoryImplementor factory) throws MappingException, CacheException { collectionType = collection.getType(); --- 86,90 ---- ! public CollectionPersister(Collection collection, DatastoreImpl datastore, SessionFactoryImplementor factory) throws MappingException, CacheException { collectionType = collection.getType(); *************** *** 128,137 **** } Table table = associatedClass.getTable(); ! qualifiedTableName = table.getQualifiedName(defaultSchema); enableJoinedFetch = OuterJoinLoader.EAGER; } else { Table table = collection.getTable(); ! qualifiedTableName = table.getQualifiedName(defaultSchema); elementType = collection.getElement().getType(); span = collection.getElement().getColumnSpan(); --- 128,137 ---- } Table table = associatedClass.getTable(); ! qualifiedTableName = table.getQualifiedName( factory.getDefaultSchema() ); enableJoinedFetch = OuterJoinLoader.EAGER; } else { Table table = collection.getTable(); ! qualifiedTableName = table.getQualifiedName( factory.getDefaultSchema() ); elementType = collection.getElement().getType(); span = collection.getElement().getColumnSpan(); Index: ODMGCollection.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/collection/ODMGCollection.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ODMGCollection.java 5 Jan 2003 02:11:20 -0000 1.4 --- ODMGCollection.java 14 Jan 2003 13:42:08 -0000 1.5 *************** *** 2,6 **** package net.sf.hibernate.collection; - import java.sql.SQLException; import java.util.Iterator; --- 2,5 ---- *************** *** 58,64 **** throw new QueryInvalidException( he.getMessage() ); } - catch (SQLException sqle) { - throw new QueryInvalidException( sqle.getMessage() ); - } } --- 57,60 ---- *************** *** 72,78 **** catch (HibernateException he) { throw new QueryInvalidException( he.getMessage() ); - } - catch (SQLException sqle) { - throw new QueryInvalidException( sqle.getMessage() ); } } --- 68,71 ---- |
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate In directory sc8-pr-cvs1:/tmp/cvs-serv19888/net/sf/hibernate Modified Files: Query.java ScrollableResults.java Session.java SessionFactory.java Transaction.java Log Message: wrap all SQLExceptions fixed a bug in SchemaExport where generated foreign key constraints did not used qualified tablename for referenced table Index: Query.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/Query.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Query.java 5 Jan 2003 02:11:19 -0000 1.3 --- Query.java 14 Jan 2003 13:42:06 -0000 1.4 *************** *** 4,8 **** import java.io.Serializable; import java.math.BigDecimal; - import java.sql.SQLException; import java.util.Calendar; import java.util.Collection; --- 4,7 ---- *************** *** 75,79 **** * @throws HibernateException */ ! public Iterator iterate() throws SQLException, HibernateException; /** * Return the query results as <tt>ScrollableResults</tt>. The --- 74,78 ---- * @throws HibernateException */ ! public Iterator iterate() throws HibernateException; /** * Return the query results as <tt>ScrollableResults</tt>. The *************** *** 89,93 **** * @throws HibernateException */ ! public ScrollableResults scroll() throws SQLException, HibernateException; /** * Return the query results as a <tt>List</tt>. If the query contains --- 88,92 ---- * @throws HibernateException */ ! public ScrollableResults scroll() throws HibernateException; /** * Return the query results as a <tt>List</tt>. If the query contains *************** *** 99,103 **** * @throws HibernateException */ ! public List list() throws SQLException, HibernateException; /** --- 98,102 ---- * @throws HibernateException */ ! public List list() throws HibernateException; /** Index: ScrollableResults.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/ScrollableResults.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ScrollableResults.java 12 Jan 2003 07:07:48 -0000 1.4 --- ScrollableResults.java 14 Jan 2003 13:42:06 -0000 1.5 *************** *** 5,9 **** import java.sql.Blob; import java.sql.Clob; - import java.sql.SQLException; import java.util.Calendar; import java.util.Date; --- 5,8 ---- *************** *** 30,34 **** * @return <tt>true</tt> if there is another result */ ! public boolean next() throws SQLException, HibernateException; /** * Retreat to the previous result --- 29,33 ---- * @return <tt>true</tt> if there is another result */ ! public boolean next() throws HibernateException; /** * Retreat to the previous result *************** *** 36,40 **** * @return <tt>true</tt> if there is a previous result */ ! public boolean previous() throws SQLException, HibernateException; /** * Scroll an arbitrary number of locations --- 35,39 ---- * @return <tt>true</tt> if there is a previous result */ ! public boolean previous() throws HibernateException; /** * Scroll an arbitrary number of locations *************** *** 42,66 **** * @return <tt>true</tt> if there is a result at the new location */ ! public boolean scroll(int i) throws SQLException, HibernateException; /** * Go to the last result * @return <tt>true</tt> if there are any results */ ! public boolean last() throws SQLException, HibernateException; /** * Go to the first result * @return <tt>true</tt> if there are any results */ ! public boolean first() throws SQLException, HibernateException; /** * Go to a location just before first result (this is the initial location) * @return <tt>true</tt> if there are any results */ ! public void beforeFirst() throws SQLException, HibernateException; /** * Go to a location just after the last result * @return <tt>true</tt> if there are any results */ ! public void afterLast() throws SQLException, HibernateException; /** * Is this the first result? --- 41,65 ---- * @return <tt>true</tt> if there is a result at the new location */ ! public boolean scroll(int i) throws HibernateException; /** * Go to the last result * @return <tt>true</tt> if there are any results */ ! public boolean last() throws HibernateException; /** * Go to the first result * @return <tt>true</tt> if there are any results */ ! public boolean first() throws HibernateException; /** * Go to a location just before first result (this is the initial location) * @return <tt>true</tt> if there are any results */ ! public void beforeFirst() throws HibernateException; /** * Go to a location just after the last result * @return <tt>true</tt> if there are any results */ ! public void afterLast() throws HibernateException; /** * Is this the first result? *************** *** 70,74 **** * @throws HibernateException */ ! public boolean isFirst() throws SQLException, HibernateException; /** * Is this the last result? --- 69,73 ---- * @throws HibernateException */ ! public boolean isFirst() throws HibernateException; /** * Is this the last result? *************** *** 78,91 **** * @throws HibernateException */ ! public boolean isLast() throws SQLException, HibernateException; /** * Release resources immediately. */ ! public void close() throws SQLException, HibernateException; /** * Get the current row of results * @return an object or array */ ! public Object[] get() throws SQLException, HibernateException; /** * Get the <tt>i</tt>th object in the current row of results, without --- 77,90 ---- * @throws HibernateException */ ! public boolean isLast() throws HibernateException; /** * Release resources immediately. */ ! public void close() throws HibernateException; /** * Get the current row of results * @return an object or array */ ! public Object[] get() throws HibernateException; /** * Get the <tt>i</tt>th object in the current row of results, without *************** *** 96,100 **** * @return an object of any Hibernate type or <tt>null</tt> */ ! public Object get(int i) throws SQLException, HibernateException; /** --- 95,99 ---- * @return an object of any Hibernate type or <tt>null</tt> */ ! public Object get(int i) throws HibernateException; /** *************** *** 108,180 **** * Convenience method to read an <tt>integer</tt> */ ! public Integer getInteger(int col) throws SQLException, HibernateException; /** * Convenience method to read a <tt>long</tt> */ ! public Long getLong(int col) throws SQLException, HibernateException; /** * Convenience method to read a <tt>float</tt> */ ! public Float getFloat(int col) throws SQLException, HibernateException; /** * Convenience method to read a <tt>boolean</tt> */ ! public Boolean getBoolean(int col) throws SQLException, HibernateException; /** * Convenience method to read a <tt>double</tt> */ ! public Double getDouble(int col) throws SQLException, HibernateException; /** * Convenience method to read a <tt>short</tt> */ ! public Short getShort(int col) throws SQLException, HibernateException; /** * Convenience method to read a <tt>byte</tt> */ ! public Byte getByte(int col) throws SQLException, HibernateException; /** * Convenience method to read a <tt>character</tt> */ ! public Character getCharacter(int col) throws SQLException, HibernateException; /** * Convenience method to read a <tt>binary</tt> */ ! 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> */ ! public String getString(int col) throws SQLException, HibernateException; /** * Convenience method to read a <tt>big_decimal</tt> */ ! public BigDecimal getBigDecimal(int col) throws SQLException, HibernateException; /** * Convenience method to read a <tt>date</tt>, <tt>time</tt> or <tt>timestamp</tt> */ ! public Date getDate(int col) throws SQLException, HibernateException; /** * Convenience method to read a <tt>locale</tt> */ ! public Locale getLocale(int col) throws SQLException, HibernateException; /** * Convenience method to read a <tt>calendar</tt> or <tt>calendar_date</tt> */ ! public Calendar getCalendar(int col) throws SQLException, HibernateException; /** * Convenience method to read a <tt>currency</tt> */ ! //public Currency getCurrency(int col) throws SQLException, HibernateException; /** * Convenience method to read a <tt>timezone</tt> */ ! public TimeZone getTimeZone(int col) throws SQLException, HibernateException; } --- 107,179 ---- * Convenience method to read an <tt>integer</tt> */ ! public Integer getInteger(int col) throws HibernateException; /** * Convenience method to read a <tt>long</tt> */ ! public Long getLong(int col) throws HibernateException; /** * Convenience method to read a <tt>float</tt> */ ! public Float getFloat(int col) throws HibernateException; /** * Convenience method to read a <tt>boolean</tt> */ ! public Boolean getBoolean(int col) throws HibernateException; /** * Convenience method to read a <tt>double</tt> */ ! public Double getDouble(int col) throws HibernateException; /** * Convenience method to read a <tt>short</tt> */ ! public Short getShort(int col) throws HibernateException; /** * Convenience method to read a <tt>byte</tt> */ ! public Byte getByte(int col) throws HibernateException; /** * Convenience method to read a <tt>character</tt> */ ! public Character getCharacter(int col) throws HibernateException; /** * Convenience method to read a <tt>binary</tt> */ ! public byte[] getBinary(int col) throws HibernateException; /** * Convenience method to read a <tt>blob</tt> */ ! public Blob getBlob(int col) throws HibernateException; /** * Convenience method to read a <tt>clob</tt> */ ! public Clob getClob(int col) throws HibernateException; /** * Convenience method to read a <tt>string</tt> */ ! public String getString(int col) throws HibernateException; /** * Convenience method to read a <tt>big_decimal</tt> */ ! public BigDecimal getBigDecimal(int col) throws HibernateException; /** * Convenience method to read a <tt>date</tt>, <tt>time</tt> or <tt>timestamp</tt> */ ! public Date getDate(int col) throws HibernateException; /** * Convenience method to read a <tt>locale</tt> */ ! public Locale getLocale(int col) throws HibernateException; /** * Convenience method to read a <tt>calendar</tt> or <tt>calendar_date</tt> */ ! public Calendar getCalendar(int col) throws HibernateException; /** * Convenience method to read a <tt>currency</tt> */ ! //public Currency getCurrency(int col) throws HibernateException; /** * Convenience method to read a <tt>timezone</tt> */ ! public TimeZone getTimeZone(int col) throws HibernateException; } Index: Session.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/Session.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Session.java 9 Jan 2003 12:24:49 -0000 1.4 --- Session.java 14 Jan 2003 13:42:07 -0000 1.5 *************** *** 4,8 **** import net.sf.hibernate.type.Type; import java.io.Serializable; - import java.sql.SQLException; import java.sql.Connection; import java.util.Collection; --- 4,7 ---- *************** *** 75,79 **** * @throws HibernateException */ ! public void flush() throws SQLException, HibernateException; /** --- 74,78 ---- * @throws HibernateException */ ! public void flush() throws HibernateException; /** *************** *** 102,106 **** * @throws SQLException */ ! public Connection connection() throws SQLException, HibernateException; /** --- 101,105 ---- * @throws SQLException */ ! public Connection connection() throws HibernateException; /** *************** *** 116,120 **** * @see Session#reconnect() */ ! public Connection disconnect() throws SQLException, HibernateException; /** --- 115,119 ---- * @see Session#reconnect() */ ! public Connection disconnect() throws HibernateException; /** *************** *** 125,129 **** * @see Session#disconnect() */ ! public void reconnect() throws SQLException, HibernateException; /** --- 124,128 ---- * @see Session#disconnect() */ ! public void reconnect() throws HibernateException; /** *************** *** 147,151 **** * @throws HibernateException */ ! public Connection close() throws SQLException, HibernateException; /** --- 146,150 ---- * @throws HibernateException */ ! public Connection close() throws HibernateException; /** *************** *** 185,189 **** * @throws HibernateException */ ! public Object load(Class theClass, Serializable id, LockMode lockMode) throws SQLException, HibernateException; /** --- 184,188 ---- * @throws HibernateException */ ! public Object load(Class theClass, Serializable id, LockMode lockMode) throws HibernateException; /** *************** *** 196,200 **** * @throws HibernateException */ ! public Object load(Class theClass, Serializable id) throws SQLException, HibernateException; /** --- 195,199 ---- * @throws HibernateException */ ! public Object load(Class theClass, Serializable id) throws HibernateException; /** *************** *** 206,210 **** * @throws HibernateException */ ! public void load(Object object, Serializable id) throws SQLException, HibernateException; /** --- 205,209 ---- * @throws HibernateException */ ! public void load(Object object, Serializable id) throws HibernateException; /** *************** *** 218,222 **** * @throws HibernateException */ ! public Serializable save(Object object) throws SQLException, HibernateException; /** --- 217,221 ---- * @throws HibernateException */ ! public Serializable save(Object object) throws HibernateException; /** *************** *** 228,232 **** * @throws HibernateException */ ! public void save(Object object, Serializable id) throws SQLException, HibernateException; /** --- 227,231 ---- * @throws HibernateException */ ! public void save(Object object, Serializable id) throws HibernateException; /** *************** *** 242,246 **** * @throws HibernateException */ ! public void saveOrUpdate(Object object) throws SQLException, HibernateException; /** --- 241,245 ---- * @throws HibernateException */ ! public void saveOrUpdate(Object object) throws HibernateException; /** *************** *** 259,263 **** * @throws HibernateException */ ! public void update(Object object) throws SQLException, HibernateException; /** --- 258,262 ---- * @throws HibernateException */ ! public void update(Object object) throws HibernateException; /** *************** *** 274,278 **** * @throws HibernateException */ ! public void update(Object object, Serializable id) throws SQLException, HibernateException; /** --- 273,277 ---- * @throws HibernateException */ ! public void update(Object object, Serializable id) throws HibernateException; /** *************** *** 285,289 **** * @throws HibernateException */ ! public void delete(Object object) throws SQLException, HibernateException; /** --- 284,288 ---- * @throws HibernateException */ ! public void delete(Object object) throws HibernateException; /** *************** *** 295,299 **** * @throws HibernateException */ ! public List find(String query) throws SQLException, HibernateException; /** --- 294,298 ---- * @throws HibernateException */ ! public List find(String query) throws HibernateException; /** *************** *** 308,312 **** * @throws HibernateException */ ! public List find(String query, Object value, Type type) throws SQLException, HibernateException; /** --- 307,311 ---- * @throws HibernateException */ ! public List find(String query, Object value, Type type) throws HibernateException; /** *************** *** 321,325 **** * @throws HibernateException */ ! public List find(String query, Object[] values, Type[] types) throws SQLException, HibernateException; /** --- 320,324 ---- * @throws HibernateException */ ! public List find(String query, Object[] values, Type[] types) throws HibernateException; /** *************** *** 336,340 **** * @throws HibernateException */ ! public Iterator iterate(String query) throws SQLException, HibernateException; /** --- 335,339 ---- * @throws HibernateException */ ! public Iterator iterate(String query) throws HibernateException; /** *************** *** 354,358 **** * @throws HibernateException */ ! public Iterator iterate(String query, Object value, Type type) throws SQLException, HibernateException; /** --- 353,357 ---- * @throws HibernateException */ ! public Iterator iterate(String query, Object value, Type type) throws HibernateException; /** *************** *** 372,376 **** * @throws HibernateException */ ! public Iterator iterate(String query, Object[] values, Type[] types) throws SQLException, HibernateException; /** --- 371,375 ---- * @throws HibernateException */ ! public Iterator iterate(String query, Object[] values, Type[] types) throws HibernateException; /** *************** *** 385,389 **** * @throws HibernateException */ ! public Collection filter(Object collection, String filter) throws SQLException, HibernateException; /** --- 384,388 ---- * @throws HibernateException */ ! public Collection filter(Object collection, String filter) throws HibernateException; /** *************** *** 399,403 **** * @throws HibernateException */ ! public Collection filter(Object collection, String filter, Object value, Type type) throws SQLException, HibernateException; /** --- 398,402 ---- * @throws HibernateException */ ! public Collection filter(Object collection, String filter, Object value, Type type) throws HibernateException; /** *************** *** 413,417 **** * @throws HibernateException */ ! public Collection filter(Object collection, String filter, Object[] values, Type[] types) throws SQLException, HibernateException; /** --- 412,416 ---- * @throws HibernateException */ ! public Collection filter(Object collection, String filter, Object[] values, Type[] types) throws HibernateException; /** *************** *** 423,427 **** * @throws HibernateException */ ! public int delete(String query) throws SQLException, HibernateException; /** --- 422,426 ---- * @throws HibernateException */ ! public int delete(String query) throws HibernateException; /** *************** *** 435,439 **** * @throws HibernateException */ ! public int delete(String query, Object value, Type type) throws SQLException, HibernateException; /** --- 434,438 ---- * @throws HibernateException */ ! public int delete(String query, Object value, Type type) throws HibernateException; /** *************** *** 447,451 **** * @throws HibernateException */ ! public int delete(String query, Object[] values, Type[] types) throws SQLException, HibernateException; /** --- 446,450 ---- * @throws HibernateException */ ! public int delete(String query, Object[] values, Type[] types) throws HibernateException; /** *************** *** 457,461 **** * @throws HibernateException */ ! public void lock(Object object, LockMode lockMode) throws SQLException, HibernateException; /** --- 456,460 ---- * @throws HibernateException */ ! public void lock(Object object, LockMode lockMode) throws HibernateException; /** *************** *** 474,478 **** * @throws SQLException */ ! public void refresh(Object object) throws SQLException, HibernateException; /** --- 473,477 ---- * @throws SQLException */ ! public void refresh(Object object) throws HibernateException; /** Index: SessionFactory.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/SessionFactory.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SessionFactory.java 5 Jan 2003 02:11:19 -0000 1.3 --- SessionFactory.java 14 Jan 2003 13:42:07 -0000 1.4 *************** *** 3,7 **** import java.io.Serializable; - import java.sql.SQLException; import java.sql.Connection; import java.util.Map; --- 3,6 ---- *************** *** 136,140 **** * @throws SQLException */ ! public Session openSession(Interceptor interceptor) throws SQLException; /** --- 135,139 ---- * @throws SQLException */ ! public Session openSession(Interceptor interceptor) throws HibernateException; /** *************** *** 153,157 **** * @throws SQLException */ ! public Session openSession() throws SQLException; /** --- 152,156 ---- * @throws SQLException */ ! public Session openSession() throws HibernateException; /** Index: Transaction.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/Transaction.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Transaction.java 9 Jan 2003 12:24:50 -0000 1.4 --- Transaction.java 14 Jan 2003 13:42:07 -0000 1.5 *************** *** 2,7 **** package net.sf.hibernate; - import java.sql.SQLException; - /** * Allows the application to define units of work, while --- 2,5 ---- *************** *** 32,38 **** * * @throws HibernateException - * @throws SQLException only when <tt>flush()</tt> fails */ ! public void commit() throws HibernateException, SQLException; /** --- 30,35 ---- * * @throws HibernateException */ ! public void commit() throws HibernateException; /** |
From: <one...@us...> - 2003-01-14 13:42:40
|
Update of /cvsroot/hibernate/Hibernate2/src In directory sc8-pr-cvs1:/tmp/cvs-serv19888 Modified Files: hibernate.properties Log Message: wrap all SQLExceptions fixed a bug in SchemaExport where generated foreign key constraints did not used qualified tablename for referenced table Index: hibernate.properties =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/hibernate.properties,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** hibernate.properties 13 Jan 2003 13:03:50 -0000 1.9 --- hibernate.properties 14 Jan 2003 13:42:05 -0000 1.10 *************** *** 36,54 **** ## DB2 ! #hibernate.dialect net.sf.hibernate.dialect.DB2Dialect ! #hibernate.connection.driver_class COM.ibm.db2.jdbc.app.DB2Driver ! #hibernate.connection.url jdbc:db2:test ! #hibernate.connection.username db2 ! #hibernate.connection.password db2 ## MySQL ! hibernate.dialect net.sf.hibernate.dialect.MySQLDialect ! hibernate.connection.driver_class org.gjt.mm.mysql.Driver ! hibernate.connection.driver_class com.mysql.jdbc.Driver ! hibernate.connection.url jdbc:mysql:///test ! hibernate.connection.username root ! hibernate.connection.password --- 36,54 ---- ## DB2 ! hibernate.dialect net.sf.hibernate.dialect.DB2Dialect ! hibernate.connection.driver_class COM.ibm.db2.jdbc.app.DB2Driver ! hibernate.connection.url jdbc:db2:test ! hibernate.connection.username db2 ! hibernate.connection.password db2 ## MySQL ! #hibernate.dialect net.sf.hibernate.dialect.MySQLDialect ! #hibernate.connection.driver_class org.gjt.mm.mysql.Driver ! #hibernate.connection.driver_class com.mysql.jdbc.Driver ! #hibernate.connection.url jdbc:mysql:///test ! #hibernate.connection.username root ! #hibernate.connection.password |
From: <one...@us...> - 2003-01-14 13:01:12
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/map In directory sc8-pr-cvs1:/tmp/cvs-serv31865/hibernate/map Modified Files: ForeignKey.java Log Message: fixed a bug in SchemaExport where generated foreign key constraints did not used qualified tablename for referenced table Index: ForeignKey.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/map/ForeignKey.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ForeignKey.java 26 Nov 2002 03:35:43 -0000 1.12 --- ForeignKey.java 14 Jan 2003 13:01:09 -0000 1.13 *************** *** 24,32 **** i++; } ! return d.getAddForeignKeyConstraintString(constraintName, cols, referencedTable.getName(), refcols); } public Table getReferencedTable() { return referencedTable; } public void setReferencedTable(Table referencedTable) throws MappingException { if ( referencedTable.getPrimaryKey().getColumnSpan()!=getColumnSpan() ) --- 24,34 ---- i++; } ! return d.getAddForeignKeyConstraintString(constraintName, cols, referencedTable.getQualifiedName(), refcols); } + public Table getReferencedTable() { return referencedTable; } + public void setReferencedTable(Table referencedTable) throws MappingException { if ( referencedTable.getPrimaryKey().getColumnSpan()!=getColumnSpan() ) *************** *** 45,48 **** --- 47,51 ---- return referencedClass; } + public void setReferencedClass(Class referencedClass) { this.referencedClass = referencedClass; |
From: <one...@us...> - 2003-01-14 13:01:12
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/impl In directory sc8-pr-cvs1:/tmp/cvs-serv31865/hibernate/impl Modified Files: CollectionPersister.java SessionFactoryImpl.java Log Message: fixed a bug in SchemaExport where generated foreign key constraints did not used qualified tablename for referenced table Index: CollectionPersister.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/impl/CollectionPersister.java,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -d -r1.87 -r1.88 *** CollectionPersister.java 1 Jan 2003 15:04:09 -0000 1.87 --- CollectionPersister.java 14 Jan 2003 13:01:08 -0000 1.88 *************** *** 2,9 **** package cirrus.hibernate.impl; - import java.sql.*; import java.io.InvalidObjectException; import java.io.ObjectStreamException; import java.io.Serializable; import java.util.Iterator; import java.util.StringTokenizer; --- 2,11 ---- package cirrus.hibernate.impl; import java.io.InvalidObjectException; import java.io.ObjectStreamException; import java.io.Serializable; + import java.sql.PreparedStatement; + import java.sql.ResultSet; + import java.sql.SQLException; import java.util.Iterator; import java.util.StringTokenizer; *************** *** 12,20 **** import org.apache.commons.logging.LogFactory; import cirrus.hibernate.helpers.JDBCExceptionReporter; import cirrus.hibernate.helpers.StringHelper; import cirrus.hibernate.id.IdentifierGenerator; ! import cirrus.hibernate.loader.*; ! import cirrus.hibernate.map.*; import cirrus.hibernate.metadata.CollectionMetadata; import cirrus.hibernate.type.AbstractComponentType; --- 14,35 ---- import org.apache.commons.logging.LogFactory; + import cirrus.hibernate.HibernateException; + import cirrus.hibernate.MappingException; + import cirrus.hibernate.cache.CacheConcurrencyStrategy; + import cirrus.hibernate.cache.CacheException; + import cirrus.hibernate.collections.PersistentCollection; + import cirrus.hibernate.engine.SessionFactoryImplementor; + import cirrus.hibernate.engine.SessionImplementor; import cirrus.hibernate.helpers.JDBCExceptionReporter; import cirrus.hibernate.helpers.StringHelper; import cirrus.hibernate.id.IdentifierGenerator; ! import cirrus.hibernate.loader.CollectionInitializer; ! import cirrus.hibernate.loader.CollectionLoader; ! import cirrus.hibernate.loader.OneToManyLoader; ! import cirrus.hibernate.loader.OuterJoinLoader; ! import cirrus.hibernate.map.Collection; ! import cirrus.hibernate.map.Column; ! import cirrus.hibernate.map.PersistentClass; ! import cirrus.hibernate.map.Table; import cirrus.hibernate.metadata.CollectionMetadata; import cirrus.hibernate.type.AbstractComponentType; *************** *** 22,31 **** import cirrus.hibernate.type.PersistentCollectionType; import cirrus.hibernate.type.Type; - import cirrus.hibernate.HibernateException; - import cirrus.hibernate.MappingException; - import cirrus.hibernate.cache.CacheConcurrencyStrategy; - import cirrus.hibernate.cache.CacheException; - import cirrus.hibernate.collections.PersistentCollection; - import cirrus.hibernate.engine.*; /** --- 37,40 ---- *************** *** 81,85 **** ! public CollectionPersister(Collection collection, DatastoreImpl datastore, String defaultSchema, SessionFactoryImplementor factory) throws MappingException, CacheException { collectionType = collection.getType(); --- 90,94 ---- ! public CollectionPersister(Collection collection, DatastoreImpl datastore, SessionFactoryImplementor factory) throws MappingException, CacheException { collectionType = collection.getType(); *************** *** 130,139 **** } Table table = associatedClass.getTable(); ! qualifiedTableName = table.getQualifiedName(defaultSchema); enableJoinedFetch = OuterJoinLoader.EAGER; } else { Table table = collection.getTable(); ! qualifiedTableName = table.getQualifiedName(defaultSchema); elementType = collection.getElement().getType(); span = collection.getElement().getColumnSpan(); --- 139,148 ---- } Table table = associatedClass.getTable(); ! qualifiedTableName = table.getQualifiedName( factory.getDefaultSchema() ); enableJoinedFetch = OuterJoinLoader.EAGER; } else { Table table = collection.getTable(); ! qualifiedTableName = table.getQualifiedName( factory.getDefaultSchema() ); elementType = collection.getElement().getType(); span = collection.getElement().getColumnSpan(); Index: SessionFactoryImpl.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/impl/SessionFactoryImpl.java,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** SessionFactoryImpl.java 28 Dec 2002 02:25:49 -0000 1.61 --- SessionFactoryImpl.java 14 Jan 2003 13:01:09 -0000 1.62 *************** *** 2,6 **** package cirrus.hibernate.impl; - import java.util.HashMap; import java.io.FileInputStream; import java.io.IOException; --- 2,5 ---- *************** *** 18,37 **** import java.sql.SQLException; import java.util.ArrayList; import java.util.Iterator; import java.util.Map; import java.util.Properties; - import java.util.Collections; import javax.xml.transform.Templates; import javax.xml.transform.TransformerFactory; import javax.xml.transform.TransformerFactoryConfigurationError; import javax.xml.transform.stream.StreamSource; - import javax.naming.NamingException; - import javax.naming.Reference; - import javax.naming.StringRefAddr; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; - import org.apache.commons.collections.ReferenceMap; import cirrus.hibernate.AssertionFailure; --- 17,37 ---- import java.sql.SQLException; import java.util.ArrayList; + import java.util.Collections; + import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Properties; + import javax.naming.NamingException; + import javax.naming.Reference; + import javax.naming.StringRefAddr; import javax.xml.transform.Templates; import javax.xml.transform.TransformerFactory; import javax.xml.transform.TransformerFactoryConfigurationError; import javax.xml.transform.stream.StreamSource; + import org.apache.commons.collections.ReferenceMap; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import cirrus.hibernate.AssertionFailure; *************** *** 47,51 **** import cirrus.hibernate.connection.ConnectionProvider; import cirrus.hibernate.connection.ConnectionProviderFactory; ! import cirrus.hibernate.engine.*; import cirrus.hibernate.helpers.JDBCExceptionReporter; import cirrus.hibernate.helpers.PropertiesHelper; --- 47,51 ---- import cirrus.hibernate.connection.ConnectionProvider; import cirrus.hibernate.connection.ConnectionProviderFactory; ! import cirrus.hibernate.engine.SessionFactoryImplementor; import cirrus.hibernate.helpers.JDBCExceptionReporter; import cirrus.hibernate.helpers.PropertiesHelper; *************** *** 58,63 **** import cirrus.hibernate.metadata.ClassMetadata; import cirrus.hibernate.metadata.CollectionMetadata; ! import cirrus.hibernate.persister.*; ! import cirrus.hibernate.ps.*; import cirrus.hibernate.query.FilterTranslator; import cirrus.hibernate.query.QueryTranslator; --- 58,66 ---- import cirrus.hibernate.metadata.ClassMetadata; import cirrus.hibernate.metadata.CollectionMetadata; ! import cirrus.hibernate.persister.ClassPersister; ! import cirrus.hibernate.persister.EntityPersister; ! import cirrus.hibernate.persister.MultiTableEntityPersister; ! import cirrus.hibernate.persister.Queryable; ! import cirrus.hibernate.ps.PreparedStatementCache; import cirrus.hibernate.query.FilterTranslator; import cirrus.hibernate.query.QueryTranslator; *************** *** 208,212 **** collectionPersisters.put( map.getRole(), ! new CollectionPersister(map, datastore, defaultSchema, this) ); } --- 211,215 ---- collectionPersisters.put( map.getRole(), ! new CollectionPersister(map, datastore, this) ); } |
From: <one...@us...> - 2003-01-13 14:49:20
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/id In directory sc8-pr-cvs1:/tmp/cvs-serv7259/src/net/sf/hibernate/id Removed Files: HiLoGenerator.java Log Message: removed obsolete generator class --- HiLoGenerator.java DELETED --- |
From: <one...@us...> - 2003-01-13 13:05:48
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/proxy In directory sc8-pr-cvs1:/tmp/cvs-serv11899/hibernate/proxy Modified Files: SerializableProxy.java Log Message: fixed bug finding properties inherited by interfaces added ScrollableResults.isFirst(), isLast() Index: SerializableProxy.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/proxy/SerializableProxy.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SerializableProxy.java 26 Nov 2002 03:35:44 -0000 1.3 --- SerializableProxy.java 13 Jan 2003 13:05:45 -0000 1.4 *************** *** 7,12 **** import org.apache.commons.logging.LogFactory; - import cirrus.hibernate.helpers.ReflectHelper; - /** * Serializable placeholder for <tt>CGLIB</tt> proxies --- 7,10 ---- *************** *** 14,17 **** --- 12,21 ---- public final class SerializableProxy implements Serializable { + private Class persistentClass; + private Class[] interfaces; + private Serializable id; + private String getIdentifierMethodName; + private Class getIdentifierMethodClass; + public SerializableProxy() {} *************** *** 20,31 **** this.interfaces = interfaces; this.id = id; ! this.getIdentifierMethod = (getIdentifierMethod==null) ? null : getIdentifierMethod.getName(); } - private Class persistentClass; - private Class[] interfaces; - private Serializable id; - private String getIdentifierMethod; - Object readResolve() { try { --- 24,33 ---- this.interfaces = interfaces; this.id = id; ! if (getIdentifierMethod!=null) { ! getIdentifierMethodName = getIdentifierMethod.getName(); ! getIdentifierMethodClass = getIdentifierMethod.getDeclaringClass(); ! } } Object readResolve() { try { *************** *** 33,37 **** persistentClass, interfaces, ! (getIdentifierMethod==null) ? null : ReflectHelper.getMethod(persistentClass, getIdentifierMethod), id, null --- 35,39 ---- persistentClass, interfaces, ! (getIdentifierMethodName==null) ? null : getIdentifierMethodClass.getDeclaredMethod(getIdentifierMethodName, null), id, null |
From: <one...@us...> - 2003-01-13 13:05:48
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/impl In directory sc8-pr-cvs1:/tmp/cvs-serv11899/hibernate/impl Modified Files: ScrollableResultsImpl.java Log Message: fixed bug finding properties inherited by interfaces added ScrollableResults.isFirst(), isLast() Index: ScrollableResultsImpl.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/impl/ScrollableResultsImpl.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ScrollableResultsImpl.java 15 Dec 2002 05:12:41 -0000 1.9 --- ScrollableResultsImpl.java 13 Jan 2003 13:05:45 -0000 1.10 *************** *** 215,218 **** --- 215,232 ---- rs.beforeFirst(); } + + /** + * @see net.sf.hibernate.ScrollableResults#isFirst() + */ + public boolean isFirst() throws SQLException, HibernateException { + return rs.isFirst(); + } + + /** + * @see net.sf.hibernate.ScrollableResults#isLast() + */ + public boolean isLast() throws SQLException, HibernateException { + return rs.isLast(); + } /** |
From: <one...@us...> - 2003-01-13 13:05:47
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/helpers In directory sc8-pr-cvs1:/tmp/cvs-serv11899/hibernate/helpers Modified Files: ReflectHelper.java Log Message: fixed bug finding properties inherited by interfaces added ScrollableResults.isFirst(), isLast() Index: ReflectHelper.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/helpers/ReflectHelper.java,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** ReflectHelper.java 9 Jan 2003 09:40:18 -0000 1.38 --- ReflectHelper.java 13 Jan 2003 13:05:45 -0000 1.39 *************** *** 2,6 **** package cirrus.hibernate.helpers; ! import java.beans.*; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; --- 2,6 ---- package cirrus.hibernate.helpers; ! import java.beans.Introspector; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; *************** *** 9,28 **** import java.lang.reflect.Modifier; ! import cirrus.hibernate.*; ! import cirrus.hibernate.type.*; import cirrus.hibernate.type.Type; public final class ReflectHelper { ! private static final Class[] NO_CLASSES = new Class[0]; private static final Class[] OBJECT = new Class[] { Object.class }; private static final Method OBJECT_EQUALS; ! public static final class Setter { private Class clazz; private final Method method; private final String propertyName; ! private Setter(Class clazz, Method method, String propertyName) { this.clazz=clazz; --- 9,32 ---- import java.lang.reflect.Modifier; ! import cirrus.hibernate.AssertionFailure; ! import cirrus.hibernate.HibernateException; ! import cirrus.hibernate.MappingException; ! import cirrus.hibernate.PropertyAccessException; ! import cirrus.hibernate.PropertyNotFoundException; import cirrus.hibernate.type.Type; + import cirrus.hibernate.type.TypeFactory; public final class ReflectHelper { ! private static final Class[] NO_CLASSES = new Class[0]; private static final Class[] OBJECT = new Class[] { Object.class }; private static final Method OBJECT_EQUALS; ! public static final class Setter { private Class clazz; private final Method method; private final String propertyName; ! private Setter(Class clazz, Method method, String propertyName) { this.clazz=clazz; *************** *** 30,34 **** this.propertyName=propertyName; } ! public void set(Object target, Object value) throws HibernateException { try { --- 34,38 ---- this.propertyName=propertyName; } ! public void set(Object target, Object value) throws HibernateException { try { *************** *** 51,70 **** } catch (IllegalArgumentException iae) { ! if (value == null) { ! throw new PropertyAccessException(iae, "IllegalArgumentException (null value) occurred while calling", true, clazz, propertyName); ! } ! else { ! throw new PropertyAccessException(iae, "IllegalArgumentException occurred while calling", true, clazz, propertyName); ! } } } ! } ! public static final class Getter { private Class clazz; private final Method method; private final String propertyName; ! private Getter(Class clazz, Method method, String propertyName) { this.clazz=clazz; --- 55,69 ---- } catch (IllegalArgumentException iae) { ! throw new PropertyAccessException(iae, "IllegalArgumentException occurred while calling", true, clazz, propertyName); } } ! } ! public static final class Getter { private Class clazz; private final Method method; private final String propertyName; ! private Getter(Class clazz, Method method, String propertyName) { this.clazz=clazz; *************** *** 72,76 **** this.propertyName=propertyName; } ! public Object get(Object target) throws HibernateException { try { --- 71,75 ---- this.propertyName=propertyName; } ! public Object get(Object target) throws HibernateException { try { *************** *** 88,102 **** } } ! public Class getReturnType() { return method.getReturnType(); } ! public Method getMethod() { return method; } ! } ! static { Method eq; --- 87,101 ---- } } ! public Class getReturnType() { return method.getReturnType(); } ! public Method getMethod() { return method; } ! } ! static { Method eq; *************** *** 109,113 **** OBJECT_EQUALS = eq; } ! public static boolean overridesEquals(Class clazz) { Method equals; --- 108,112 ---- OBJECT_EQUALS = eq; } ! public static boolean overridesEquals(Class clazz) { Method equals; *************** *** 120,172 **** return !OBJECT_EQUALS.equals(equals); } ! ! ! public static Method getMethod(Class theClass, String methodName) throws PropertyNotFoundException { ! ! if (theClass==Object.class || theClass==null) throw new PropertyNotFoundException( "Could not find a setter" ); // will be swallowed ! ! Method result; ! try { ! result = theClass.getDeclaredMethod(methodName, null); ! } ! catch (Exception e) { ! try { ! return getMethod( theClass.getSuperclass(), methodName ); ! } ! catch (PropertyNotFoundException me) { ! throw new PropertyNotFoundException( "Could not find method " + methodName + " in class " + theClass.getName() ); ! } ! } ! ! if ( !ReflectHelper.isPublic(theClass, result) ) result.setAccessible(true); return result; - } ! ! public static Setter getSetter(Class theClass, String propertyName) throws PropertyNotFoundException { ! ! if (theClass==Object.class || theClass==null) throw new PropertyNotFoundException( "Could not find a setter" ); // will be swallowed ! ! Method result = setter(theClass, propertyName); ! ! if(result==null) { ! try { ! return getSetter( theClass.getSuperclass(), propertyName ); ! } ! catch (PropertyNotFoundException me) { ! throw new PropertyNotFoundException( "Could not find a setter for " + propertyName + " in class " + theClass.getName() ); ! } } else { ! if ( !ReflectHelper.isPublic(theClass, result) ) result.setAccessible(true); ! return new Setter(theClass, result, propertyName); } ! } ! ! private static Method setter(Class theClass, String propertyName) throws PropertyNotFoundException { ! ! Class returnType = getGetter(theClass, propertyName).getReturnType(); ! Method[] methods = theClass.getDeclaredMethods(); Method potentialSetter = null; --- 119,156 ---- return !OBJECT_EQUALS.equals(equals); } ! ! public static Setter getSetter(Class theClass, String propertyName) throws PropertyNotFoundException { ! Setter result = getSetterOrNull(theClass, propertyName); ! if (result==null) throw new PropertyNotFoundException( "Could not find a setter for property " + propertyName + " in class " + theClass.getName() ); return result; } ! ! private static Setter getSetterOrNull(Class theClass, String propertyName) { ! ! if (theClass==Object.class || theClass==null) return null; ! ! Method method = setterMethod(theClass, propertyName); ! ! if(method!=null) { ! if ( !ReflectHelper.isPublic(theClass, method) ) method.setAccessible(true); ! return new Setter(theClass, method, propertyName); } else { ! Setter setter = getSetterOrNull( theClass.getSuperclass(), propertyName ); ! if (setter==null) { ! Class[] interfaces = theClass.getInterfaces(); ! for ( int i=0; setter==null && i<interfaces.length; i++ ) { ! setter=getSetterOrNull( interfaces[i], propertyName ); ! } ! } ! return setter; } ! } ! ! private static Method setterMethod(Class theClass, String propertyName) { ! ! Class returnType = getGetterOrNull(theClass, propertyName).getReturnType(); ! Method[] methods = theClass.getDeclaredMethods(); Method potentialSetter = null; *************** *** 183,187 **** ) { potentialSetter = methods[i]; ! if ( methods[i].getParameterTypes()[0].equals(returnType) ) return potentialSetter; } } --- 167,171 ---- ) { potentialSetter = methods[i]; ! if ( returnType==null || methods[i].getParameterTypes()[0].equals(returnType) ) return potentialSetter; } } *************** *** 189,223 **** return potentialSetter; } ! public static Getter getGetter(Class theClass, String propertyName) throws PropertyNotFoundException { ! ! if (theClass==Object.class || theClass==null) throw new PropertyNotFoundException( "Could not find a getter" ); // will be swallowed ! ! Method result = getter(theClass, propertyName); ! ! if(result==null) { ! try { ! return getGetter( theClass.getSuperclass(), propertyName ); ! } ! catch (PropertyNotFoundException me) { ! throw new PropertyNotFoundException( "Could not find a getter for " + propertyName + " in class " + theClass.getName() ); ! } } else { ! if ( !ReflectHelper.isPublic(theClass, result) ) result.setAccessible(true); ! return new Getter(theClass, result, propertyName); } } ! ! private static Method getter(Class theClass, String propertyName) { ! Method[] methods = theClass.getDeclaredMethods(); for (int i=0; i<methods.length; i++) { // only carry on if the method has no parameters if(methods[i].getParameterTypes().length==0) { ! // try "get" if( (methods[i].getName().length() > 3) && methods[i].getName().startsWith("get") ) { ! String testStdMethod = Introspector.decapitalize( methods[i].getName().substring(3) ); String testOldMethod = methods[i].getName().substring(3); --- 173,216 ---- return potentialSetter; } ! public static Getter getGetter(Class theClass, String propertyName) throws PropertyNotFoundException { ! Getter result = getGetterOrNull(theClass, propertyName); ! if (result==null) throw new PropertyNotFoundException( "Could not find a getter for " + propertyName + " in class " + theClass.getName() ); ! return result; ! ! } ! ! private static Getter getGetterOrNull(Class theClass, String propertyName) { ! ! if (theClass==Object.class || theClass==null) return null; ! ! Method method = getterMethod(theClass, propertyName); ! ! if(method!=null) { ! if ( !ReflectHelper.isPublic(theClass, method) ) method.setAccessible(true); ! return new Getter(theClass, method, propertyName); } else { ! Getter getter = getGetterOrNull( theClass.getSuperclass(), propertyName ); ! if (getter==null) { ! Class[] interfaces = theClass.getInterfaces(); ! for ( int i=0; getter==null && i<interfaces.length; i++ ) { ! getter=getGetterOrNull( interfaces[i], propertyName ); ! } ! } ! return getter; } } ! ! private static Method getterMethod(Class theClass, String propertyName) { ! Method[] methods = theClass.getDeclaredMethods(); for (int i=0; i<methods.length; i++) { // only carry on if the method has no parameters if(methods[i].getParameterTypes().length==0) { ! // try "get" if( (methods[i].getName().length() > 3) && methods[i].getName().startsWith("get") ) { ! String testStdMethod = Introspector.decapitalize( methods[i].getName().substring(3) ); String testOldMethod = methods[i].getName().substring(3); *************** *** 226,235 **** methods[i].getParameterTypes().length==0 ) return methods[i]; ! } ! // if not "get" then try "is" if( (methods[i].getName().length() > 2) && methods[i].getName().startsWith("is") ) { ! String testStdMethod = Introspector.decapitalize( methods[i].getName().substring(2) ); String testOldMethod = methods[i].getName().substring(2); --- 219,228 ---- methods[i].getParameterTypes().length==0 ) return methods[i]; ! } ! // if not "get" then try "is" if( (methods[i].getName().length() > 2) && methods[i].getName().startsWith("is") ) { ! String testStdMethod = Introspector.decapitalize( methods[i].getName().substring(2) ); String testOldMethod = methods[i].getName().substring(2); *************** *** 243,251 **** return null; } ! public static Type reflectedPropertyType(Class theClass, String name) throws MappingException { return TypeFactory.hueristicType( getGetter(theClass, name).getReturnType().getName() ); } ! public static Class classForName(String name) throws ClassNotFoundException { try { --- 236,244 ---- return null; } ! public static Type reflectedPropertyType(Class theClass, String name) throws MappingException { return TypeFactory.hueristicType( getGetter(theClass, name).getReturnType().getName() ); } ! public static Class classForName(String name) throws ClassNotFoundException { try { *************** *** 256,264 **** } } ! public static boolean isPublic(Class clazz, Member member) { return Modifier.isPublic( member.getModifiers() ) && Modifier.isPublic( clazz.getModifiers() ); } ! public static Object getConstantValue(String name) { Class clazz; --- 249,257 ---- } } ! public static boolean isPublic(Class clazz, Member member) { return Modifier.isPublic( member.getModifiers() ) && Modifier.isPublic( clazz.getModifiers() ); } ! public static Object getConstantValue(String name) { Class clazz; *************** *** 276,284 **** } } ! public static Constructor getDefaultConstructor(Class clazz) throws PropertyNotFoundException { ! if (isAbstractClass(clazz)) return null; ! try { Constructor constructor = clazz.getDeclaredConstructor(NO_CLASSES); --- 269,277 ---- } } ! public static Constructor getDefaultConstructor(Class clazz) throws PropertyNotFoundException { ! if (isAbstractClass(clazz)) return null; ! try { Constructor constructor = clazz.getDeclaredConstructor(NO_CLASSES); *************** *** 287,291 **** } return constructor; ! } catch (NoSuchMethodException nme) { throw new PropertyNotFoundException( "Object class " + clazz.getName() + --- 280,285 ---- } return constructor; ! } ! catch (NoSuchMethodException nme) { throw new PropertyNotFoundException( "Object class " + clazz.getName() + *************** *** 293,299 **** ); } ! } ! public static boolean isAbstractClass(Class clazz) { int modifier = clazz.getModifiers(); --- 287,293 ---- ); } ! } ! public static boolean isAbstractClass(Class clazz) { int modifier = clazz.getModifiers(); |
From: <one...@us...> - 2003-01-13 13:05:47
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate In directory sc8-pr-cvs1:/tmp/cvs-serv11899/hibernate Modified Files: ScrollableResults.java Log Message: fixed bug finding properties inherited by interfaces added ScrollableResults.isFirst(), isLast() Index: ScrollableResults.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/ScrollableResults.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ScrollableResults.java 15 Dec 2002 05:12:41 -0000 1.8 --- ScrollableResults.java 13 Jan 2003 13:05:44 -0000 1.9 *************** *** 64,67 **** --- 64,83 ---- public void afterLast() throws SQLException, HibernateException; /** + * Is this the first result? + * + * @return <tt>true</tt> if this is the first row of results + * @throws SQLException + * @throws HibernateException + */ + public boolean isFirst() throws SQLException, HibernateException; + /** + * Is this the last result? + * + * @return <tt>true</tt> if this is the last row of results + * @throws SQLException + * @throws HibernateException + */ + public boolean isLast() throws SQLException, HibernateException; + /** * Release resources immediately. */ |
From: <one...@us...> - 2003-01-13 13:03:54
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/util In directory sc8-pr-cvs1:/tmp/cvs-serv10279/net/sf/hibernate/util Modified Files: ReflectHelper.java Log Message: fixed proxy serialization for classes with no identifier getter Index: ReflectHelper.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/util/ReflectHelper.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ReflectHelper.java 12 Jan 2003 07:07:49 -0000 1.4 --- ReflectHelper.java 13 Jan 2003 13:03:51 -0000 1.5 *************** *** 2,6 **** package net.sf.hibernate.util; ! import java.beans.*; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; --- 2,6 ---- package net.sf.hibernate.util; ! import java.beans.Introspector; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; *************** *** 9,15 **** import java.lang.reflect.Modifier; ! import net.sf.hibernate.*; ! import net.sf.hibernate.type.*; import net.sf.hibernate.type.Type; --- 9,19 ---- import java.lang.reflect.Modifier; ! import net.sf.hibernate.AssertionFailure; ! import net.sf.hibernate.HibernateException; ! import net.sf.hibernate.MappingException; ! import net.sf.hibernate.PropertyAccessException; ! import net.sf.hibernate.PropertyNotFoundException; import net.sf.hibernate.type.Type; + import net.sf.hibernate.type.TypeFactory; |
From: <one...@us...> - 2003-01-13 13:03:54
|
Update of /cvsroot/hibernate/Hibernate2/src In directory sc8-pr-cvs1:/tmp/cvs-serv10279 Modified Files: hibernate.properties Log Message: fixed proxy serialization for classes with no identifier getter Index: hibernate.properties =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/hibernate.properties,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** hibernate.properties 12 Jan 2003 14:45:38 -0000 1.8 --- hibernate.properties 13 Jan 2003 13:03:50 -0000 1.9 *************** *** 36,54 **** ## DB2 ! hibernate.dialect net.sf.hibernate.dialect.DB2Dialect ! hibernate.connection.driver_class COM.ibm.db2.jdbc.app.DB2Driver ! hibernate.connection.url jdbc:db2:test ! hibernate.connection.username db2 ! hibernate.connection.password db2 ## MySQL ! #hibernate.dialect net.sf.hibernate.dialect.MySQLDialect ! #hibernate.connection.driver_class org.gjt.mm.mysql.Driver ! #hibernate.connection.driver_class com.mysql.jdbc.Driver ! #hibernate.connection.url jdbc:mysql:///test ! #hibernate.connection.username mysql ! #hibernate.connection.password mysql --- 36,54 ---- ## DB2 ! #hibernate.dialect net.sf.hibernate.dialect.DB2Dialect ! #hibernate.connection.driver_class COM.ibm.db2.jdbc.app.DB2Driver ! #hibernate.connection.url jdbc:db2:test ! #hibernate.connection.username db2 ! #hibernate.connection.password db2 ## MySQL ! hibernate.dialect net.sf.hibernate.dialect.MySQLDialect ! hibernate.connection.driver_class org.gjt.mm.mysql.Driver ! hibernate.connection.driver_class com.mysql.jdbc.Driver ! hibernate.connection.url jdbc:mysql:///test ! hibernate.connection.username root ! hibernate.connection.password |
From: <one...@us...> - 2003-01-13 13:03:54
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/proxy In directory sc8-pr-cvs1:/tmp/cvs-serv10279/net/sf/hibernate/proxy Modified Files: SerializableProxy.java Log Message: fixed proxy serialization for classes with no identifier getter Index: SerializableProxy.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/proxy/SerializableProxy.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SerializableProxy.java 12 Jan 2003 09:02:58 -0000 1.5 --- SerializableProxy.java 13 Jan 2003 13:03:51 -0000 1.6 *************** *** 25,30 **** this.interfaces = interfaces; this.id = id; ! getIdentifierMethodClass = getIdentifierMethod.getDeclaringClass(); ! getIdentifierMethodName = getIdentifierMethod.getName(); } --- 25,32 ---- this.interfaces = interfaces; this.id = id; ! if (getIdentifierMethod!=null) { ! getIdentifierMethodClass = getIdentifierMethod.getDeclaringClass(); ! getIdentifierMethodName = getIdentifierMethod.getName(); ! } } *************** *** 34,38 **** persistentClass, interfaces, ! getIdentifierMethodClass.getDeclaredMethod(getIdentifierMethodName, null), id, null --- 36,40 ---- persistentClass, interfaces, ! (getIdentifierMethodName==null) ? null : getIdentifierMethodClass.getDeclaredMethod(getIdentifierMethodName, null), id, null |
From: <one...@us...> - 2003-01-13 09:11:58
|
Update of /cvsroot/hibernate/Hibernate2 In directory sc8-pr-cvs1:/tmp/cvs-serv26445 Modified Files: build.xml demo.sh Log Message: fixed demo.sh Index: build.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/build.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** build.xml 1 Jan 2003 13:42:52 -0000 1.1.1.1 --- build.xml 13 Jan 2003 09:11:52 -0000 1.2 *************** *** 209,212 **** --- 209,213 ---- <copy file="changelog.txt" todir="${dist.dir}"/> <copy file="demo.bat" todir="${dist.dir}"/> + <copy file="demo.sh" todir="${dist.dir}"/> <copy file="build.xml" todir="${dist.dir}"/> <replace file="${dist.dir}/build.xml"> Index: demo.sh =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/demo.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** demo.sh 12 Jan 2003 14:04:27 -0000 1.1 --- demo.sh 13 Jan 2003 09:11:52 -0000 1.2 *************** *** 1,3 **** #!/bin/sh JDBC_DRIVER=/opt/pgsql/lib/postgresql-jdbc3-7.3.jar ! java -cp .:$JDBC_DRIVER:./lib/commons-logging.jar:./lib/commons-collections.jar:./lib/commons-lang.jar:./lib/cglib.jar:./lib/bcel.jar:./lib/odmg.jar:./lib/jdom.jar:./lib/xml-apis.jar:./lib/xerces.jar:./lib/xalan.jar:./hibernate.jar net.sf.hibernate.eg.NetworkDemo --- 1,3 ---- #!/bin/sh JDBC_DRIVER=/opt/pgsql/lib/postgresql-jdbc3-7.3.jar ! java -cp ./src:$JDBC_DRIVER:./lib/commons-logging.jar:./lib/commons-collections.jar:./lib/commons-lang.jar:./lib/cglib.jar:./lib/bcel.jar:./lib/odmg.jar:./lib/jdom.jar:./lib/xml-apis.jar:./lib/xerces.jar:./lib/xalan.jar:./hibernate.jar net.sf.hibernate.eg.NetworkDemo |
From: <one...@us...> - 2003-01-13 08:57:47
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate In directory sc8-pr-cvs1:/tmp/cvs-serv22217/sf/hibernate Modified Files: hibernate-mapping-1.1.dtd hibernate-mapping-2.0.dtd Log Message: fixed prob with CodeGenerator allowed multiple columns for <id> Index: hibernate-mapping-1.1.dtd =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/hibernate-mapping-1.1.dtd,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** hibernate-mapping-1.1.dtd 9 Jan 2003 12:24:50 -0000 1.2 --- hibernate-mapping-1.1.dtd 13 Jan 2003 08:57:43 -0000 1.3 *************** *** 51,55 **** through Session.getID()--> ! <!ELEMENT id (column?, generator)> <!ATTLIST id name CDATA #IMPLIED> <!ATTLIST id column CDATA #IMPLIED> --- 51,55 ---- through Session.getID()--> ! <!ELEMENT id (column*, generator)> <!ATTLIST id name CDATA #IMPLIED> <!ATTLIST id column CDATA #IMPLIED> Index: hibernate-mapping-2.0.dtd =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/hibernate-mapping-2.0.dtd,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** hibernate-mapping-2.0.dtd 9 Jan 2003 12:24:50 -0000 1.5 --- hibernate-mapping-2.0.dtd 13 Jan 2003 08:57:43 -0000 1.6 *************** *** 47,51 **** through Session.getID()--> ! <!ELEMENT id (column?, generator)> <!ATTLIST id name CDATA #IMPLIED> <!ATTLIST id column CDATA #IMPLIED> --- 47,51 ---- through Session.getID()--> ! <!ELEMENT id (column*, generator)> <!ATTLIST id name CDATA #IMPLIED> <!ATTLIST id column CDATA #IMPLIED> |
From: <one...@us...> - 2003-01-13 08:57:47
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/tool/hbm2java/test In directory sc8-pr-cvs1:/tmp/cvs-serv22217/sf/hibernate/tool/hbm2java/test Modified Files: config.xml Log Message: fixed prob with CodeGenerator allowed multiple columns for <id> Index: config.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/tool/hbm2java/test/config.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** config.xml 1 Jan 2003 13:57:52 -0000 1.1.1.1 --- config.xml 13 Jan 2003 08:57:43 -0000 1.2 *************** *** 8,11 **** --> <codegen> ! <generate renderer="net.sf.hibernate.tools.codegen.BasicRenderer"/> </codegen> --- 8,11 ---- --> <codegen> ! <generate renderer="net.sf.hibernate.tool.hbm2java.BasicRenderer"/> </codegen> |
From: <one...@us...> - 2003-01-13 08:57:47
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/tool/hbm2java In directory sc8-pr-cvs1:/tmp/cvs-serv22217/sf/hibernate/tool/hbm2java Modified Files: Generator.java Log Message: fixed prob with CodeGenerator allowed multiple columns for <id> Index: Generator.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/tool/hbm2java/Generator.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Generator.java 5 Jan 2003 02:11:24 -0000 1.3 --- Generator.java 13 Jan 2003 08:57:43 -0000 1.4 *************** *** 16,20 **** */ public class Generator { ! private String rendererClass = "net.sf.hibernate.tools.codegen.BasicRenderer"; private String baseDirName = "generated"; private String packageName = null; --- 16,20 ---- */ public class Generator { ! private String rendererClass = "net.sf.hibernate.tool.hbm2java.BasicRenderer"; private String baseDirName = "generated"; private String packageName = null; |
From: <one...@us...> - 2003-01-12 15:04:55
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test In directory sc8-pr-cvs1:/tmp/cvs-serv30019/src/net/sf/hibernate/test Modified Files: FooBarTest.java Log Message: improved a common exception message Index: FooBarTest.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/FooBarTest.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** FooBarTest.java 12 Jan 2003 14:45:38 -0000 1.8 --- FooBarTest.java 12 Jan 2003 15:04:52 -0000 1.9 *************** *** 139,143 **** assertTrue( s.find("from bar in class Bar, foo in bar.baz.fooSet.elements").size()==0 ); ! assertTrue( s.find("from bar in class Bar, foo in bar.baz.fooArray.elements").size()==1 ); s.delete(bar); --- 139,143 ---- assertTrue( s.find("from bar in class Bar, foo in bar.baz.fooSet.elements").size()==0 ); ! assertTrue( s.find("from bar in class Bar, foo in elements( bar.baz.fooArray )").size()==1 ); s.delete(bar); |