User API

PacketDataRecord extends DataRecord

Other API in Package

Web

Internal Tunnel

Internal Web

Tunnel

Method Summary
String get(String key)

Returns the value associated with key if it exists, null otherwise.

Boolean getBoolean(String field)

Returns the given field as a boolean. The value must be true or false. Throws exception if the value does not exist or cannot be cast to the correct type.

Boolean getCommonBoolean(String field)

Returns the given field as a boolean. The value must be any of the following combinations: [true/false], [1/0], [yes,no], [on,off]. Throws exception if the value does not exist or cannot be cast to the correct type.

Data getData()

Returns the name/value data of this record. Changes made are persisted.

String getDataValue(String name)

Gets the value of the specified column referenced by name

Date getDate(String field)

Returns the given field as a Date. Throws exception if the value does not exist or cannot be cast to the correct type.

Boolean getDefaultBoolean(String field, Boolean defaultBoolean)

Returns the given field as a boolean. If the field does not exist or refers to a non-boolean field, it returns the default value

Date getDefaultDate(String field, Date defaultDate)

Returns the given field as a date. If the field does not exist or refers to a non-date field, it returns the default value

Double getDefaultDouble(String field, Number defaultDouble)

Returns the given field as a double. If the field does not exist or refers to a non-double field, it returns the default value

Integer getDefaultInt(String field, Number defaultInt)

Returns the given field as an int. If the field does not exist or refers to a non-int field, it returns the default value

String getDefaultValue(String field, String defaultValue, boolean emptyIsNull)

Returns the given field. If the field does not exist, it returns the default value. If the field exists but is value is empty, this method returns defaultValue only if emptyIsNull=true.

Double getDouble(String key)

Returns the given value of the given key as a double. Throws exception if the value does not exist or cannot be cast to the correct type.

int getIndex()

Returns this record's index in the DataList

Integer getInt(String key)

Returns the given value of the given key as an Java Int which is smaller than a Javascript Int. Throws exception if the value does not exist or cannot be cast to the correct type.

Long getLong(String key)

Returns the given value of the given key as Java Long which is larger. Throws exception if the value does not exist or cannot be cast to the correct type.

String getValue(String key)

Returns the value associated with key if it exists, null otherwise.

String getValue(int column)

Gets the value of the specified column referenced by index

boolean set(String name, Object value)

Sets the string value referenced by name. Returns false on fail (e.g. if the column does not exist, etc). The object must be capable of being serialized as a String.

boolean setBoolean(String name, Boolean value)

Sets the boolean value of the specified column referenced by name. Returns false if the column does not exist.

boolean setData(Data data)

Sets the values in this DataRecord, matching keys in the Data to columns in the record. Returns false if the data object is null.

boolean setDataValue(String name, String value)

Sets the value of the specified column referenced by name. Returns false if the column does not exist.

boolean setDate(String name, Date value)

Sets the date value of the specified column referenced by name. Returns false if the column does not exist.

boolean setDateValue(String name, Date value)

Sets the value of the specified date column referenced by name. Returns false if the column does not exist.

boolean setDouble(String name, Number double)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

boolean setInt(String name, Number value)

Sets the integer value of the specified column referenced by name. Returns false if the column does not exist.

boolean setString(String name, String value)

Sets the string value of the specified column referenced by name. Returns false if the column does not exist.

  setValue(String key, Object value)

Sets the string value referenced by name. The object must be capable of being serialized as a String.

String toString()

Returns a description of this object.

Method Detail


String get(String key)

Returns the value associated with key if it exists, null otherwise.

Parameters:

  • String   key

Returns:  String

Since: 08-28-2018

top

Boolean getBoolean(String field)

Returns the given field as a boolean. The value must be true or false. Throws exception if the value does not exist or cannot be cast to the correct type.

Parameters:

  • String   field

Returns:  Boolean

Since: 07-11-2008

top

Boolean getCommonBoolean(String field)

Returns the given field as a boolean. The value must be any of the following combinations: [true/false], [1/0], [yes,no], [on,off]. Throws exception if the value does not exist or cannot be cast to the correct type.

Parameters:

  • String   field

Returns:  Boolean

Since: 08-22-2008

top

Data getData()

Returns the name/value data of this record. Changes made are persisted.

Returns:  Data

Since: 07-11-2008

top

String getDataValue(String name)

Gets the value of the specified column referenced by name

Parameters:

  • String   name

Returns:  String

Since: 07-11-2008

top

Date getDate(String field)

Returns the given field as a Date. Throws exception if the value does not exist or cannot be cast to the correct type.

Parameters:

  • String   field

Returns:  Date

Since: 07-11-2008

top

Boolean getDefaultBoolean(String field, Boolean defaultBoolean)

Returns the given field as a boolean. If the field does not exist or refers to a non-boolean field, it returns the default value

