LibreOffice Module connectivity (master) 1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | List of all members
connectivity::java_lang_Object Class Reference

#include <Object.hxx>

Inheritance diagram for connectivity::java_lang_Object:
[legend]

Public Member Functions

 java_lang_Object (JNIEnv *pEnv, jobject myObj)
 
 java_lang_Object ()
 
virtual ~java_lang_Object () COVERITY_NOEXCEPT_FALSE
 
void saveRef (JNIEnv *pEnv, jobject myObj)
 
jobject getJavaObject () const
 
void clearObject (JNIEnv &rEnv)
 
void clearObject ()
 
OUString toString () const
 
static ::rtl::Reference< jvmaccess::VirtualMachinegetVM (const css::uno::Reference< css::uno::XComponentContext > &_rxContext=nullptr)
 
void obtainMethodId_throwSQL (JNIEnv *_pEnv, const char *_pMethodName, const char *_pSignature, jmethodID &_inout_MethodID) const
 
void obtainMethodId_throwRuntime (JNIEnv *_pEnv, const char *_pMethodName, const char *_pSignature, jmethodID &_inout_MethodID) const
 
bool callBooleanMethod (const char *_pMethodName, jmethodID &_inout_MethodID) const
 
bool callBooleanMethodWithIntArg (const char *_pMethodName, jmethodID &_inout_MethodID, sal_Int32 _nArgument) const
 
jobject callResultSetMethod (JNIEnv &_rEnv, const char *_pMethodName, jmethodID &_inout_MethodID) const
 
sal_Int32 callIntMethod_ThrowSQL (const char *_pMethodName, jmethodID &_inout_MethodID) const
 
sal_Int32 callIntMethod_ThrowRuntime (const char *_pMethodName, jmethodID &_inout_MethodID) const
 
sal_Int32 callIntMethodWithIntArg_ThrowSQL (const char *_pMethodName, jmethodID &_inout_MethodID, sal_Int32 _nArgument) const
 
sal_Int32 callIntMethodWithIntArg_ThrowRuntime (const char *_pMethodName, jmethodID &_inout_MethodID, sal_Int32 _nArgument) const
 
sal_Int32 callIntMethodWithStringArg (const char *_pMethodName, jmethodID &_inout_MethodID, const OUString &_nArgument) const
 
OUString callStringMethod (const char *_pMethodName, jmethodID &_inout_MethodID) const
 
OUString callStringMethodWithIntArg (const char *_pMethodName, jmethodID &_inout_MethodID, sal_Int32 _nArgument) const
 
void callVoidMethod_ThrowSQL (const char *_pMethodName, jmethodID &_inout_MethodID) const
 
void callVoidMethod_ThrowRuntime (const char *_pMethodName, jmethodID &_inout_MethodID) const
 
void callVoidMethodWithIntArg_ThrowSQL (const char *_pMethodName, jmethodID &_inout_MethodID, sal_Int32 _nArgument) const
 
void callVoidMethodWithIntArg_ThrowRuntime (const char *_pMethodName, jmethodID &_inout_MethodID, sal_Int32 _nArgument) const
 
void callVoidMethodWithBoolArg_ThrowSQL (const char *_pMethodName, jmethodID &_inout_MethodID, bool _nArgument) const
 
void callVoidMethodWithBoolArg_ThrowRuntime (const char *_pMethodName, jmethodID &_inout_MethodID, bool _nArgument) const
 
void callVoidMethodWithStringArg (const char *_pMethodName, jmethodID &_inout_MethodID, const OUString &_nArgument) const
 
jobject callObjectMethod (JNIEnv *pEnv, const char *_pMethodName, const char *_pSignature, jmethodID &_inout_MethodID) const
 
jobject callObjectMethodWithIntArg (JNIEnv *pEnv, const char *_pMethodName, const char *_pSignature, jmethodID &_inout_MethodID, sal_Int32 _nArgument) const
 
