Class ManagedIdEntityFactoryImpl<E extends ManagedId>

    • Field Detail

    • Constructor Detail

      • ManagedIdEntityFactoryImpl

        protected ManagedIdEntityFactoryImpl​(IdGroupingToken groupIdToken)
        Constructor
        Parameters:
        groupIdToken - to use for creating element ids
    • Method Detail

      • setIdGroupingToken

        public void setIdGroupingToken​(IdGroupingToken groupIdToken)
        Each factory needs a token to allow all underlying factory methods to generated ids uniquely tied to the group token the entities belong to
        Specified by:
        setIdGroupingToken in interface ManagedIdEntityFactory<E extends ManagedId>
        Parameters:
        groupIdToken - , contiguous id generation within this group of entity instances created with the factory methods
      • createUniqueCopyOf

        public E createUniqueCopyOf​(ManagedId entityToCopy)
        Create a shallow copy of the passed in entity, albeit with unique internal ids. Not registered on the container.
        Specified by:
        createUniqueCopyOf in interface ManagedIdEntityFactory<E extends ManagedId>
        Parameters:
        entityToCopy - the entity to copy
        Returns:
        new entity based on passed in entity