DataValue

parasql.schema. DataValue

The DataValue class wraps an actual database data value and monitors any changes to it. If you change the value of a DataValue object that change will not become visible in the user interface of your application until you call parasql.widget.AbstractWidget#redisplay on the widget or one of its parents.

Constructor

new DataValue(initialValuenullable)

License:
Parameters:
Name Type Attributes Description
initialValue string <nullable>

Optional initial value for this DataValue; the default is null.

Extends

  • Object

Methods

discardChanges()

equals(dataValue) → {boolean}

Parameters:
Name Type Description
dataValue parasql.schema.DataValue
Returns:

True if this DataValue has the same value as the specified DataValue.

Type
boolean

getBlobImageServingURL() → (nullable) {string}

Returns:

Only returns a value for GCSIMAGE (ImageUploadField class) or GCS_SIGNATURE (SignatureField class) types, otherwise returns undefined.

Type
string

getBlobObjectName() → {string}

Returns:
Type
string

getBoolean() → {boolean}

Returns:

Returns true or false as represented by this DataValue. To test for NULL values use isNull().

Type
boolean

getDate() → {Date}

Returns:

Returns the data represented by this DataValue. To test for NULL values use isNull().

Type
Date

getDateTime() → {Date}

Returns:

Returns the datetime represented by this DataValue. To test for NULL values use isNull().

Type
Date

getNumber() → {number}

Returns:

Returns the number represented by this DataValue. To test for NULL values use isNull().

Type
number

getString() → {string}

Returns:

Returns the string representation of this DataValue. To test for NULL values use isNull().

Type
string

getTime() → {Date}

Returns:

Returns the time represented by this DataValue. To test for NULL values use isNull().

Type
Date

isChanged() → {boolean}

Returns:
Type
boolean

isNotNull() → {boolean}

Returns:
Type
boolean

isNull() → {boolean}

Returns:
Type
boolean

resetChangeTracker()

Marks this DataValue as not changed and sets its originalValue to its current value.

Description:
  • Marks this DataValue as not changed and sets its originalValue to its current value.

setBoolean(flagnon-null)

Parameters:
Name Type Description
flag boolean

setDate(datenon-null)

Parameters:
Name Type Description
date Date

Sets this DataValue to the date portion of the date object; the time portion is ignored.

setDateTime(datetimenon-null)

Parameters:
Name Type Description
datetime Date

setNull()

Make this value SQL NULL.

Description:
  • Make this value SQL NULL.

setNumber(numnon-null)

Parameters:
Name Type Description
num number

setString(newValuenon-null)

Sets the current value of this object.

Description:
  • Sets the current value of this object.

Parameters:
Name Type Description
newValue string

The empty string represents SQL NULL.

setTime(timenon-null)

Parameters:
Name Type Description
time Date

Sets this DataValue to the time portion of the date object.

takeValueFrom(dataValuenon-null)

Takes the value of the specified DataValue and assigns it to this DataValue object.

Description:
  • Takes the value of the specified DataValue and assigns it to this DataValue object.

Parameters:
Name Type Description
dataValue parasql.schema.DataValue