Class MonthClose

  • All Implemented Interfaces:
    PersistenceEntity, java.io.Serializable, java.lang.Cloneable

    @MappedSuperclass
    public abstract class MonthClose
    extends PersistenceEntityBase
    Month close base class. If a month is closed for a module, business data of the module can not be recorded for the month or any previous month.
    Since:
    5.6
    See Also:
    Serialized Form
    • Field Detail

      • PROPERTY_MONTH

        public static final java.lang.String PROPERTY_MONTH
        Property name: month
        See Also:
        Constant Field Values
      • PROPERTY_START_DATE

        public static final java.lang.String PROPERTY_START_DATE
        Property name: startDate
        See Also:
        Constant Field Values
      • PROPERTY_END_DATE

        public static final java.lang.String PROPERTY_END_DATE
        Property name: endDate
        See Also:
        Constant Field Values
    • Constructor Detail

      • MonthClose

        public MonthClose()
    • Method Detail

      • getMonth

        public java.lang.Integer getMonth()
        Get the month number counting from the yearStartDate of BusinessOptions.

        For example, year start date is 2015-3-1, the month number for the August 2015 is 6.

        Returns:
        month number starting from 1
      • setMonth

        public void setMonth​(java.lang.Integer month)
        Set the month number counting from the yearStartDate of BusinessOptions.

        For example, if year start date is March 1, 2015, then the month number for the August 2015 is 6.

        Parameters:
        month - the month number starting from 1
      • getStartDate

        public java.time.LocalDate getStartDate()
        Get the first day of the month.

        For example, if year start date is March 1, 2015, then the start date of month number 6 is August 1, 2015.

        Returns:
        month start date
      • setStartDate

        public void setStartDate​(java.time.LocalDate startDate)
        Set the first day of the month.

        For example, if year start date is March 1, 2015, then the start date of month number 6 is August 1, 2015.

        Parameters:
        startDate - month start date
      • getEndDate

        public java.time.LocalDate getEndDate()
        Get the last day of the month.

        For example, if year start date is March 1, 2015, then the end date of month number 6 is August 31, 2015.

        Returns:
        month end date
      • setEndDate

        public void setEndDate​(java.time.LocalDate endDate)
        Set the last day of the month.

        For example, if year start date is March 1, 2015, then the end date of month number 6 is August 31, 2015.

        Parameters:
        endDate - month end date
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getModule

        public abstract java.lang.String getModule()
        Get the module with which this MonthClose is associated. Each business module can have a month close.
        Returns:
        module name
      • getDatePeriod

        public TemporalPeriod getDatePeriod​(boolean timestamp)
        Get the date period for the month.
        Parameters:
        timestamp - whether the date period is timestamp
        Returns:
        LocalDateTimePeriod instance for timestamp, LocalDatePeriod instance otherwise