|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.model.PO
org.compiere.model.X_C_Period
org.compiere.model.MPeriod
public class MPeriod
Calendar Period Model
| Field Summary |
|---|
| Fields inherited from class org.compiere.model.X_C_Period |
|---|
PERIODTYPE_AD_Reference_ID, PERIODTYPE_AdjustmentPeriod, PERIODTYPE_StandardCalendarPeriod |
| Fields inherited from class org.compiere.model.PO |
|---|
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, log, p_ctx, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID |
| Fields inherited from interface org.compiere.model.I_C_Period |
|---|
accessLevel, COLUMNNAME_C_Period_ID, COLUMNNAME_C_Year_ID, COLUMNNAME_EndDate, COLUMNNAME_Name, COLUMNNAME_PeriodNo, COLUMNNAME_PeriodType, COLUMNNAME_Processing, COLUMNNAME_StartDate, Model, Table_ID, Table_Name |
| Constructor Summary | |
|---|---|
MPeriod(MYear year,
int PeriodNo,
String name,
Timestamp startDate,
Timestamp endDate)
Parent constructor |
|
MPeriod(Properties ctx,
int C_Period_ID,
String trxName)
Standard Constructor |
|
MPeriod(Properties ctx,
ResultSet rs,
String trxName)
Load Constructor |
|
| Method Summary | |
|---|---|
protected boolean |
afterSave(boolean newRecord,
boolean success)
After Save |
protected boolean |
beforeSave(boolean newRecord)
Before Save. |
static MPeriod |
get(Properties ctx,
int C_Period_ID)
Get Period from Cache |
static MPeriod |
get(Properties ctx,
Timestamp DateAcct)
Find standard Period of DateAcct based on Client Calendar |
static int |
getC_Period_ID(Properties ctx,
Timestamp DateAcct)
Find valid standard Period of DateAcct based on Client Calendar |
static MPeriod |
getFirstInYear(Properties ctx,
Timestamp DateAcct)
Find first Year Period of DateAcct based on Client Calendar |
MPeriodControl |
getPeriodControl(String DocBaseType)
Get Period Control |
MPeriodControl[] |
getPeriodControls(boolean requery)
Get Period Control |
boolean |
isInPeriod(Timestamp date)
Date In Period |
static boolean |
isOpen(Properties ctx,
Timestamp DateAcct,
String DocBaseType)
Is standard Period Open for Document Base Type |
boolean |
isOpen(String DocBaseType)
Deprecated. since 3.3.1b; use isOpen(String, Timestamp) instead |
boolean |
isOpen(String DocBaseType,
Timestamp dateAcct)
Is Period Open for Doc Base Type |
boolean |
isStandardPeriod()
Standard Period |
static void |
testPeriodOpen(Properties ctx,
Timestamp dateAcct,
int C_DocType_ID)
Conventient method for testing if a period is open |
static void |
testPeriodOpen(Properties ctx,
Timestamp dateAcct,
String docBaseType)
Conventient method for testing if a period is open |
String |
toString()
String Representation |
| Methods inherited from class org.compiere.model.X_C_Period |
|---|
get_AccessLevel, getC_Period_ID, getC_Year_ID, getC_Year, getEndDate, getKeyNamePair, getName, getPeriodNo, getPeriodType, getStartDate, initPO, isProcessing, setC_Period_ID, setC_Year_ID, setEndDate, setName, setPeriodNo, setPeriodType, setProcessing, setStartDate |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.compiere.model.I_Persistent |
|---|
save |
| Constructor Detail |
|---|
public MPeriod(Properties ctx,
int C_Period_ID,
String trxName)
ctx - contextC_Period_ID - idtrxName - transaction
public MPeriod(Properties ctx,
ResultSet rs,
String trxName)
ctx - contextrs - result settrxName - transaction
public MPeriod(MYear year,
int PeriodNo,
String name,
Timestamp startDate,
Timestamp endDate)
year - yearPeriodNo - noname - namestartDate - startendDate - end| Method Detail |
|---|
public static MPeriod get(Properties ctx,
int C_Period_ID)
ctx - contextC_Period_ID - id
public static MPeriod get(Properties ctx,
Timestamp DateAcct)
ctx - contextDateAcct - date
public static int getC_Period_ID(Properties ctx,
Timestamp DateAcct)
ctx - contextDateAcct - date
public static boolean isOpen(Properties ctx,
Timestamp DateAcct,
String DocBaseType)
ctx - contextDateAcct - dateDocBaseType - base type
public static MPeriod getFirstInYear(Properties ctx,
Timestamp DateAcct)
ctx - contextDateAcct - date
public MPeriodControl[] getPeriodControls(boolean requery)
requery - requery
public MPeriodControl getPeriodControl(String DocBaseType)
DocBaseType - Document Base Type
public boolean isInPeriod(Timestamp date)
date - date
public boolean isOpen(String DocBaseType)
isOpen(String, Timestamp) instead
DocBaseType - document base type
public boolean isOpen(String DocBaseType,
Timestamp dateAcct)
DocBaseType - document base typedateAcct - date;
Applies only for "Auto Period Control":
public boolean isStandardPeriod()
protected boolean beforeSave(boolean newRecord)
beforeSave in class POnewRecord - new
protected boolean afterSave(boolean newRecord,
boolean success)
afterSave in class POnewRecord - newsuccess - success
public String toString()
toString in class X_C_Period
public static void testPeriodOpen(Properties ctx,
Timestamp dateAcct,
String docBaseType)
throws PeriodClosedException
ctx - dateAcct - docBaseType -
PeriodClosedException - if period is closedisOpen(Properties, Timestamp, String)
public static void testPeriodOpen(Properties ctx,
Timestamp dateAcct,
int C_DocType_ID)
throws PeriodClosedException
ctx - dateAcct - C_DocType_ID -
PeriodClosedException#isOpen(Properties, Timestamp, String)}
|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||