Kaydet (Commit) 56ad57de authored tarafından Thomas Arnhold's avatar Thomas Arnhold

starsdbc -> css::sdbc

Change-Id: Id0411425b0a3400dffe47143f908ab283fd2247e
üst cb347ddc
......@@ -56,18 +56,18 @@ java_sql_CallableStatement::~java_sql_CallableStatement()
Any SAL_CALL java_sql_CallableStatement::queryInterface( const Type & rType ) throw(RuntimeException, std::exception)
{
Any aRet = java_sql_PreparedStatement::queryInterface(rType);
return aRet.hasValue() ? aRet : ::cppu::queryInterface(rType,static_cast< starsdbc::XRow*>(this),static_cast< starsdbc::XOutParameters*>(this));
return aRet.hasValue() ? aRet : ::cppu::queryInterface(rType,static_cast< css::sdbc::XRow*>(this),static_cast< css::sdbc::XOutParameters*>(this));
}
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL java_sql_CallableStatement::getTypes( ) throw(::com::sun::star::uno::RuntimeException, std::exception)
{
::cppu::OTypeCollection aTypes( cppu::UnoType<starsdbc::XRow>::get(),
cppu::UnoType<starsdbc::XOutParameters>::get());
::cppu::OTypeCollection aTypes( cppu::UnoType<css::sdbc::XRow>::get(),
cppu::UnoType<css::sdbc::XOutParameters>::get());
return ::comphelper::concatSequences(aTypes.getTypes(),java_sql_PreparedStatement::getTypes());
}
sal_Bool SAL_CALL java_sql_CallableStatement::wasNull( ) throw(starsdbc::SQLException, RuntimeException, std::exception)
sal_Bool SAL_CALL java_sql_CallableStatement::wasNull( ) throw(css::sdbc::SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
......@@ -75,14 +75,14 @@ sal_Bool SAL_CALL java_sql_CallableStatement::wasNull( ) throw(starsdbc::SQLExc
return callBooleanMethod( "wasNull", mID );
}
sal_Bool SAL_CALL java_sql_CallableStatement::getBoolean( sal_Int32 columnIndex ) throw(starsdbc::SQLException, RuntimeException, std::exception)
sal_Bool SAL_CALL java_sql_CallableStatement::getBoolean( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
static jmethodID mID(NULL);
return callBooleanMethodWithIntArg( "getBoolean", mID,columnIndex );
}
sal_Int8 SAL_CALL java_sql_CallableStatement::getByte( sal_Int32 columnIndex ) throw(starsdbc::SQLException, RuntimeException, std::exception)
sal_Int8 SAL_CALL java_sql_CallableStatement::getByte( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
......@@ -90,7 +90,7 @@ sal_Int8 SAL_CALL java_sql_CallableStatement::getByte( sal_Int32 columnIndex ) t
jbyte (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallByteMethod;
return callMethodWithIntArg<jbyte>(pCallMethod,"getByte","(I)B",mID,columnIndex);
}
Sequence< sal_Int8 > SAL_CALL java_sql_CallableStatement::getBytes( sal_Int32 columnIndex ) throw(starsdbc::SQLException, RuntimeException, std::exception)
Sequence< sal_Int8 > SAL_CALL java_sql_CallableStatement::getBytes( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed);
......@@ -109,7 +109,7 @@ Sequence< sal_Int8 > SAL_CALL java_sql_CallableStatement::getBytes( sal_Int32 co
}
return aSeq;
}
::com::sun::star::util::Date SAL_CALL java_sql_CallableStatement::getDate( sal_Int32 columnIndex ) throw(starsdbc::SQLException, RuntimeException, std::exception)
::com::sun::star::util::Date SAL_CALL java_sql_CallableStatement::getDate( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
......@@ -117,7 +117,7 @@ Sequence< sal_Int8 > SAL_CALL java_sql_CallableStatement::getBytes( sal_Int32 co
jobject out = callObjectMethodWithIntArg(t.pEnv,"getDate","(I)Ljava/sql/Date;", mID, columnIndex);
return out ? static_cast <com::sun::star::util::Date>(java_sql_Date( t.pEnv, out )) : ::com::sun::star::util::Date();
}
double SAL_CALL java_sql_CallableStatement::getDouble( sal_Int32 columnIndex ) throw(starsdbc::SQLException, RuntimeException, std::exception)
double SAL_CALL java_sql_CallableStatement::getDouble( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
......@@ -126,7 +126,7 @@ double SAL_CALL java_sql_CallableStatement::getDouble( sal_Int32 columnIndex ) t
return callMethodWithIntArg<double>(pCallMethod,"getDouble","(I)D",mID,columnIndex);
}
float SAL_CALL java_sql_CallableStatement::getFloat( sal_Int32 columnIndex ) throw(starsdbc::SQLException, RuntimeException, std::exception)
float SAL_CALL java_sql_CallableStatement::getFloat( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
......@@ -135,7 +135,7 @@ float SAL_CALL java_sql_CallableStatement::getFloat( sal_Int32 columnIndex ) thr
return callMethodWithIntArg<jfloat>(pCallMethod,"getFloat","(I)F",mID,columnIndex);
}
sal_Int32 SAL_CALL java_sql_CallableStatement::getInt( sal_Int32 columnIndex ) throw(starsdbc::SQLException, RuntimeException, std::exception)
sal_Int32 SAL_CALL java_sql_CallableStatement::getInt( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
......@@ -143,7 +143,7 @@ sal_Int32 SAL_CALL java_sql_CallableStatement::getInt( sal_Int32 columnIndex ) t
return callIntMethodWithIntArg("getInt",mID,columnIndex);
}
sal_Int64 SAL_CALL java_sql_CallableStatement::getLong( sal_Int32 columnIndex ) throw(starsdbc::SQLException, RuntimeException, std::exception)
sal_Int64 SAL_CALL java_sql_CallableStatement::getLong( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
......@@ -152,7 +152,7 @@ sal_Int64 SAL_CALL java_sql_CallableStatement::getLong( sal_Int32 columnIndex )
return callMethodWithIntArg<jlong>(pCallMethod,"getLong","(I)J",mID,columnIndex);
}
Any SAL_CALL java_sql_CallableStatement::getObject( sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(starsdbc::SQLException, RuntimeException, std::exception)
Any SAL_CALL java_sql_CallableStatement::getObject( sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(css::sdbc::SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
......@@ -162,7 +162,7 @@ Any SAL_CALL java_sql_CallableStatement::getObject( sal_Int32 columnIndex, const
return Any();
}
sal_Int16 SAL_CALL java_sql_CallableStatement::getShort( sal_Int32 columnIndex ) throw(starsdbc::SQLException, RuntimeException, std::exception)
sal_Int16 SAL_CALL java_sql_CallableStatement::getShort( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
......@@ -171,7 +171,7 @@ sal_Int16 SAL_CALL java_sql_CallableStatement::getShort( sal_Int32 columnIndex )
return callMethodWithIntArg<jshort>(pCallMethod,"getShort","(I)S",mID,columnIndex);
}
OUString SAL_CALL java_sql_CallableStatement::getString( sal_Int32 columnIndex ) throw(starsdbc::SQLException, RuntimeException, std::exception)
OUString SAL_CALL java_sql_CallableStatement::getString( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed);
......@@ -181,7 +181,7 @@ OUString SAL_CALL java_sql_CallableStatement::getString( sal_Int32 columnIndex )
return callStringMethodWithIntArg("getString",mID,columnIndex);
}
::com::sun::star::util::Time SAL_CALL java_sql_CallableStatement::getTime( sal_Int32 columnIndex ) throw(starsdbc::SQLException, RuntimeException, std::exception)
::com::sun::star::util::Time SAL_CALL java_sql_CallableStatement::getTime( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
......@@ -191,7 +191,7 @@ OUString SAL_CALL java_sql_CallableStatement::getString( sal_Int32 columnIndex )
return out ? static_cast <com::sun::star::util::Time> (java_sql_Time( t.pEnv, out )) : ::com::sun::star::util::Time();
}
::com::sun::star::util::DateTime SAL_CALL java_sql_CallableStatement::getTimestamp( sal_Int32 columnIndex ) throw(starsdbc::SQLException, RuntimeException, std::exception)
::com::sun::star::util::DateTime SAL_CALL java_sql_CallableStatement::getTimestamp( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
......@@ -201,7 +201,7 @@ OUString SAL_CALL java_sql_CallableStatement::getString( sal_Int32 columnIndex )
return out ? static_cast <com::sun::star::util::DateTime> (java_sql_Timestamp( t.pEnv, out )) : ::com::sun::star::util::DateTime();
}
void SAL_CALL java_sql_CallableStatement::registerOutParameter( sal_Int32 parameterIndex, sal_Int32 sqlType, const OUString& typeName ) throw(starsdbc::SQLException, RuntimeException, std::exception)
void SAL_CALL java_sql_CallableStatement::registerOutParameter( sal_Int32 parameterIndex, sal_Int32 sqlType, const OUString& typeName ) throw(css::sdbc::SQLException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed);
......@@ -251,18 +251,18 @@ jclass java_sql_CallableStatement::getMyClass() const
return theClass;
}
Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_CallableStatement::getBinaryStream( sal_Int32 columnIndex ) throw(starsdbc::SQLException, RuntimeException, std::exception)
Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_CallableStatement::getBinaryStream( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception)
{
Reference< starsdbc::XBlob > xBlob = getBlob(columnIndex);
Reference< css::sdbc::XBlob > xBlob = getBlob(columnIndex);
return xBlob.is() ? xBlob->getBinaryStream() : Reference< ::com::sun::star::io::XInputStream >();
}
Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_CallableStatement::getCharacterStream( sal_Int32 columnIndex ) throw(starsdbc::SQLException, RuntimeException, std::exception)
Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_CallableStatement::getCharacterStream( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception)
{
Reference< starsdbc::XClob > xClob = getClob(columnIndex);
Reference< css::sdbc::XClob > xClob = getClob(columnIndex);
return xClob.is() ? xClob->getCharacterStream() : Reference< ::com::sun::star::io::XInputStream >();
}
Reference< starsdbc::XArray > SAL_CALL java_sql_CallableStatement::getArray( sal_Int32 columnIndex ) throw(starsdbc::SQLException, RuntimeException, std::exception)
Reference< css::sdbc::XArray > SAL_CALL java_sql_CallableStatement::getArray( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
......@@ -272,7 +272,7 @@ Reference< starsdbc::XArray > SAL_CALL java_sql_CallableStatement::getArray( sal
return out==0 ? 0 : new java_sql_Array( t.pEnv, out );
}
Reference< starsdbc::XClob > SAL_CALL java_sql_CallableStatement::getClob( sal_Int32 columnIndex ) throw(starsdbc::SQLException, RuntimeException, std::exception)
Reference< css::sdbc::XClob > SAL_CALL java_sql_CallableStatement::getClob( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
......@@ -281,7 +281,7 @@ Reference< starsdbc::XClob > SAL_CALL java_sql_CallableStatement::getClob( sal_I
// WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_sql_Clob( t.pEnv, out );
}
Reference< starsdbc::XBlob > SAL_CALL java_sql_CallableStatement::getBlob( sal_Int32 columnIndex ) throw(starsdbc::SQLException, RuntimeException, std::exception)
Reference< css::sdbc::XBlob > SAL_CALL java_sql_CallableStatement::getBlob( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
......@@ -291,7 +291,7 @@ Reference< starsdbc::XBlob > SAL_CALL java_sql_CallableStatement::getBlob( sal_I
return out==0 ? 0 : new java_sql_Blob( t.pEnv, out );
}
Reference< starsdbc::XRef > SAL_CALL java_sql_CallableStatement::getRef( sal_Int32 columnIndex ) throw(starsdbc::SQLException, RuntimeException, std::exception)
Reference< css::sdbc::XRef > SAL_CALL java_sql_CallableStatement::getRef( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
......
......@@ -48,9 +48,9 @@ jclass java_sql_DriverPropertyInfo::getMyClass() const
}
java_sql_DriverPropertyInfo::operator starsdbc::DriverPropertyInfo()
java_sql_DriverPropertyInfo::operator css::sdbc::DriverPropertyInfo()
{
starsdbc::DriverPropertyInfo aInfo;
css::sdbc::DriverPropertyInfo aInfo;
aInfo.Name = name();
aInfo.Description = description();
aInfo.IsRequired = required();
......
......@@ -572,7 +572,7 @@ Any SAL_CALL java_sql_Connection::getWarnings( ) throw(SQLException, RuntimeExc
if( out )
{
java_sql_SQLWarning_BASE warn_base(t.pEnv, out);
SQLException aAsException( static_cast< starsdbc::SQLException >( java_sql_SQLWarning( warn_base, *this ) ) );
SQLException aAsException( static_cast< css::sdbc::SQLException >( java_sql_SQLWarning( warn_base, *this ) ) );
// translate to warning
SQLWarning aWarning;
......
......@@ -393,7 +393,7 @@ Any SAL_CALL java_sql_Statement_Base::getWarnings( ) throw(::com::sun::star::sd
{
java_sql_SQLWarning_BASE warn_base( t.pEnv, out );
return makeAny(
static_cast< starsdbc::SQLException >(
static_cast< css::sdbc::SQLException >(
java_sql_SQLWarning(warn_base,*(::cppu::OWeakObject*)this)));
}
......
......@@ -523,7 +523,7 @@ void SAL_CALL java_sql_ResultSet::clearWarnings( ) throw(::com::sun::star::sdbc
{
java_sql_SQLWarning_BASE warn_base( t.pEnv, out );
return makeAny(
static_cast< starsdbc::SQLException >(
static_cast< css::sdbc::SQLException >(
java_sql_SQLWarning(warn_base,*this)));
}
......
......@@ -30,7 +30,7 @@ using namespace ::com::sun::star::lang;
//************ Class: java.sql.SQLException
java_sql_SQLException::java_sql_SQLException( const java_sql_SQLException_BASE& _rException,const Reference< XInterface> & _rContext)
: starsdbc::SQLException( _rException.getMessage(),
: css::sdbc::SQLException( _rException.getMessage(),
_rContext,
_rException.getSQLState(),
_rException.getErrorCode(),
......@@ -61,7 +61,7 @@ jclass java_sql_SQLException_BASE::st_getMyClass()
return theClass;
}
starsdbc::SQLException java_sql_SQLException_BASE::getNextException() const
css::sdbc::SQLException java_sql_SQLException_BASE::getNextException() const
{
SDBThreadAttach t;
static jmethodID mID(NULL);
......@@ -70,10 +70,10 @@ starsdbc::SQLException java_sql_SQLException_BASE::getNextException() const
if( out )
{
java_sql_SQLException_BASE warn_base(t.pEnv,out);
return (starsdbc::SQLException)java_sql_SQLException(warn_base,0);
return (css::sdbc::SQLException)java_sql_SQLException(warn_base,0);
}
return starsdbc::SQLException();
return css::sdbc::SQLException();
}
OUString java_sql_SQLException_BASE::getSQLState() const
......
......@@ -24,12 +24,10 @@
namespace connectivity
{
namespace starsdbc = ::com::sun::star::sdbc;
//************ Class: java.sql.SQLException
class java_sql_SQLException_BASE;
class java_sql_SQLException : public starsdbc::SQLException
class java_sql_SQLException : public css::sdbc::SQLException
{
public:
// A ctor that is needed for returning the object
......@@ -50,7 +48,7 @@ namespace connectivity
OUString getSQLState() const;
sal_Int32 getErrorCode() const;
starsdbc::SQLException getNextException() const;
css::sdbc::SQLException getNextException() const;
static jclass st_getMyClass();
};
......
......@@ -24,9 +24,6 @@
namespace connectivity
{
// namespace starsdbc = ::com::sun::star::sdbc;
// namespace ::com::sun::star::uno = ::com::sun::star::uno;
//************ Class: java.sql.SQLWarning
class java_sql_SQLWarning_BASE : public java_sql_SQLException_BASE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment