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; /** |