template<typename T >
callMethodWithIntArg (T(JNIEnv::*pCallMethod)(jobject obj, jmethodID methodID,...), const char *_pMethodName, const char *_pSignature, jmethodID &_inout_MethodID, sal_Int32 _nArgument) const
 
template<typename T >
void callVoidMethod_ThrowSQL (const char *_pMethodName, const char *_pSignature, jmethodID &_inout_MethodID, sal_Int32 _nArgument, const T &_aValue) const
 

Static Public Member Functions

static void ThrowSQLException (JNIEnv *pEnv, const css::uno::Reference< css::uno::XInterface > &_rContext)
 
static void ThrowLoggedSQLException (const ::comphelper::EventLogger &_rLogger, JNIEnv *pEnvironment, const css::uno::Reference< css::uno::XInterface > &_rxContext)
 
static void ThrowRuntimeException (JNIEnv *pEnv, const css::uno::Reference< css::uno::XInterface > &_rContext)
 
static jclass findMyClass (const char *_pClassName)
 

Protected Member Functions

virtual jclass getMyClass () const
 

Protected Attributes

jobject object
 

Static Protected Attributes

static jclass theClass = nullptr
 

Private Member Functions

java_lang_Objectoperator= (java_lang_Object const &)=delete
 
 java_lang_Object (java_lang_Object const &)=delete
 

Detailed Description

Definition at line 58 of file Object.hxx.

Constructor & Destructor Documentation

◆ java_lang_Object() [1/3]

connectivity::java_lang_Object::java_lang_Object ( java_lang_Object const &  )
privatedelete

◆ java_lang_Object() [2/3]

java_lang_Object::java_lang_Object ( JNIEnv *  pEnv,
jobject  myObj 
)

Definition at line 107 of file Object.cxx.

References connectivity::SDBThreadAttach::addRef().

◆ java_lang_Object() [3/3]

java_lang_Object::java_lang_Object ( )

Definition at line 100 of file Object.cxx.

References connectivity::SDBThreadAttach::addRef().

◆ ~java_lang_Object()

java_lang_Object::~java_lang_Object ( )
virtual

Definition at line 115 of file Object.cxx.

References clearObject(), connectivity::SDBThreadAttach::releaseRef(), and t.

Member Function Documentation

◆ callBooleanMethod()

bool java_lang_Object::callBooleanMethod ( const char *  _pMethodName,
jmethodID &  _inout_MethodID 
) const

◆ callBooleanMethodWithIntArg()

bool java_lang_Object::callBooleanMethodWithIntArg ( const char *  _pMethodName,
jmethodID &  _inout_MethodID,
sal_Int32  _nArgument 
) const

◆ callIntMethod_ThrowRuntime()

sal_Int32 java_lang_Object::callIntMethod_ThrowRuntime ( const char *  _pMethodName,
jmethodID &  _inout_MethodID 
) const

◆ callIntMethod_ThrowSQL()

sal_Int32 java_lang_Object::callIntMethod_ThrowSQL ( const char *  _pMethodName,
jmethodID &  _inout_MethodID 
) const

◆ callIntMethodWithIntArg_ThrowRuntime()

sal_Int32 java_lang_Object::callIntMethodWithIntArg_ThrowRuntime ( const char *  _pMethodName,
jmethodID &  _inout_MethodID,
sal_Int32  _nArgument 
) const

◆ callIntMethodWithIntArg_ThrowSQL()

sal_Int32 java_lang_Object::callIntMethodWithIntArg_ThrowSQL ( const char *  _pMethodName,
jmethodID &  _inout_MethodID,
sal_Int32  _nArgument 
) const

◆ callIntMethodWithStringArg()

sal_Int32 java_lang_Object::callIntMethodWithStringArg ( const char *  _pMethodName,
jmethodID &  _inout_MethodID,
const OUString &  _nArgument 
) const

