Interface EntityId

All Known Implementing Classes:
Seid

public interface EntityId
Identity of an entity.
Since:
0.8
Author:
Haiyang Li
  • Method Details

    • of

      static EntityId of(String propName, Object propValue)
      Parameters:
      propName - property name with entity name, for example Account.id
      propValue -
      Returns:
    • of

      static EntityId of(String entityName, String propName, Object propValue)
      Parameters:
      entityName -
      propName -
      propValue -
      Returns:
    • of

      static EntityId of(String propName1, Object propValue1, String propName2, Object propValue2)
      Parameters:
      propName1 - property name with entity name, for example Account.id
      propValue1 -
      propName2 -
      propValue2 -
      Returns:
    • of

      static EntityId of(String entityName, String propName1, Object propValue1, String propName2, Object propValue2)
      Parameters:
      entityName -
      propName1 -
      propValue1 -
      propName2 -
      propValue2 -
      Returns:
    • of

      static EntityId of(String propName1, Object propValue1, String propName2, Object propValue2, String propName3, Object propValue3)
      Parameters:
      propName1 - property name with entity name, for example Account.id
      propValue1 -
      propName2 -
      propValue2 -
      propName3 -
      propValue3 -
      Returns:
    • of

      static EntityId of(String entityName, String propName1, Object propValue1, String propName2, Object propValue2, String propName3, Object propValue3)
      Parameters:
      entityName -
      propName1 -
      propValue1 -
      propName2 -
      propValue2 -
      propName3 -
      propValue3 -
      Returns:
    • create

      static EntityId create(Map<String,Object> nameValues)
      Parameters:
      nameValues -
      Returns:
    • create

      static EntityId create(String entityName, Map<String,Object> nameValues)
      Parameters:
      entityName -
      nameValues -
      Returns:
    • create

      static EntityId create(Object entity)
      Parameters:
      entity -
      Returns:
    • create

      static EntityId create(Object entity, Collection<String> idPropNames)
      Parameters:
      entity -
      idPropNames -
      Returns:
    • entityName

      String entityName()
      Returns:
      String
    • get

      <T> T get(String propName)
      Type Parameters:
      T -
      Parameters:
      propName -
      Returns:
      T
    • getInt

      int getInt(String propName)
      Parameters:
      propName -
      Returns:
    • getLong

      long getLong(String propName)
      Parameters:
      propName -
      Returns:
    • get

      <T> T get(String propName, Class<? extends T> targetType)

      Node: To follow one of general design rules in Abacus, if there is a conversion behind when the source value is not assignable to the target type, put the targetType to last parameter of the method. Otherwise, put the targetTpye to the first parameter of the method.
      Type Parameters:
      T -
      Parameters:
      propName -
      targetType -
      Returns:
      T
    • containsKey

      boolean containsKey(String propName)
      Parameters:
      propName -
      Returns:
    • keySet

      Set<String> keySet()
      Returns:
      Set
    • entrySet

      Set<Map.Entry<String,Object>> entrySet()
      Returns:
    • size

      int size()
      Returns:
    • isEmpty

      boolean isEmpty()
      Returns:
    • builder

      static EntityId.EntityIdBuilder builder()
    • builder

      static EntityId.EntityIdBuilder builder(String entityName)