Instances of this class represent the values of objects or collections of ORDBMSs. More...
#include <ildblink/ildadtval.h>
Public Member Functions | |
IldADTValue (const IldADTDescriptor *type, const char *table=0) | |
This constructor builds an ADT value skeleton and stores the type descriptor. More... | |
virtual | ~IldADTValue () |
This destructor deletes all the registered values but does not delete the abstract data type descriptor. | |
IldADTType | getADTType () const |
Get the type. More... | |
IldADTValue * | getADTValue (IlUInt index) const |
Get the abstract data type value. More... | |
IldBytes | getBytesValue (IlUInt index) const |
Get a binary value. More... | |
IlUChar | getByteValue (IlUInt index) const |
Get the byte value. More... | |
IlUInt | getCount () const |
Get the number of values set. More... | |
IldDateTime | getDateTimeValue (IlUInt index) const |
Get a date value as object. More... | |
const char * | getDateValue (IlUInt index) const |
Get a date value as string. More... | |
const IldADTDescriptor * | getDescriptor () const |
Get the type descriptor. More... | |
IlInt | getIntegerValue (IlUInt index) const |
Get the integer value. More... | |
double | getMoneyValue (IlUInt index) const |
Get the money value. More... | |
IlNumeric | getNumericValue (IlUInt index) const |
Get a numeric value as object. More... | |
const char * | getPurgedStringValue (IlUInt index) const |
Get the trimmed string value. More... | |
double | getRealValue (IlUInt index) const |
Get the floating point value. More... | |
IldBytes | getRefValue (IlUInt index) const |
Get a reference value. More... | |
const char * | getRTrimedStringValue (IlUInt index) const |
Get the trimmed string value. More... | |
const char * | getStringValue (IlUInt index) const |
Get the string value. More... | |
const char * | getTableName () const |
Get the table name. More... | |
IldColumnType | getType (IlUInt index) const |
Get the type of the value. More... | |
const char * | getTypeName () const |
Get the type name. More... | |
IlBoolean | isNull (IlUInt index) const |
Tell if a value is null. More... | |
IlBoolean | setNull (IlBoolean flag, IlUInt index) |
Set the null indicator of a value. More... | |
IlBoolean | setValue (const char *val, IlUInt index) |
Set the value as string. More... | |
IlBoolean | setValue (const IldDateTime *val, IlUInt index) |
Set the value as an IldDateTime object. More... | |
IlBoolean | setValue (const IlNumeric *val, IlUInt index) |
Set the value as an IlNumeric object. More... | |
IlBoolean | setValue (double val, IlUInt index) |
Set the value as double. More... | |
IlBoolean | setValue (IldADTValue *val, IlUInt index) |
Set the value as an IldADTValue object. More... | |
IlBoolean | setValue (IldBytes val, IlUInt index) |
Set the value as a IldBytes structure. More... | |
IlBoolean | setValue (IlInt val, IlUInt index) |
Set the value as integer. More... | |
IlBoolean | setValue (IlUChar val, IlUInt index) |
Set the value as byte. More... | |
Instances of this class represent the values of objects or collections of ORDBMSs.
Library: dbkernel
set
functions), if the object is a collection and the given position is greater than the number of values set, then the new value is added at the end of the list.The resulting position may differ from the one passed as an argument. Thus, if the order of the values is relevant, they must be set in that order.
IldColumnType
, IldDateTime
, IlNumeric
, IlUChar
. IldADTValue::IldADTValue | ( | const IldADTDescriptor * | type, |
const char * | table = 0 |
||
) |
This constructor builds an ADT value skeleton and stores the type descriptor.
type | The descriptor for the user defined type. |
table | The name of the table using the type. |
The second argument is optional for Oracle, but mandatory for Informix. It is used to get the Informix type descriptor when the value is to be sent to the server.
IldADTType IldADTValue::getADTType | ( | ) | const |
Get the type.
IldADTValue* IldADTValue::getADTValue | ( | IlUInt | index | ) | const |
Get the abstract data type value.
index | The index of value in object. |
IldADTValue
pointer.If the value is null
, if index is greater than the number of values set, or if the actual type of the value is not IldObjectType
or IldCollectionType
, then it returns a null
pointer.
Get a binary value.
index | The index of value in object. |
IldBytes
structure.If the value is null
, if index is greater than the number of values set, or if the actual type of the value is not IldBinaryType
, then it returns an empty IldBytes
structure.
Get the byte value.
index | The index of value in object. |
IlUChar
value.This member function returns 0
if:
null
, IldByteType
. IlUInt IldADTValue::getCount | ( | ) | const |
Get the number of values set.
IldDateTime IldADTValue::getDateTimeValue | ( | IlUInt | index | ) | const |
Get a date value as object.
index | The index of value in object. |
IldDateTime
object.If the value is null
, if index is greater than the number of values set, or if the actual type of the value is not IldDateTimeType
, then it returns an empty object whose slots are all set to 0.
const char* IldADTValue::getDateValue | ( | IlUInt | index | ) | const |
Get a date value as string.
index | The index of value in object. |
This member function behaves exactly like the function getStringValue()
.
This function returns 0
if the value is null
, or the argument index is greater than the number of values set, or the actual type of the value is not IldStringType
.
const IldADTDescriptor* IldADTValue::getDescriptor | ( | ) | const |
Get the type descriptor.
Get the integer value.
index | The value index in the object. |
null
, if index is greater than the number of values set, or if the actual type of the value is not IldIntegerType
or IldRealType
, then it returns 0
. IldRealType
, it is converted to an IlInt
regardless of a possible overflow. double IldADTValue::getMoneyValue | ( | IlUInt | index | ) | const |
Get the money value.
index | The index of value in object. |
double
.This member function behaves exactly like the function getRealValue()
.
null
or index is greater than the number of values set, or the actual type of the value is not IldIntegerType
or IldRealType
, it returns 0.0
. IldIntegerType
, it is converted to double
. Get a numeric value as object.
index | The index of value in object. |
IlNumeric
object.If the value is null
, if the argument index is greater than the number of values set, or if the actual type of the value is not IlNumericType
, this function returns an empty object whose slots are all set to 0.
const char* IldADTValue::getPurgedStringValue | ( | IlUInt | index | ) | const |
Get the trimmed string value.
index | The value index in object. |
If the value is null
, if index is greater than the number of values set, or if the actual type of the value is not IldStringType
, then it returns 0
.
getRTrimedStringValue()
should be preferred. double IldADTValue::getRealValue | ( | IlUInt | index | ) | const |
Get the floating point value.
index | The index of value in object. |
double
.null
or index is greater than the number of values set, or the actual type of the value is not IldIntegerType
or IldRealType
, then it returns 0.0
. IldIntegerType
, it is converted to a double
. Get a reference value.
index | The index of value in object. |
IldBytes
structure.If the value is null
, or if index is greater than the number of values set, or if the actual type of the value is not IldRefType
, then it returns an empty structure.
const char* IldADTValue::getRTrimedStringValue | ( | IlUInt | index | ) | const |
Get the trimmed string value.
index | The value index in object. |
CHAR
.If the value is null
, if index is greater than the number of values set, or if the actual type of the value is not IldStringType
, then it returns 0
.
const char* IldADTValue::getStringValue | ( | IlUInt | index | ) | const |
Get the string value.
index | The value index in object. |
If the value is null
or index is greater than the number of values set or the actual type of the value is not IldStringType
, it returns 0
.
const char* IldADTValue::getTableName | ( | ) | const |
Get the table name.
IldColumnType IldADTValue::getType | ( | IlUInt | index | ) | const |
Get the type of the value.
index | The value index in the object |
const char* IldADTValue::getTypeName | ( | ) | const |
Get the type name.
Tell if a value is null.
index | The value index in the object. |
IlTrue
if the value at position index is null
, IlFalse
if not.If index is greater than the number of values set, IlTrue
is returned.
Set the null
indicator of a value.
flag | The value to set. |
index | The index of the value. |
If there is no value at the given position, the indicator is added at the end of the values list. Otherwise, the previous value is overwritten. If the list cannot be extended, the function returns IlFalse
. Otherwise, it returns IlTrue
.
Set the value as string.
val | The string value to set. |
index | The index in object. |
If index is greater than the number of values set, the new value is added at the end of the values list. Otherwise, the previous value is overwritten. If the list cannot be extended, the function returns IlFalse
. Otherwise, it returns IlTrue
.
IlBoolean IldADTValue::setValue | ( | const IldDateTime * | val, |
IlUInt | index | ||
) |
Set the value as an IldDateTime
object.
val | The date time object to set. |
index | The index in object. |
If index
is greater than the number of values set, then the new value is added at the end of the list. Otherwise, the previous value is overwritten. If the list cannot be extended, the function returns IlFalse
. Otherwise, it returns IlTrue
.
Set the value as an IlNumeric
object.
val | The numeric to set. |
index | The index in object. |
If index is greater than the number of values set, then the new value is added at the end of the list. Otherwise, the previous value is overwritten. If the values list cannot be extended, it returns IlFalse
. Otherwise, it returns IlTrue
.
Set the value as double.
val | The double value to set. |
index | The index in object. |
If index is greater than the number of values set, then the new value is added at the end of the values list. Otherwise, the previous value is overwritten. If the list cannot be extended, the function returns IlFalse
. Otherwise, it returns IlTrue
.
IlBoolean IldADTValue::setValue | ( | IldADTValue * | val, |
IlUInt | index | ||
) |
Set the value as an IldADTValue
object.
val | The abstract data type object to set. |
index | The index in object. |
If index is greater than the number of values set, then the new value is added at the end of the list. Otherwise, the previous value is overwritten. If the values list cannot be extended, it returns IlFalse
. Otherwise, it returns IlTrue
.
setValue()
functions (that take numeric and date argument values), this member function does not copy the value passed. Set the value as a IldBytes
structure.
val | The structure to set the value. |
index | The index in object. |
If index is greater than the number of values set, then the new value is added at the end of the list. Otherwise, the previous value is overwritten. If the list cannot be extended, the function returns IlFalse
. Otherwise, it returns IlTrue
.
The value is copied. It can be released after the call to setValue
.
Set the value as integer.
val | The value to set. |
index | The index in object. |
If index is greater than the number of values set, then the new value is added at the end of the list. Otherwise, the previous value is overwritten. If the list cannot be extended, the function returns IlFalse
. Otherwise, it returns IlTrue
.
Set the value as byte.
index | The index in object. |
val | The byte value to set. |
If index is greater than the number of values set, then the new value is added at the end of the values list. Otherwise, the previous value is overwritten. If the list cannot be extended, the function returns IlFalse
. Otherwise, it returns IlTrue
.