◆ callMethodWithIntArg()

template<typename T >
T connectivity::java_lang_Object::callMethodWithIntArg ( T(JNIEnv::*)(jobject obj, jmethodID methodID,...)  pCallMethod,
const char *  _pMethodName,
const char *  _pSignature,
jmethodID &  _inout_MethodID,
sal_Int32  _nArgument 
) const
inline

Definition at line 124 of file Object.hxx.

References obtainMethodId_throwSQL(), t, and ThrowSQLException().

◆ callObjectMethod()

jobject java_lang_Object::callObjectMethod ( JNIEnv *  pEnv,
const char *  _pMethodName,
const char *  _pSignature,
jmethodID &  _inout_MethodID 
) const

◆ callObjectMethodWithIntArg()

jobject java_lang_Object::callObjectMethodWithIntArg ( JNIEnv *  pEnv,
const char *  _pMethodName,
const char *  _pSignature,
jmethodID &  _inout_MethodID,
sal_Int32  _nArgument 
) const

◆ callResultSetMethod()

jobject java_lang_Object::callResultSetMethod ( JNIEnv &  _rEnv,
const char *  _pMethodName,
jmethodID &  _inout_MethodID 
) const

◆ callStringMethod()

OUString java_lang_Object::callStringMethod ( const char *  _pMethodName,
jmethodID &  _inout_MethodID 
) const

◆ callStringMethodWithIntArg()

OUString java_lang_Object::callStringMethodWithIntArg ( const char *  _pMethodName,
jmethodID &  _inout_MethodID,
sal_Int32  _nArgument 
) const

◆ callVoidMethod_ThrowRuntime()

void java_lang_Object::callVoidMethod_ThrowRuntime ( const char *  _pMethodName,
jmethodID &  _inout_MethodID 
) const

◆ callVoidMethod_ThrowSQL() [1/2]

template<typename T >
void connectivity::java_lang_Object::callVoidMethod_ThrowSQL ( const char *  _pMethodName,
const char *  _pSignature,
jmethodID &  _inout_MethodID,
sal_Int32  _nArgument,
const T &  _aValue 
) const
inline

Definition at line 134 of file Object.hxx.

References obtainMethodId_throwSQL(), t, and ThrowSQLException().

◆ callVoidMethod_ThrowSQL() [2/2]

void java_lang_Object::callVoidMethod_ThrowSQL ( const char *  _pMethodName,
jmethodID &  _inout_MethodID 
) const

Definition at line 330 of file Object.cxx.

References obtainMethodId_throwSQL(), t, and ThrowSQLException().

Referenced by connectivity::java_sql_PreparedStatement::addBatch(), connectivity::java_sql_ResultSet::afterLast(), connectivity::java_sql_ResultSet::beforeFirst(), connectivity::java_sql_ResultSet::cancelRowUpdates(), connectivity::java_sql_Statement::clearBatch(), connectivity::java_sql_PreparedStatement::clearBatch(), connectivity::java_sql_PreparedStatement::clearParameters(), connectivity::java_sql_Connection::clearWarnings(), connectivity::java_sql_Statement_Base::clearWarnings(), connectivity::java_sql_ResultSet::clearWarnings(), connectivity::java_sql_Connection::commit(), connectivity::java_sql_ResultSet::deleteRow(), connectivity::java_sql_Connection::disposing(), connectivity::OStatement_BASE2::disposing(), connectivity::java_sql_ResultSet::disposing(), connectivity::java_sql_ResultSet::insertRow(), connectivity::java_sql_ResultSet::moveToCurrentRow(), connectivity::java_sql_ResultSet::moveToInsertRow(), connectivity::java_lang_Throwable::printStackTrace(), connectivity::java_sql_ResultSet::refreshRow(), connectivity::java_sql_Connection::rollback(), connectivity::java_sql_PreparedStatement::setBoolean(), connectivity::java_sql_PreparedStatement::setByte(), connectivity::java_sql_PreparedStatement::setDate(), connectivity::java_sql_PreparedStatement::setDouble(), connectivity::java_sql_PreparedStatement::setFloat(), connectivity::java_sql_PreparedStatement::setInt(), connectivity::java_sql_PreparedStatement::setLong(), connectivity::java_sql_PreparedStatement::setNull(), connectivity::java_sql_PreparedStatement::setShort(), connectivity::java_sql_PreparedStatement::setTime(), connectivity::java_sql_PreparedStatement::setTimestamp(), connectivity::java_sql_ResultSet::updateBoolean(), connectivity::java_sql_ResultSet::updateByte(), connectivity::java_sql_ResultSet::updateDate(), connectivity::java_sql_ResultSet::updateDouble(), connectivity::java_sql_ResultSet::updateFloat(), connectivity::java_sql_ResultSet::updateInt(), connectivity::java_sql_ResultSet::updateLong(), connectivity::java_sql_ResultSet::updateRow(), connectivity::java_sql_ResultSet::updateShort(), connectivity::java_sql_ResultSet::updateTime(), and connectivity::java_sql_ResultSet::updateTimestamp().

