Interface TransferZoneGroup

    • Field Detail

      • TRANSFER_ZONE_GROUP_ID_CLASS

        static final Class<TransferZoneGroup> TRANSFER_ZONE_GROUP_ID_CLASS
        the class to use for the id generation
    • Method Detail

      • getName

        String getName()
        Name of the group
        Returns:
        name
      • setName

        void setName​(String name)
        set Name of the group
        Parameters:
        name - to set
      • addTransferZone

        TransferZone addTransferZone​(TransferZone transferZone)
        Add a transferZone and also register this group on this transfer zone at the same time
        Parameters:
        transferZone - to add
        Returns:
        previousTransferZone under same id (if any)
      • addAllTransferZones

        default void addAllTransferZones​(Collection<TransferZone> transferZonesToAdd)
        Add all transferZones provided
        Parameters:
        transferZonesToAdd - to add
      • removeTransferZone

        TransferZone removeTransferZone​(TransferZone transferZone)
        remove a transfer zone from the group, and also remove the reference on the transfer zone at the same time
        Parameters:
        transferZone - to remove
        Returns:
        removed transfer zone
      • hasTransferZone

        boolean hasTransferZone​(TransferZone transferZone)
        Verify if transfer zone is present
        Parameters:
        transferZone - to check
        Returns:
        true when present, false otherwise
      • size

        int size()
        Number of registered transfer zones
        Returns:
        number of registered transfer zones
      • getTransferZones

        Collection<TransferZone> getTransferZones()
        create a view of the registered transfer zones. Any changes are reflected in the group as well
        Returns:
        registered transfer zones
      • deepClone

        TransferZoneGroup deepClone()
        An id entity should always support a deep copy, i.e., all "owned" members will be deep copied when a clone of this instance is created via this call. To be used with caution if not called by managed id container related code
        Specified by:
        deepClone in interface IdAble
        Returns:
        deep copy of entity
      • getFirst

        default TransferZone getFirst()
        Collect first transfer zone that would be returned by the iterator
        Returns:
        transfer zone
      • isEmpty

        default boolean isEmpty()
        check if no transfer zones are registered
        Returns:
        true when empty false otherwise
      • hasName

        default boolean hasName()
        Verify if the group has a name already
        Returns:
        true when non-null, non-blank name is present, false otherwise
      • hasTransferZones

        default boolean hasTransferZones()
        verify if groups has any transfer zones registered
        Returns:
        true when present false otherwise
      • getIdClass

        default Class<TransferZoneGroup> getIdClass()
        Each managed id class is expected to generate its ids based on its class signature. To be able to generate the correct id the class used for id generation is to be provided via this method call.
        Specified by:
        getIdClass in interface ManagedId
        Returns:
        idClass to use for generating ids for instances of this idable derived class