Interface Entities

    • Method Detail

      • contains

        boolean contains​(EntityType entityType)
        Parameters:
        entityType - the entityType
        Returns:
        true if this domain contains a definition for the given type
      • entity

        Entity entity​(EntityType entityType)
        Creates a new Entity instance with the given entityType
        Parameters:
        entityType - the entityType
        Returns:
        a new Entity instance
      • primaryKey

        <T> Key primaryKey​(EntityType entityType,
                           T value)
        Creates a new Key instance with the given entityType, initialised with the given value
        Type Parameters:
        T - the key value type
        Parameters:
        entityType - the entityType
        value - the key value, assumes a single long key
        Returns:
        a new Key instance
        Throws:
        IllegalStateException - in case the given primary key is a composite key
        IllegalArgumentException - in case the value is not of the correct type
        NullPointerException - in case entityType is null
      • primaryKeys

        <T> List<Key> primaryKeys​(EntityType entityType,
                                  T... values)
        Creates new Key instances with the given entityType, initialised with the given values
        Type Parameters:
        T - the key value type
        Parameters:
        entityType - the entityType
        values - the key values, assumes a single integer key
        Returns:
        new Key instances
        Throws:
        IllegalStateException - in case the given primary key is a composite key
        IllegalArgumentException - in case any of the values is not of the correct type
        NullPointerException - in case entityType or values is null
      • keyBuilder

        Key.Builder keyBuilder​(EntityType entityType)
        Creates a new Key.Builder instance for the given entity type.
        Parameters:
        entityType - the entity type
        Returns:
        a new builder