Package com.cmobilecom.af.entity.bus
Class MonthClose
- java.lang.Object
-
- com.cmobilecom.af.entity.PersistenceEntityBase
-
- com.cmobilecom.af.entity.bus.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 Summary
Fields Modifier and Type Field Description static java.lang.String
PROPERTY_END_DATE
Property name: endDatestatic java.lang.String
PROPERTY_MONTH
Property name: monthstatic java.lang.String
PROPERTY_START_DATE
Property name: startDate-
Fields inherited from class com.cmobilecom.af.entity.PersistenceEntityBase
id, instance, sequenceNo
-
Fields inherited from interface com.cmobilecom.af.entity.PersistenceEntity
ID_SEPARATOR, PROPERTY_ID, PROPERTY_INSTANCE, PROPERTY_SELECTED, PROPERTY_SEQUENCE_NO, PROPERTY_VERSION
-
-
Constructor Summary
Constructors Constructor Description MonthClose()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description TemporalPeriod
getDatePeriod(boolean timestamp)
Get the date period for the month.java.time.LocalDate
getEndDate()
Get the last day of the month.abstract java.lang.String
getModule()
Get the module with which this MonthClose is associated.java.lang.Integer
getMonth()
Get the month number counting from the yearStartDate of BusinessOptions.java.time.LocalDate
getStartDate()
Get the first day of the month.void
setEndDate(java.time.LocalDate endDate)
Set the last day of the month.void
setMonth(java.lang.Integer month)
Set the month number counting from the yearStartDate of BusinessOptions.void
setStartDate(java.time.LocalDate startDate)
Set the first day of the month.java.lang.String
toString()
-
Methods inherited from class com.cmobilecom.af.entity.PersistenceEntityBase
clone, equals, getId, getInstance, getSequenceNo, getVersion, hashCode, isChanged, isPartiallyInitialized, isPersisted, isSelected, isStatistics, setChanged, setId, setInstance, setPartiallyInitialized, setPersisted, setSelected, setSequenceNo, setStatistics, setVersion
-
-
-
-
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
-
-
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 classjava.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
-
-