Class KeyValue

java.lang.Object
de.espirit.or.schema.KeyValue
All Implemented Interfaces:
Serializable

public class KeyValue extends Object implements Serializable
Definition of a (primary) key value descriptor.
Since:
4.0.17
See Also:
  • Constructor Details

    • KeyValue

      public KeyValue(String entityTypeName, Object... values)
      Constructor taking the name of the type and the values building the key.
      Parameters:
      entityTypeName - The type name.
      values - The values building the key.
      Since:
      4.0.17
  • Method Details

    • createKeyValue

      public static KeyValue createKeyValue(Schema schema, Identifier identifier)
      Factory to create the key value within the given schema for the requested identifer.
      Parameters:
      schema - The schema.
      identifier - The identifier.
      Returns:
      The created key value.
      Since:
      4.0.17
    • getEntityTypeName

      public String getEntityTypeName()
      Provides the entity type name.
      Returns:
      The name.
      Since:
      4.0.17
    • add

      public void add(Object value)
      Adds a key value.
      Parameters:
      value - The value to add.
      Since:
      4.0.17
    • getValues

      public List<Object> getValues()
      Provides the key's values.
      Returns:
      A list of values.
      Since:
      4.0.17
    • getValue

      public Object getValue(int index)
      Provides the value stored at the given index.
      Parameters:
      index - The index.
      Returns:
      The value.
      Since:
      4.0.17
    • size

      public int size()
      Provides the size of the key value.
      Returns:
      The number of values.
      Since:
      4.0.17
    • equals

      public boolean equals(Object o)
      Equality implementation for key values.
      Overrides:
      equals in class Object
      Parameters:
      o - The object to compare to.
      Returns:
      true, if equal.
      Since:
      4.0.17
    • hashCode

      public int hashCode()
      Hashcode implementation.
      Overrides:
      hashCode in class Object
      Returns:
      A hashcode.
      Since:
      4.0.17
    • toString

      public String toString()
      Provides a textual representation of this value.
      Overrides:
      toString in class Object
      Returns:
      A textual representation.
      Since:
      4.0.17