diff options
Diffstat (limited to 'odk/examples/DevelopersGuide/Database/DriverSkeleton/SPreparedStatement.cxx')
-rw-r--r-- | odk/examples/DevelopersGuide/Database/DriverSkeleton/SPreparedStatement.cxx | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SPreparedStatement.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SPreparedStatement.cxx index 17217402462f..f896abb13e98 100644 --- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SPreparedStatement.cxx +++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SPreparedStatement.cxx @@ -3,7 +3,7 @@ * * The Contents of this file are made available subject to the terms of * the BSD license. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * All rights reserved. * @@ -30,7 +30,7 @@ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * *************************************************************************/ #include <stdio.h> @@ -95,7 +95,7 @@ Reference< XResultSetMetaData > SAL_CALL OPreparedStatement::getMetaData( ) thr { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + if(!m_xMetaData.is()) m_xMetaData = new OResultSetMetaData(getOwnConnection()); return m_xMetaData; @@ -106,7 +106,7 @@ void SAL_CALL OPreparedStatement::close( ) throw(SQLException, RuntimeException { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + // Reset last warning message @@ -127,7 +127,7 @@ sal_Bool SAL_CALL OPreparedStatement::execute( ) throw(SQLException, RuntimeExc { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + // same as in statement with the difference that this statement also can contain parameter return sal_False; @@ -138,7 +138,7 @@ sal_Int32 SAL_CALL OPreparedStatement::executeUpdate( ) throw(SQLException, Run { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + // same as in statement with the difference that this statement also can contain parameter return 0; } @@ -155,7 +155,7 @@ Reference< XConnection > SAL_CALL OPreparedStatement::getConnection( ) throw(SQ { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + return (Reference< XConnection >)m_pConnection; } // ------------------------------------------------------------------------- @@ -164,10 +164,10 @@ Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery( ) throw(SQLE { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + Reference< XResultSet > rs = NULL; - + return rs; } // ------------------------------------------------------------------------- @@ -176,14 +176,14 @@ void SAL_CALL OPreparedStatement::setBoolean( sal_Int32 parameterIndex, sal_Bool { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + } // ------------------------------------------------------------------------- void SAL_CALL OPreparedStatement::setByte( sal_Int32 parameterIndex, sal_Int8 x ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + } // ------------------------------------------------------------------------- @@ -192,7 +192,7 @@ void SAL_CALL OPreparedStatement::setDate( sal_Int32 parameterIndex, const Date& { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + } // ------------------------------------------------------------------------- @@ -201,7 +201,7 @@ void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const Time& { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + } // ------------------------------------------------------------------------- @@ -209,7 +209,7 @@ void SAL_CALL OPreparedStatement::setTimestamp( sal_Int32 parameterIndex, const { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + } // ------------------------------------------------------------------------- @@ -217,7 +217,7 @@ void SAL_CALL OPreparedStatement::setDouble( sal_Int32 parameterIndex, double x { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + } // ------------------------------------------------------------------------- @@ -226,7 +226,7 @@ void SAL_CALL OPreparedStatement::setFloat( sal_Int32 parameterIndex, float x ) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + } // ------------------------------------------------------------------------- @@ -234,7 +234,7 @@ void SAL_CALL OPreparedStatement::setInt( sal_Int32 parameterIndex, sal_Int32 x { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + } // ------------------------------------------------------------------------- @@ -242,7 +242,7 @@ void SAL_CALL OPreparedStatement::setLong( sal_Int32 parameterIndex, sal_Int64 a { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + } // ------------------------------------------------------------------------- @@ -250,7 +250,7 @@ void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 s { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + } // ------------------------------------------------------------------------- @@ -258,7 +258,7 @@ void SAL_CALL OPreparedStatement::setClob( sal_Int32 parameterIndex, const Refer { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + } // ------------------------------------------------------------------------- @@ -266,7 +266,7 @@ void SAL_CALL OPreparedStatement::setBlob( sal_Int32 parameterIndex, const Refer { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + } // ------------------------------------------------------------------------- @@ -274,7 +274,7 @@ void SAL_CALL OPreparedStatement::setArray( sal_Int32 parameterIndex, const Refe { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + } // ------------------------------------------------------------------------- @@ -282,14 +282,14 @@ void SAL_CALL OPreparedStatement::setRef( sal_Int32 parameterIndex, const Refere { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + } // ------------------------------------------------------------------------- void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, const Any& x, sal_Int32 sqlType, sal_Int32 scale ) throw(SQLException, RuntimeException) { checkDisposed(OStatement_BASE::rBHelper.bDisposed); - ::osl::MutexGuard aGuard( m_aMutex ); + ::osl::MutexGuard aGuard( m_aMutex ); } // ------------------------------------------------------------------------- @@ -298,7 +298,7 @@ void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32 parameterIndex, sal_I { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + } // ------------------------------------------------------------------------- @@ -306,7 +306,7 @@ void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + } // ------------------------------------------------------------------------- @@ -314,7 +314,7 @@ void SAL_CALL OPreparedStatement::setShort( sal_Int32 parameterIndex, sal_Int16 { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + } // ------------------------------------------------------------------------- @@ -322,7 +322,7 @@ void SAL_CALL OPreparedStatement::setBytes( sal_Int32 parameterIndex, const Sequ { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + } // ------------------------------------------------------------------------- @@ -331,7 +331,7 @@ void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 parameterIndex, { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + } // ------------------------------------------------------------------------- @@ -339,7 +339,7 @@ void SAL_CALL OPreparedStatement::setBinaryStream( sal_Int32 parameterIndex, con { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + } // ------------------------------------------------------------------------- @@ -381,7 +381,7 @@ void OPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,cons // ----------------------------------------------------------------------------- void OPreparedStatement::checkParameterIndex(sal_Int32 _parameterIndex) { - if( !_parameterIndex || _parameterIndex > m_nNumParams) + if( !_parameterIndex || _parameterIndex > m_nNumParams) throw SQLException(); } // ----------------------------------------------------------------------------- |