Interface TimePeriod

    • Field Detail

      • TIMEPERIOD_ID_CLASS

        static final Class<TimePeriod> TIMEPERIOD_ID_CLASS
        id class for generating ids
    • Method Detail

      • getIdClass

        default Class<? extends TimePeriod> 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
      • getStartTimeSeconds

        long getStartTimeSeconds()
        Return the start time
        Returns:
        start time
      • getDurationSeconds

        long getDurationSeconds()
        Return the duration in seconds
        Returns:
        duration
      • getDescription

        String getDescription()
        Return the description
        Returns:
        description of this TimePeriod
      • hasDescription

        default boolean hasDescription()
        Verify if time period has a description
        Returns:
        true when description present, false otherwise
      • getDurationHours

        default Double getDurationHours()
        Get the duration in hours
        Returns:
        duration in hours
      • shallowClone

        TimePeriod shallowClone()
        Create a shallow copy of this entity
        Specified by:
        shallowClone in interface IdAble
        Returns:
        shallow copy of entity
      • deepClone

        TimePeriod 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