◆ callVoidMethodWithBoolArg_ThrowRuntime()

void java_lang_Object::callVoidMethodWithBoolArg_ThrowRuntime ( const char *  _pMethodName,
jmethodID &  _inout_MethodID,
bool  _nArgument 
) const

◆ callVoidMethodWithBoolArg_ThrowSQL()

void java_lang_Object::callVoidMethodWithBoolArg_ThrowSQL ( const char *  _pMethodName,
jmethodID &  _inout_MethodID,
bool  _nArgument 
) const

◆ callVoidMethodWithIntArg_ThrowRuntime()

void java_lang_Object::callVoidMethodWithIntArg_ThrowRuntime ( const char *  _pMethodName,
jmethodID &  _inout_MethodID,
sal_Int32  _nArgument 
) const

◆ callVoidMethodWithIntArg_ThrowSQL()

void java_lang_Object::callVoidMethodWithIntArg_ThrowSQL ( const char *  _pMethodName,
jmethodID &  _inout_MethodID,
sal_Int32  _nArgument 
) const

◆ callVoidMethodWithStringArg()

void java_lang_Object::callVoidMethodWithStringArg ( const char *  _pMethodName,
jmethodID &  _inout_MethodID,
const OUString &  _nArgument 
) const

◆ clearObject() [1/2]

void java_lang_Object::clearObject ( )

◆ clearObject() [2/2]

void java_lang_Object::clearObject ( JNIEnv &  rEnv)

Definition at line 124 of file Object.cxx.

◆ findMyClass()

jclass java_lang_Object::findMyClass ( const char *  _pClassName)
static

Definition at line 466 of file Object.cxx.

References t.

Referenced by connectivity::createByteInputStream(), connectivity::createCharArrayReader(), getMyClass(), connectivity::java_io_InputStream::getMyClass(), connectivity::java_io_Reader::getMyClass(), connectivity::java_lang_Class::getMyClass(), connectivity::java_lang_Exception::getMyClass(), connectivity::java_math_BigDecimal::getMyClass(), connectivity::java_sql_Array::getMyClass(), connectivity::java_sql_Blob::getMyClass(), connectivity::java_sql_CallableStatement::getMyClass(), connectivity::java_sql_Clob::getMyClass(), connectivity::java_sql_Connection::getMyClass(), connectivity::java_sql_DatabaseMetaData::getMyClass(), connectivity::java_sql_DriverPropertyInfo::getMyClass(), connectivity::java_sql_Statement_Base::getMyClass(), connectivity::java_sql_Statement::getMyClass(), connectivity::java_sql_PreparedStatement::getMyClass(), connectivity::java_sql_Ref::getMyClass(), connectivity::java_sql_ResultSet::getMyClass(), connectivity::java_sql_ResultSetMetaData::getMyClass(), connectivity::java_sql_SQLWarning_BASE::getMyClass(), connectivity::java_util_Date::getMyClass(), connectivity::java_util_Properties::getMyClass(), connectivity::java_lang_Boolean::st_getMyClass(), connectivity::java_lang_String::st_getMyClass(), connectivity::java_lang_Throwable::st_getMyClass(), connectivity::java_sql_SQLException_BASE::st_getMyClass(), connectivity::java_sql_Date::st_getMyClass(), connectivity::java_sql_Time::st_getMyClass(), and connectivity::java_sql_Timestamp::st_getMyClass().

