Class Record

java.lang.Object
ch.ivyteam.ivy.scripting.objects.NestedObject
ch.ivyteam.ivy.scripting.objects.Record
All Implemented Interfaces:
IIvyDataObject, Serializable, Cloneable

public final class Record extends NestedObject
Records are rows in DB tables.
See Also:
API:
This is a public API.
  • Constructor Details

    • Record

      public Record()
      Creates an empty uninitialized record.
      API:
      This public API is available in Java.
    • Record

      public Record(String[] _keys, Object[] _values)
      Creates a new Record with given initial values.
      Parameters:
      _keys - The keys of the record.
      _values - The values of the record. The parameter list must be of the same size.
      API:
      This public API is available in Java.
    • Record

      public Record(List<String> _keys, List<? extends Object> _values)
      Creates a new Record with given initial values.
      Parameters:
      _keys - The keys of the record.
      _values - The values of the record. The parameter list must be of the same size.
      API:
      This public API is available in Java.
  • Method Details

    • getField

      public Object getField(String key)
      Retuns the value of a given field.
      Parameters:
      key - The name of the field.
      Returns:
      The value of the field.
      API:
      This public API is available in Java.
    • putField

      public void putField(String key, Object value)
      Set the value of a field. If already a filed of this name exists, the value of this field is overwritten; otherwise, a new field is created in this record. The search for a key is not case-sensitive.
      Parameters:
      key - The key of a field.
      value - The new value of the field.
      API:
      This public API is available in Java.
    • getKeys

      public List<String> getKeys()
      Returns (a copy of) the keys of this Record.
      Returns:
      A List with keys.
      API:
      This public API is available in Java.
    • getValues

      public List<Object> getValues()
      Returns (a copy of) the values of this Record.
      Returns:
      A List with values.
      API:
      This public API is available in Java.
    • getFieldIndex

      public int getFieldIndex(String keyStr)
      Computes the index of a field. The search is not case-sensitive.
      Parameters:
      keyStr - the key whose value you want
      Returns:
      index of the field if the field is not found -1
      API:
      This public API is available in Java.
    • size

      public int size()
      Returns the size of this recordset.
      Returns:
      The size of this recordset.
      API:
      This public API is available in Java.
    • isEmpty

      public boolean isEmpty()
      Tests whether the record is empty.
      Returns:
      True if this record is empty.
      API:
      This public API is available in Java.
    • clone

      public Record clone()
      Clones this record (shallow copy).
      Specified by:
      clone in interface IIvyDataObject
      Overrides:
      clone in class NestedObject
      Returns:
      A shallow of this object.
      See Also:
      API:
      This public API is available in Java.
    • deepClone

      public Record deepClone()
      Clones this record (deep copy).
      Specified by:
      deepClone in interface IIvyDataObject
      Overrides:
      deepClone in class NestedObject
      Returns:
      A deep of this object.
      API:
      This public API is available in Java.