Parameters:

  • String   field
  • Boolean   defaultBoolean

Returns:  Boolean

Since: 09-05-2008

top

Date getDefaultDate(String field, Date defaultDate)

Returns the given field as a date. If the field does not exist or refers to a non-date field, it returns the default value

Parameters:

  • String   field
  • Date   defaultDate

Returns:  Date

Since: 09-05-2008

top

Double getDefaultDouble(String field, Number defaultDouble)

Returns the given field as a double. If the field does not exist or refers to a non-double field, it returns the default value

Parameters:

  • String   field
  • Number   defaultDouble

Returns:  Double

Since: 09-05-2008

top

Integer getDefaultInt(String field, Number defaultInt)

Returns the given field as an int. If the field does not exist or refers to a non-int field, it returns the default value

Parameters:

  • String   field
  • Number   defaultInt

Returns:  Integer

Since: 09-05-2008

top

String getDefaultValue(String field, String defaultValue, boolean emptyIsNull)

Returns the given field. If the field does not exist, it returns the default value. If the field exists but is value is empty, this method returns defaultValue only if emptyIsNull=true.

Parameters:

  • String   field
  • String   defaultValue
  • boolean   emptyIsNull

Returns:  String

Since: 09-05-2008

top

Double getDouble(String key)

Returns the given value of the given key as a double. Throws exception if the value does not exist or cannot be cast to the correct type.

Parameters:

  • String   key Required parameter.

Returns:  Double

Since: 07-11-2008

top

int getIndex()

Returns this record's index in the DataList

Returns:  int

Since: 07-11-2008

top

Integer getInt(String key)

Returns the given value of the given key as an Java Int which is smaller than a Javascript Int. Throws exception if the value does not exist or cannot be cast to the correct type.

Parameters:

  • String   key Required parameter.

Returns:  Integer

Since: 07-11-2008

top

Long getLong(String key)

Returns the given value of the given key as Java Long which is larger. Throws exception if the value does not exist or cannot be cast to the correct type.

Parameters:

  • String   key Required parameter.

Returns:  Long

Since: 05-28-2022

top

String getValue(String key)

Returns the value associated with key if it exists, null otherwise.

Parameters:

  • String   key

Returns:  String

Since: 07-11-2008

top

String getValue(int column)

Gets the value of the specified column referenced by index

Parameters:

  • int   column

Returns:  String

Since: 07-11-2008

top

boolean set(String name, Object value)

Sets the string value referenced by name. Returns false on fail (e.g. if the column does not exist, etc). The object must be capable of being serialized as a String.

Parameters:

  • String   name
  • Object   value

Returns:  boolean

Since: 08-28-2018

top

boolean setBoolean(String name, Boolean value)

Sets the boolean value of the specified column referenced by name. Returns false if the column does not exist.

Parameters:

  • String   name
  • Boolean   value

Returns:  boolean

Since: 08-28-2018

top

boolean setData(Data data)

Sets the values in this DataRecord, matching keys in the Data to columns in the record. Returns false if the data object is null.

Parameters:

Returns:  boolean

Since: 07-11-2008

top

boolean setDataValue(String name, String value)

Sets the value of the specified column referenced by name. Returns false if the column does not exist.

Parameters:

  • String   name
  • String   value

Returns:  boolean

Since: 07-11-2008

top

boolean setDate(String name, Date value)

Sets the date value of the specified column referenced by name. Returns false if the column does not exist.

Parameters:

  • String   name
  • Date   value

Returns:  boolean

Since: 08-28-2018

top

boolean setDateValue(String name, Date value)

Sets the value of the specified date column referenced by name. Returns false if the column does not exist.

Parameters:

  • String   name
  • Date   value

Returns:  boolean

Since: 07-11-2008

top

boolean setDouble(String name, Number double)

Adds the key/value pair to the data map, over-writing any set that already exists with name key.

Parameters:

  • String   name
  • Number   double

Returns:  boolean

Since: 08-28-2018

top

boolean setInt(String name, Number value)

Sets the integer value of the specified column referenced by name. Returns false if the column does not exist.

Parameters:

  • String   name
  • Number   value

Returns:  boolean

Since: 08-28-2018

top

boolean setString(String name, String value)

Sets the string value of the specified column referenced by name. Returns false if the column does not exist.

Parameters:

  • String   name
  • String   value

Returns:  boolean

Since: 08-28-2018

top

setValue(String key, Object value)

Sets the string value referenced by name. The object must be capable of being serialized as a String.

Parameters:

  • String   key
  • Object   value

Since: 07-11-2008

top

String toString()

Returns a description of this object.

Returns:  String

Since: 01-19-2009

top
Copyright © 2006 - 2024, ContractPal, Inc. All rights reserved. API Date: Dec 03, 2024 10:24 AM