◆ getJavaObject()

jobject connectivity::java_lang_Object::getJavaObject ( ) const
inline

◆ getMyClass()

jclass java_lang_Object::getMyClass ( ) const
protectedvirtual

◆ getVM()

rtl::Reference< jvmaccess::VirtualMachine > java_lang_Object::getVM ( const css::uno::Reference< css::uno::XComponentContext > &  _rxContext = nullptr)

◆ obtainMethodId_throwRuntime()

void java_lang_Object::obtainMethodId_throwRuntime ( JNIEnv *  _pEnv,
const char *  _pMethodName,
const char *  _pSignature,
jmethodID &  _inout_MethodID 
) const

◆ obtainMethodId_throwSQL()

void java_lang_Object::obtainMethodId_throwSQL ( JNIEnv *  _pEnv,
const char *  _pMethodName,
const char *  _pSignature,
jmethodID &  _inout_MethodID 
) const

Definition at line 229 of file Object.cxx.

References getMyClass().

Referenced by callBooleanMethod(), callBooleanMethodWithIntArg(), callIntMethod_ThrowSQL(), callIntMethodWithIntArg_ThrowSQL(), callIntMethodWithStringArg(), callMethodWithIntArg(), callObjectMethod(), callObjectMethodWithIntArg(), callVoidMethod_ThrowSQL(), callVoidMethodWithBoolArg_ThrowSQL(), callVoidMethodWithIntArg_ThrowSQL(), callVoidMethodWithStringArg(), connectivity::java_sql_Statement_Base::execute(), connectivity::java_sql_Statement_Base::executeQuery(), connectivity::java_sql_Array::getArray(), connectivity::java_sql_Array::getArrayAtIndex(), connectivity::java_sql_DatabaseMetaData::getBestRowIdentifier(), connectivity::java_sql_Blob::getBytes(), connectivity::java_sql_DatabaseMetaData::getCrossReference(), connectivity::java_sql_DatabaseMetaData::getIndexInfo(), connectivity::java_sql_ResultSet::getObject(), connectivity::java_sql_Array::getResultSet(), connectivity::java_sql_Array::getResultSetAtIndex(), connectivity::java_sql_Clob::getSubString(), connectivity::java_sql_DatabaseMetaData::getTables(), connectivity::java_sql_DatabaseMetaData::getUDTs(), connectivity::java_sql_DatabaseMetaData::impl_callResultSetMethodWithStrings(), connectivity::java_math_BigDecimal::java_math_BigDecimal(), connectivity::java_util_Properties::java_util_Properties(), connectivity::java_sql_Blob::length(), connectivity::java_sql_Clob::length(), connectivity::java_sql_Connection::nativeSQL(), connectivity::java_sql_Blob::position(), connectivity::java_sql_Clob::position(), connectivity::java_sql_CallableStatement::registerNumericOutParameter(), connectivity::java_sql_CallableStatement::registerOutParameter(), connectivity::java_sql_PreparedStatement::setBinaryStream(), connectivity::java_sql_PreparedStatement::setBytes(), connectivity::java_sql_PreparedStatement::setCharacterStream(), connectivity::java_sql_PreparedStatement::setObjectWithInfo(), connectivity::java_util_Properties::setProperty(), connectivity::java_sql_PreparedStatement::setString(), connectivity::java_sql_DatabaseMetaData::supportsConvert(), connectivity::java_sql_DatabaseMetaData::supportsResultSetConcurrency(), connectivity::java_sql_ResultSet::updateBinaryStream(), connectivity::java_sql_ResultSet::updateBytes(), connectivity::java_sql_ResultSet::updateCharacterStream(), connectivity::java_sql_ResultSet::updateNumericObject(), and connectivity::java_sql_ResultSet::updateString().

