From 321a2b3b349c9046eebac22e90778eab367dcae2 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Sun, 29 Apr 2007 19:33:18 +0000 Subject: Added @since tags. --- .../carbonado/repo/jdbc/JDBCRepositoryBuilder.java | 13 +++ .../repo/jdbc/JDBCSequenceValueProducer.java | 3 + .../carbonado/repo/jdbc/JDBCStorableInfo.java | 2 + .../carbonado/repo/jdbc/JDBCStorableProperty.java | 2 + .../amazon/carbonado/repo/jdbc/JDBCStorage.java | 3 + .../carbonado/repo/jdbc/JDBCSupportStrategy.java | 20 ++++- .../repo/jdbc/LoggingCallableStatement.java | 96 ++++++++++++++++++++++ .../carbonado/repo/jdbc/LoggingConnection.java | 39 +++++++++ .../carbonado/repo/jdbc/LoggingDataSource.java | 9 ++ .../repo/jdbc/LoggingPreparedStatement.java | 54 ++++++++++++ .../carbonado/repo/jdbc/LoggingStatement.java | 15 ++++ .../carbonado/repo/jdbc/SimpleDataSource.java | 9 ++ 12 files changed, 264 insertions(+), 1 deletion(-) (limited to 'src/main/java/com/amazon/carbonado/repo/jdbc') diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepositoryBuilder.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepositoryBuilder.java index b078e14..2329206 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepositoryBuilder.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepositoryBuilder.java @@ -151,6 +151,8 @@ public class JDBCRepositoryBuilder extends AbstractRepositoryBuilder { /** * Pass true to cause the DataSource to be closed when the repository is * closed or shutdown. By default, this option is false. + * + * @since 1.2 */ public void setDataSourceCloseOnShutdown(boolean b) { mDataSourceClose = b; @@ -159,6 +161,8 @@ public class JDBCRepositoryBuilder extends AbstractRepositoryBuilder { /** * Returns true if DataSource is closed when the repository is closed or * shutdown. By default, this option is false. + * + * @since 1.2 */ public boolean getDataSourceCloseOnShutdown() { return mDataSourceClose; @@ -278,6 +282,7 @@ public class JDBCRepositoryBuilder extends AbstractRepositoryBuilder { * @param enabled true to enable, false to disable * @param className name of Storable type to enable automatic version * management on; pass null to enable all + * @since 1.2 */ public void setAutoVersioningEnabled(boolean enabled, String className) { if (mAutoVersioningMap == null) { @@ -296,6 +301,8 @@ public class JDBCRepositoryBuilder extends AbstractRepositoryBuilder { /** * Returns the native sequence select statement, which is null if the * default is chosen. + * + * @since 1.2 */ public String getSequenceSelectStatement() { return mSequenceSelectStatement; @@ -304,6 +311,8 @@ public class JDBCRepositoryBuilder extends AbstractRepositoryBuilder { /** * Override the default native sequence select statement with a printf. * For example, "SELECT %s.NEXTVAL FROM DUAL". + * + * @since 1.2 */ public void setSequenceSelectStatement(String sequenceSelectStatement) { mSequenceSelectStatement = sequenceSelectStatement; @@ -311,6 +320,8 @@ public class JDBCRepositoryBuilder extends AbstractRepositoryBuilder { /** * Returns true if native sequences should not be used. + * + * @since 1.2 */ public boolean isForceStoredSequence() { return mForceStoredSequence; @@ -321,6 +332,8 @@ public class JDBCRepositoryBuilder extends AbstractRepositoryBuilder { * named "CARBONADO_SEQUENCE" or "CARBONADO_SEQUENCES" is used instead to * hold sequence values. When forced, the table is always used instead of * native sequences. + * + * @since 1.2 */ public void setForceStoredSequence(boolean forceStoredSequence) { mForceStoredSequence = forceStoredSequence; diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCSequenceValueProducer.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCSequenceValueProducer.java index e2fb9a8..dd672ae 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCSequenceValueProducer.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCSequenceValueProducer.java @@ -65,6 +65,9 @@ class JDBCSequenceValueProducer extends AbstractSequenceValueProducer { } } + /** + * @since 1.2 + */ public boolean returnReservedValues() { return false; } diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableInfo.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableInfo.java index 109725c..8eac9b4 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableInfo.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableInfo.java @@ -74,6 +74,8 @@ public interface JDBCStorableInfo extends StorableInfo { /** * Returns auto-increment properties which are primary key members. The map * should almost always be empty or contain one property. + * + * @since 1.2 */ Map> getIdentityProperties(); diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableProperty.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableProperty.java index 9102c17..c86895a 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableProperty.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableProperty.java @@ -48,6 +48,8 @@ public interface JDBCStorableProperty extends StorableProper /** * Returns true if property is declared as @Automatic and column is * designated as auto-increment. + * + * @since 1.2 */ boolean isAutoIncrement(); diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java index 12d6790..70894b6 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java @@ -128,6 +128,9 @@ class JDBCStorage extends StandardQueryFactory return property != null && property.isSupported(); } + /** + * @since 1.2 + */ public void truncate() throws PersistException { String truncateFormat = mSupportStrategy.getTruncateTableStatement(); diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCSupportStrategy.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCSupportStrategy.java index 8a27c3d..3643c65 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCSupportStrategy.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCSupportStrategy.java @@ -92,6 +92,9 @@ class JDBCSupportStrategy { return new JDBCExceptionTransformer(); } + /** + * @since 1.2 + */ SequenceValueProducer createSequenceValueProducer(String name) throws RepositoryException { @@ -239,20 +242,30 @@ class JDBCSupportStrategy { * Returns the optional sequence select statement format. The format is * printf style with 1 string parameter which can be passed through {@link * String#format(String, Object[])} to create a sql statement. - * @return + * + * @since 1.2 */ String getSequenceSelectStatement() { return mSequenceSelectStatement; } + /** + * @since 1.2 + */ void setSequenceSelectStatement(String sequenceSelectStatement) { mSequenceSelectStatement = sequenceSelectStatement; } + /** + * @since 1.2 + */ boolean isForceStoredSequence() { return mForceStoredSequence; } + /** + * @since 1.2 + */ void setForceStoredSequence(boolean forceStoredSequence) { mForceStoredSequence = forceStoredSequence; } @@ -261,11 +274,16 @@ class JDBCSupportStrategy { * Return the optional truncate table statement format. The format is * printf style with 1 string parameter which can be passed through {@link * String#format(String, Object[])} to create a sql statement. + * + * @since 1.2 */ String getTruncateTableStatement() { return mTruncateTableStatement; } + /** + * @since 1.2 + */ void setTruncateTableStatement(String truncateTableStatement) { mTruncateTableStatement = truncateTableStatement; } diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingCallableStatement.java b/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingCallableStatement.java index 140fbd0..c3958a9 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingCallableStatement.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingCallableStatement.java @@ -386,114 +386,189 @@ class LoggingCallableStatement extends LoggingPreparedStatement implements Calla return cs().getURL(parameterName); } + /** + * @since 1.2 + */ public RowId getRowId(int parameterIndex) throws SQLException { return cs().getRowId(parameterIndex); } + /** + * @since 1.2 + */ public RowId getRowId(String parameterName) throws SQLException { return cs().getRowId(parameterName); } + /** + * @since 1.2 + */ public void setRowId(String parameterName, RowId x) throws SQLException { cs().setRowId(parameterName, x); } + /** + * @since 1.2 + */ public void setNString(String parameterName, String value) throws SQLException { cs().setNString(parameterName, value); } + /** + * @since 1.2 + */ public void setNCharacterStream(String parameterName, java.io.Reader value, long length) throws SQLException { cs().setNCharacterStream(parameterName, value, length); } + /** + * @since 1.2 + */ public void setNClob(String parameterName, NClob value) throws SQLException { cs().setNClob(parameterName, value); } + /** + * @since 1.2 + */ public void setClob(String parameterName, java.io.Reader reader, long length) throws SQLException { cs().setClob(parameterName, reader, length); } + /** + * @since 1.2 + */ public void setBlob(String parameterName, java.io.InputStream inputStream, long length) throws SQLException { cs().setBlob(parameterName, inputStream, length); } + /** + * @since 1.2 + */ public void setNClob(String parameterName, java.io.Reader reader, long length) throws SQLException { cs().setNClob(parameterName, reader, length); } + /** + * @since 1.2 + */ public NClob getNClob (int parameterIndex) throws SQLException { return cs().getNClob(parameterIndex); } + /** + * @since 1.2 + */ public NClob getNClob (String parameterName) throws SQLException { return cs().getNClob(parameterName); } + /** + * @since 1.2 + */ public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException { cs().setSQLXML(parameterName, xmlObject); } + /** + * @since 1.2 + */ public SQLXML getSQLXML(int parameterIndex) throws SQLException { return cs().getSQLXML(parameterIndex); } + /** + * @since 1.2 + */ public SQLXML getSQLXML(String parameterName) throws SQLException { return cs().getSQLXML(parameterName); } + /** + * @since 1.2 + */ public String getNString(int parameterIndex) throws SQLException { return cs().getNString(parameterIndex); } + /** + * @since 1.2 + */ public String getNString(String parameterName) throws SQLException { return cs().getNString(parameterName); } + /** + * @since 1.2 + */ public java.io.Reader getNCharacterStream(int parameterIndex) throws SQLException { return cs().getNCharacterStream(parameterIndex); } + /** + * @since 1.2 + */ public java.io.Reader getNCharacterStream(String parameterName) throws SQLException { return cs().getNCharacterStream(parameterName); } + /** + * @since 1.2 + */ public java.io.Reader getCharacterStream(int parameterIndex) throws SQLException { return cs().getCharacterStream(parameterIndex); } + /** + * @since 1.2 + */ public java.io.Reader getCharacterStream(String parameterName) throws SQLException { return cs().getCharacterStream(parameterName); } + /** + * @since 1.2 + */ public void setBlob(String parameterName, Blob x) throws SQLException { cs().setBlob(parameterName, x); } + /** + * @since 1.2 + */ public void setClob(String parameterName, Clob x) throws SQLException { cs().setClob(parameterName, x); } + /** + * @since 1.2 + */ public void setAsciiStream(String parameterName, java.io.InputStream x, long length) throws SQLException { cs().setAsciiStream(parameterName, x, length); } + /** + * @since 1.2 + */ public void setBinaryStream(String parameterName, java.io.InputStream x, long length) throws SQLException { cs().setBinaryStream(parameterName, x, length); } + /** + * @since 1.2 + */ public void setCharacterStream(String parameterName, java.io.Reader reader, long length) @@ -502,40 +577,61 @@ class LoggingCallableStatement extends LoggingPreparedStatement implements Calla cs().setCharacterStream(parameterName, reader, length); } + /** + * @since 1.2 + */ public void setAsciiStream(String parameterName, java.io.InputStream x) throws SQLException { cs().setAsciiStream(parameterName, x); } + /** + * @since 1.2 + */ public void setBinaryStream(String parameterName, java.io.InputStream x) throws SQLException { cs().setBinaryStream(parameterName, x); } + /** + * @since 1.2 + */ public void setCharacterStream(String parameterName, java.io.Reader reader) throws SQLException { cs().setCharacterStream(parameterName, reader); } + /** + * @since 1.2 + */ public void setNCharacterStream(String parameterName, java.io.Reader value) throws SQLException { cs().setNCharacterStream(parameterName, value); } + /** + * @since 1.2 + */ public void setClob(String parameterName, java.io.Reader reader) throws SQLException { cs().setClob(parameterName, reader); } + /** + * @since 1.2 + */ public void setBlob(String parameterName, java.io.InputStream inputStream) throws SQLException { cs().setBlob(parameterName, inputStream); } + /** + * @since 1.2 + */ public void setNClob(String parameterName, java.io.Reader reader) throws SQLException { diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingConnection.java b/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingConnection.java index 3a2a6cb..8ca4226 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingConnection.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingConnection.java @@ -225,54 +225,93 @@ class LoggingConnection implements Connection { mCon.releaseSavepoint(savepoint); } + /** + * @since 1.2 + */ public Clob createClob() throws SQLException { return mCon.createClob(); } + /** + * @since 1.2 + */ public Blob createBlob() throws SQLException { return mCon.createBlob(); } + /** + * @since 1.2 + */ public NClob createNClob() throws SQLException { return mCon.createNClob(); } + /** + * @since 1.2 + */ public SQLXML createSQLXML() throws SQLException { return mCon.createSQLXML(); } + /** + * @since 1.2 + */ public boolean isValid(int timeout) throws SQLException { return mCon.isValid(timeout); } + /** + * @since 1.2 + */ public void setClientInfo(String name, String value) throws SQLClientInfoException { mCon.setClientInfo(name, value); } + /** + * @since 1.2 + */ public void setClientInfo(java.util.Properties properties) throws SQLClientInfoException { mCon.setClientInfo(properties); } + /** + * @since 1.2 + */ public String getClientInfo(String name) throws SQLException { return mCon.getClientInfo(name); } + /** + * @since 1.2 + */ public java.util.Properties getClientInfo() throws SQLException { return mCon.getClientInfo(); } + /** + * @since 1.2 + */ public Array createArrayOf(String typeName, Object[] elements) throws SQLException { return mCon.createArrayOf(typeName, elements); } + /** + * @since 1.2 + */ public Struct createStruct(String typeName, Object[] attributes) throws SQLException { return mCon.createStruct(typeName, attributes); } + /** + * @since 1.2 + */ public T unwrap(Class iface) throws SQLException { throw new UnsupportedOperationException(); } + /** + * @since 1.2 + */ public boolean isWrapperFor(Class iface) throws SQLException { throw new UnsupportedOperationException(); } diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingDataSource.java b/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingDataSource.java index ab6a2f9..0ba53fd 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingDataSource.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingDataSource.java @@ -91,6 +91,9 @@ public class LoggingDataSource implements DataSource { return mDataSource.getLoginTimeout(); } + /** + * @since 1.2 + */ public void close() throws SQLException { mLog.debug("DataSource.close()"); if (!JDBCRepository.closeDataSource(mDataSource)) { @@ -99,10 +102,16 @@ public class LoggingDataSource implements DataSource { } } + /** + * @since 1.2 + */ public T unwrap(Class iface) throws SQLException { throw new UnsupportedOperationException(); } + /** + * @since 1.2 + */ public boolean isWrapperFor(Class iface) throws SQLException { throw new UnsupportedOperationException(); } diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingPreparedStatement.java b/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingPreparedStatement.java index 6fbfa9b..9406005 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingPreparedStatement.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingPreparedStatement.java @@ -249,58 +249,91 @@ class LoggingPreparedStatement extends LoggingStatement implements PreparedState return ps().getParameterMetaData(); } + /** + * @since 1.2 + */ public void setRowId(int parameterIndex, RowId x) throws SQLException { ps().setRowId(parameterIndex, x); } + /** + * @since 1.2 + */ public void setNString(int parameterIndex, String value) throws SQLException { ps().setNString(parameterIndex, value); } + /** + * @since 1.2 + */ public void setNCharacterStream(int parameterIndex, java.io.Reader value, long length) throws SQLException { ps().setNCharacterStream(parameterIndex, value, length); } + /** + * @since 1.2 + */ public void setNClob(int parameterIndex, NClob value) throws SQLException { ps().setNClob(parameterIndex, value); } + /** + * @since 1.2 + */ public void setClob(int parameterIndex, java.io.Reader reader, long length) throws SQLException { ps().setClob(parameterIndex, reader, length); } + /** + * @since 1.2 + */ public void setBlob(int parameterIndex, java.io.InputStream inputStream, long length) throws SQLException { ps().setBlob(parameterIndex, inputStream, length); } + /** + * @since 1.2 + */ public void setNClob(int parameterIndex, java.io.Reader reader, long length) throws SQLException { ps().setNClob(parameterIndex, reader, length); } + /** + * @since 1.2 + */ public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException { ps().setSQLXML(parameterIndex, xmlObject); } + /** + * @since 1.2 + */ public void setAsciiStream(int parameterIndex, java.io.InputStream x, long length) throws SQLException { ps().setAsciiStream(parameterIndex, x, length); } + /** + * @since 1.2 + */ public void setBinaryStream(int parameterIndex, java.io.InputStream x, long length) throws SQLException { ps().setBinaryStream(parameterIndex, x, length); } + /** + * @since 1.2 + */ public void setCharacterStream(int parameterIndex, java.io.Reader reader, long length) @@ -309,32 +342,53 @@ class LoggingPreparedStatement extends LoggingStatement implements PreparedState ps().setCharacterStream(parameterIndex, reader, length); } + /** + * @since 1.2 + */ public void setAsciiStream(int parameterIndex, java.io.InputStream x) throws SQLException { ps().setAsciiStream(parameterIndex, x); } + /** + * @since 1.2 + */ public void setBinaryStream(int parameterIndex, java.io.InputStream x) throws SQLException { ps().setBinaryStream(parameterIndex, x); } + /** + * @since 1.2 + */ public void setCharacterStream(int parameterIndex, java.io.Reader reader) throws SQLException { ps().setCharacterStream(parameterIndex, reader); } + /** + * @since 1.2 + */ public void setNCharacterStream(int parameterIndex, java.io.Reader value) throws SQLException { ps().setNCharacterStream(parameterIndex, value); } + /** + * @since 1.2 + */ public void setClob(int parameterIndex, java.io.Reader reader) throws SQLException { ps().setClob(parameterIndex, reader); } + /** + * @since 1.2 + */ public void setBlob(int parameterIndex, java.io.InputStream inputStream) throws SQLException { ps().setBlob(parameterIndex, inputStream); } + /** + * @since 1.2 + */ public void setNClob(int parameterIndex, java.io.Reader reader) throws SQLException { ps().setNClob(parameterIndex, reader); } diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingStatement.java b/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingStatement.java index 5dc8d5e..ea5be89 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingStatement.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingStatement.java @@ -198,22 +198,37 @@ class LoggingStatement implements Statement { return mStatement.getResultSetHoldability(); } + /** + * @since 1.2 + */ public boolean isClosed() throws SQLException { return mStatement.isClosed(); } + /** + * @since 1.2 + */ public void setPoolable(boolean poolable) throws SQLException { mStatement.setPoolable(poolable); } + /** + * @since 1.2 + */ public boolean isPoolable() throws SQLException { return mStatement.isPoolable(); } + /** + * @since 1.2 + */ public T unwrap(Class iface) throws SQLException { throw new UnsupportedOperationException(); } + /** + * @since 1.2 + */ public boolean isWrapperFor(Class iface) throws SQLException { throw new UnsupportedOperationException(); } diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/SimpleDataSource.java b/src/main/java/com/amazon/carbonado/repo/jdbc/SimpleDataSource.java index ee355de..fb01b4b 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/SimpleDataSource.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/SimpleDataSource.java @@ -87,13 +87,22 @@ public class SimpleDataSource implements DataSource { return 0; } + /** + * @since 1.2 + */ public void close() throws SQLException { } + /** + * @since 1.2 + */ public T unwrap(Class iface) throws SQLException { throw new UnsupportedOperationException(); } + /** + * @since 1.2 + */ public boolean isWrapperFor(Class iface) throws SQLException { throw new UnsupportedOperationException(); } -- cgit v1.2.3