Class ListField<E>

Type Parameters:
E - Java type for the list elements

public class ListField<E> extends CollectionField<List<E>,E>
List field.

Permazen list fields have performance characteristics similar to ArrayList.

  • Method Details

    • getElementIndex

      public ListElementIndex<E> getElementIndex()
      Description copied from class: CollectionField
      Get the index on this fields's "element" sub-field.
      Overrides:
      getElementIndex in class CollectionField<List<E>,E>
      Returns:
      the index on this field's "element" sub-field
    • getValue

      public List<E> getValue(Transaction tx, ObjId id)
      Description copied from class: Field
      Get the value of this field in the given object. Does not alter the schema of the object.
      Specified by:
      getValue in class CollectionField<List<E>,E>
      Parameters:
      tx - transaction
      id - object id
      Returns:
      this field's value in the specified object
    • getKey

      public byte[] getKey(ObjId id, int index)
      Get the byte[] key in the underlying key/value store corresponding to this field in the specified object and the specified list index.
      Parameters:
      id - object ID
      index - list index
      Returns:
      the corresponding KVDatabase key
      Throws:
      IllegalArgumentException - if id is null or has the wrong object type
      IllegalArgumentException - if index is negative
      See Also:
    • visit

      public <R> R visit(FieldSwitch<R> target)
      Description copied from class: Field
      Apply visitor pattern.
      Specified by:
      visit in class Field<List<E>>
      Type Parameters:
      R - visitor return type
      Parameters:
      target - target to invoke
      Returns:
      return value from the method of target corresponding to this instance's type
    • toString

      public String toString()
      Specified by:
      toString in class SchemaItem