◆ operator=()

java_lang_Object & connectivity::java_lang_Object::operator= ( java_lang_Object const &  )
privatedelete

◆ saveRef()

void java_lang_Object::saveRef ( JNIEnv *  pEnv,
jobject  myObj 
)

◆ ThrowLoggedSQLException()

void java_lang_Object::ThrowLoggedSQLException ( const ::comphelper::EventLogger _rLogger,
JNIEnv *  pEnvironment,
const css::uno::Reference< css::uno::XInterface > &  _rxContext 
)
static

Definition at line 197 of file Object.cxx.

References STR_LOG_THROWING_EXCEPTION.

Referenced by connectivity::java_sql_Connection::construct(), connectivity::java_sql_CallableStatement::createStatement(), connectivity::java_sql_Statement::createStatement(), connectivity::java_sql_PreparedStatement::createStatement(), connectivity::java_sql_Statement_Base::execute(), connectivity::java_sql_Statement_Base::executeQuery(), connectivity::java_sql_DatabaseMetaData::getBestRowIdentifier(), connectivity::java_sql_DatabaseMetaData::getCrossReference(), connectivity::java_sql_DatabaseMetaData::getIndexInfo(), connectivity::java_sql_ResultSet::getObject(), connectivity::java_sql_DatabaseMetaData::getUDTs(), connectivity::java_sql_DatabaseMetaData::impl_callResultSetMethodWithStrings(), connectivity::java_sql_Connection::loadDriverFromProperties(), connectivity::java_sql_Connection::nativeSQL(), connectivity::java_sql_CallableStatement::registerNumericOutParameter(), connectivity::java_sql_CallableStatement::registerOutParameter(), connectivity::java_sql_PreparedStatement::setBinaryStream(), connectivity::java_sql_PreparedStatement::setBytes(), connectivity::java_sql_PreparedStatement::setCharacterStream(), connectivity::java_sql_PreparedStatement::setObjectWithInfo(), connectivity::java_sql_PreparedStatement::setString(), connectivity::java_sql_DatabaseMetaData::supportsConvert(), connectivity::java_sql_DatabaseMetaData::supportsResultSetConcurrency(), connectivity::java_sql_ResultSet::updateBinaryStream(), connectivity::java_sql_ResultSet::updateBytes(), connectivity::java_sql_ResultSet::updateCharacterStream(), connectivity::java_sql_ResultSet::updateNumericObject(), and connectivity::java_sql_ResultSet::updateString().

◆ ThrowRuntimeException()

void java_lang_Object::ThrowRuntimeException ( JNIEnv *  pEnv,
const css::uno::Reference< css::uno::XInterface > &  _rContext 
)
static

◆ ThrowSQLException()

void java_lang_Object::ThrowSQLException ( JNIEnv *  pEnv,
const css::uno::Reference< css::uno::XInterface > &  _rContext 
)
static

◆ toString()

OUString java_lang_Object::toString ( ) const

Definition at line 150 of file Object.cxx.

References callStringMethod().

Member Data Documentation

◆ object

jobject connectivity::java_lang_Object::object
protected

Definition at line 65 of file Object.hxx.

Referenced by getJavaObject().

◆ theClass

jclass java_lang_Object::theClass = nullptr
staticprotected

Definition at line 69 of file Object.hxx.

Referenced by getMyClass().


The documentation for this class was generated from the following files: