Sparksee  6.0.2
STSValue Class Reference

Value class. More...

Inheritance diagram for STSValue:
Inheritance graph
Collaboration diagram for STSValue:
Collaboration graph

Instance Methods

(id) - init
 Creates a new instance. More...
 
(id) - initWithValue:
 Copy constructor. More...
 
(BOOL) - isNull
 Gets if this is a NULL Value. More...
 
(void) - setNullVoid
 Sets the Value to NULL.
 
(enum STSDataType) - getDataType
 Gets the DataType. More...
 
(BOOL) - getBoolean
 Gets Boolean Value. More...
 
(int) - getInteger
 Gets Integer Value. More...
 
(long long) - getLong
 Gets Long Value. More...
 
(double) - getDouble
 Gets Double Value. More...
 
(long long) - getTimestamp
 Gets Timestamp Value. More...
 
(NSString *) - getString
 Gets String Value. More...
 
(long long) - getOid
 Gets OID Value. More...
 
(void) - setBooleanVoid:
 Sets the Value. More...
 
(void) - setIntegerVoid:
 Sets the Value. More...
 
(void) - setLongVoid:
 Sets the Value. More...
 
(void) - setDoubleVoid:
 Sets the Value. More...
 
(void) - setTimestampVoid:
 Sets the Value. More...
 
(void) - setTimestampVoidWithYear:month:day:hour:minutes:seconds:millisecs:
 Sets the Value. More...
 
(void) - setStringVoid:
 Sets the Value. More...
 
(void) - setOidVoid:
 Sets the OID Value. More...
 
(void) - setVoid:
 Sets the Value. More...
 
(int) - compare:
 Compares with the given Value. More...
 
(BOOL) - equals:
 Compares with the given Value. More...
 
(NSString *) - stringValue
 Returns the receiver’s value as a human-readable string.
 
(BOOL) - isEqual:
 Check if both Value instances are equal.
 
(NSUInteger) - hash
 Get the hash value of this Value.
 
(STSValue *) - setNull
 Sets the value to NULL. More...
 
(STSValue *) - setBoolean:
 Sets the value to the given boolean. More...
 
(STSValue *) - setInteger:
 Sets the value to the given integer number. More...
 
(STSValue *) - setLong:
 Sets the value to the given long long number. More...
 
(STSValue *) - setDouble:
 Sets the value to the given double number. More...
 
(STSValue *) - setTimestamp:
 Sets the value to the given timestamp. More...
 
(STSValue *) - setTimestampWithYear:month:day:hour:minutes:seconds:milliseconds:
 Sets the value to the given timestamp. More...
 
(STSValue *) - setString:
 Sets the value to the given string. More...
 
(STSValue *) - setOid:
 Sets the value to the given OID. More...
 
(STSValue *) - set:
 Sets the value to the given Value. More...
 
(NSDate *) - getTimestampAsNSDate
 Gets Timestamp Value as a NSDate. More...
 
(STSValue *) - setTimestampWithNSDate:
 Sets the value to the given NSDate timestamp. More...
 

Class Methods

(int) + getMaxLengthString
 Maximum number of characters allowed for a String.
 

Detailed Description

Value class.

It is a container which stores a value and its data type (domain). A Value can be NULL.

Author
Sparsity Technologies http://www.sparsity-technologies.com

Method Documentation

- (int) compare: (STSValue *)  value

Compares with the given Value.

It does not work if the given Value objects does not have the same DataType.

Parameters
valueGiven value to compare to.
Returns
0 if this Value is equal to the given one; a value less than 0 if this Value is less than the given one; and a value greater than 0 if this Value is greater than the given one.
- (BOOL) equals: (STSValue *)  value

Compares with the given Value.

It does not work if the given Value objects does not have the same DataType.

Parameters
valueGiven value to compare to.
Returns
TRUE if this Value is equal to the given one; FALSE otherwise.
- (BOOL) getBoolean

Gets Boolean Value.

This must be a non-NULL Boolean Value.

Returns
The Boolean Value.
- (enum STSDataType) getDataType

Gets the DataType.

Value cannot be NULL.

Returns
The DataType.
- (double) getDouble

Gets Double Value.

This must be a non-NULL Double Value.

Returns
The Double Value.
- (int) getInteger

Gets Integer Value.

This must be a non-NULL Integer Value.

Returns
The Integer Value.
- (long long) getLong

Gets Long Value.

This must be a non-NULL Long Value.

Returns
The Long Value.
- (long long) getOid

Gets OID Value.

This must be an non-NULL OID Value.

Returns
The OID Value.
- (NSString*) getString

Gets String Value.

This must be a non-NULL String Value.

Returns
The String Value.
- (long long) getTimestamp

Gets Timestamp Value.

This must be a non-NULL Timestamp Value.

Returns
The Timestamp Value.
- (NSDate *) getTimestampAsNSDate

Gets Timestamp Value as a NSDate.

This must be a non-NULL Timestamp Value.

Returns
The Timestamp Value.
- (id) init

Creates a new instance.

It creates a NULL Value.

- (id) initWithValue: (STSValue *)  value

Copy constructor.

Parameters
value[in] Value to be copied.
- (BOOL) isNull

Gets if this is a NULL Value.

Returns
TRUE if this is a NULL Value, FALSE otherwise.
- (STSValue*) set: (STSValue *)  value

Sets the value to the given Value.

Parameters
value[in] The new value.
Returns
Returns this Value.
- (STSValue*) setBoolean: (BOOL)  value

Sets the value to the given boolean.

Parameters
value[in] The new value.
Returns
Returns this Value.
- (void) setBooleanVoid: (BOOL)  value

Sets the Value.

Parameters
value[in] New Boolean value.
- (STSValue*) setDouble: (double)  value

Sets the value to the given double number.

Parameters
value[in] The new value.
Returns
Returns this Value.
- (void) setDoubleVoid: (double)  value

Sets the Value.

Parameters
value[in] New Double value.
- (STSValue*) setInteger: (int)  value

Sets the value to the given integer number.

Parameters
value[in] The new value.
Returns
Returns this Value.
- (void) setIntegerVoid: (int)  value

Sets the Value.

Parameters
value[in] New Integer value.
- (STSValue*) setLong: (long long)  value

Sets the value to the given long long number.

Parameters
value[in] The new value.
Returns
Returns this Value.
- (void) setLongVoid: (long long)  value

Sets the Value.

Parameters
value[in] New Long value.
- (STSValue*) setNull

Sets the value to NULL.

Returns
Returns this Value.
- (STSValue*) setOid: (long long)  value

Sets the value to the given OID.

Parameters
value[in] The new value.
Returns
Returns this Value.
- (void) setOidVoid: (long long)  value

Sets the OID Value.

Parameters
value[in] New OID value.
- (STSValue*) setString: (NSString *)  value

Sets the value to the given string.

Parameters
value[in] The new value.
Returns
Returns this Value.
- (void) setStringVoid: (NSString *)  value

Sets the Value.

Parameters
value[in] New String value.
- (STSValue*) setTimestamp: (long long)  value

Sets the value to the given timestamp.

Parameters
value[in] The new value.
Returns
Returns this Value.
- (void) setTimestampVoid: (long long)  value

Sets the Value.

Parameters
value[in] New Timestamp value.
- (void) setTimestampVoidWithYear: (int)  year
month: (int)  month
day: (int)  day
hour: (int)  hour
minutes: (int)  minutes
seconds: (int)  seconds
millisecs: (int)  millisecs 

Sets the Value.

Parameters
year[in] The year (>=1970).
month[in] The month ([1..12]).
day[in] The of the month ([1..31]).
hour[in] The hour ([0..23]).
minutes[in] The minutes ([0..59]).
seconds[in] The seconds ([0..59]).
millisecs[in] The milliseconds ([0..999]).
- (STSValue*) setTimestampWithNSDate: (NSDate *)  date

Sets the value to the given NSDate timestamp.

Parameters
value[in] The new value.
Returns
Returns this Value.
- (STSValue*) setTimestampWithYear: (int)  year
month: (int)  month
day: (int)  day
hour: (int)  hour
minutes: (int)  minutes
seconds: (int)  seconds
milliseconds: (int)  millisecs 

Sets the value to the given timestamp.

Parameters
year[in] The year (>=1970).
month[in] The month ([1..12]).
day[in] The of the month ([1..31]).
hour[in] The hour ([0..23]).
minutes[in] The minutes ([0..59]).
seconds[in] The seconds ([0..59]).
millisecs[in] The milliseconds ([0..999]).
Returns
Returns this Value.
- (void) setVoid: (STSValue *)  value

Sets the Value.

Parameters
value[in] New value.

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