Interface ManagedIdEntities<E extends ManagedId>

    • Method Detail

      • getFactory

        ManagedIdEntityFactory<E> getFactory()
        Factory to create instance of managed id entity (for this container class)
        Returns:
        entity factory
      • getManagedIdClass

        Class<? extends ManagedId> getManagedIdClass()
        Collect the class identifier used for the managed ids within the id group for instances of this class used in this container
        Returns:
        managedIdClass for instances this factory creates
      • recreateIds

        void recreateIds​(boolean resetManagedIdClass)
        Recreate the ids for all registered entities with or without resetting
        Parameters:
        resetManagedIdClass - when true we reset the managedId's counter to zero (via its id class) before recreating the ids, otherwise we simply recreate the managed id by starting with the next available id without resetting
      • containsKey

        default boolean containsKey​(long id)
        Verify if present
        Specified by:
        containsKey in interface LongMapWrapper<E extends ManagedId>
        Parameters:
        id - to verify
        Returns:
        true when present false otherwise
      • reset

        default void reset()
        When reset it called, it not only clears the entries, but also resets the managedids, such that when the container is reused the managed ids start from zero again. If any entries are managedEntities themselves or contain managed entities themselves, they are reset as well