OCILIB (C and C++ Driver for Oracle)
4.7.5
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
|
Object identifying the SQL data type OBJECT. More...
#include <types.hpp>
Inherits ocilib::core::HandleHolder< OCI_Object * >, and ocilib::core::Streamable.
Public Types | |
enum | ObjectTypeValues { Persistent = OCI_OBJ_PERSISTENT , Transient = OCI_OBJ_TRANSIENT , Value = OCI_OBJ_VALUE } |
Object Type enumerated values. More... | |
typedef core::Enum< ObjectTypeValues > | ObjectType |
Object Type. | |
Public Member Functions | |
Object () | |
Create an empty null Object instance. | |
Object (const TypeInfo &typeInfo) | |
Parametrized constructor. | |
bool | IsAttributeNull (const ostring &name) const |
Check if an object attribute is null. | |
void | SetAttributeNull (const ostring &name) |
Set the given object attribute to null. | |
TypeInfo | GetTypeInfo () const |
Return the TypeInfo object describing the object. | |
Reference | GetReference () const |
Creates a reference on the current object. | |
ObjectType | GetType () const |
Return the type of the given object. | |
template<class T > | |
T | Get (const ostring &name) const |
Return the given object attribute value. | |
template<class T > | |
void | Get (const ostring &name, T &value) const |
Assign the given value with the given object attribute value. | |
template<class T > | |
void | Get (const ostring &name, Collection< T > &value) const |
Assign the given collection with the given object attribute value of type collection. | |
template<class T > | |
void | Set (const ostring &name, const T &value) |
Set the given object attribute value. | |
Object | Clone () const |
Clone the current instance to a new one performing deep copy. | |
ostring | ToString () const override |
return a string representation of the current object | |
Object identifying the SQL data type OBJECT.
This class wraps the OCILIB object handle OCI_Object and its related methods
Object Type.
Possible values are Object::ObjectTypeValues
|
inline |
Create an empty null Object instance.
Definition at line 32 of file Object.hpp.
|
inline |
Parametrized constructor.
typeInfo | - type info descriptor |
Definition at line 36 of file Object.hpp.
References ocilib::core::Check(), ocilib::TypeInfo::GetConnection(), and OCI_ObjectCreate().
|
inline |
Check if an object attribute is null.
name | - Attribute name |
Definition at line 60 of file Object.hpp.
References ocilib::core::Check(), and OCI_ObjectIsNull().
|
inline |
Set the given object attribute to null.
name | - Attribute name |
Definition at line 65 of file Object.hpp.
References ocilib::core::Check(), and OCI_ObjectSetNull().
|
inline |
Return the TypeInfo object describing the object.
Definition at line 70 of file Object.hpp.
References ocilib::core::Check(), OCI_ObjectGetTypeInfo(), and OCI_TypeInfoGetConnection().
Referenced by Clone(), and GetReference().
|
inline |
Creates a reference on the current object.
Definition at line 83 of file Object.hpp.
References ocilib::core::Check(), ocilib::TypeInfo::GetConnection(), GetTypeInfo(), OCI_ObjectGetSelfRef(), and OCI_RefCreate().
|
inline |
Return the type of the given object.
Definition at line 95 of file Object.hpp.
References ocilib::core::Check(), and OCI_ObjectGetType().
T ocilib::Object::Get | ( | const ostring & | name | ) | const |
Return the given object attribute value.
T | - C++ object type to retrieve |
name | - Attribute name |
Definition at line 233 of file Object.hpp.
References ocilib::core::Check(), and OCI_ObjectGetColl().
void ocilib::Object::Get | ( | const ostring & | name, |
T & | value | ||
) | const |
Assign the given value with the given object attribute value.
T | - C++ object type to retrieve |
name | - Attribute name |
value | - value to assign |
void ocilib::Object::Get | ( | const ostring & | name, |
Collection< T > & | value | ||
) | const |
Assign the given collection with the given object attribute value of type collection.
T | - C++ object type of the collection to retrieve |
name | - Attribute name |
value | - value to assign |
void ocilib::Object::Set | ( | const ostring & | name, |
const T & | value | ||
) |
Set the given object attribute value.
T | - C++ object type to set |
name | - Attribute name |
value | - Attribute value |
Definition at line 368 of file Object.hpp.
References ocilib::core::Check(), and OCI_ObjectSetColl().
|
inline |
Clone the current instance to a new one performing deep copy.
Definition at line 51 of file Object.hpp.
References ocilib::core::Check(), GetTypeInfo(), and OCI_ObjectAssign().
|
inlineoverridevirtual |
return a string representation of the current object
Implements ocilib::core::Streamable.
Definition at line 373 of file Object.hpp.
References ocilib::core::Check(), ocilib::core::MakeString(), and OCI_ObjectToText().