MUOM: minor improvements

* X12_* constants should be public
* added X12_SECOND
* added serialVersionUID
This commit is contained in:
teo_sarca 2008-11-20 20:20:48 +00:00
parent d5211c0da4
commit 5da2722702
1 changed files with 22 additions and 10 deletions

View File

@ -35,22 +35,26 @@ import org.compiere.util.Ini;
*/ */
public class MUOM extends X_C_UOM public class MUOM extends X_C_UOM
{ {
private static final long serialVersionUID = 1L;
/** X12 Element 355 Code Second */
public static final String X12_SECOND = "03";
/** X12 Element 355 Code Minute */ /** X12 Element 355 Code Minute */
static final String X12_MINUTE = "MJ"; public static final String X12_MINUTE = "MJ";
/** X12 Element 355 Code Hour */ /** X12 Element 355 Code Hour */
static final String X12_HOUR = "HR"; public static final String X12_HOUR = "HR";
/** X12 Element 355 Code Day */ /** X12 Element 355 Code Day */
static final String X12_DAY = "DA"; public static final String X12_DAY = "DA";
/** X12 Element 355 Code Work Day (8 hours / 5days) */ /** X12 Element 355 Code Work Day (8 hours / 5days) */
static final String X12_DAY_WORK = "WD"; public static final String X12_DAY_WORK = "WD";
/** X12 Element 355 Code Week */ /** X12 Element 355 Code Week */
static final String X12_WEEK = "WK"; public static final String X12_WEEK = "WK";
/** X12 Element 355 Code Month */ /** X12 Element 355 Code Month */
static final String X12_MONTH = "MO"; public static final String X12_MONTH = "MO";
/** X12 Element 355 Code Work Month (20 days / 4 weeks) */ /** X12 Element 355 Code Work Month (20 days / 4 weeks) */
static final String X12_MONTH_WORK = "WM"; public static final String X12_MONTH_WORK = "WM";
/** X12 Element 355 Code Year */ /** X12 Element 355 Code Year */
static final String X12_YEAR = "YR"; public static final String X12_YEAR = "YR";
/** /**
* Get Minute C_UOM_ID * Get Minute C_UOM_ID
@ -91,7 +95,7 @@ public class MUOM extends X_C_UOM
/*************************************************************************/ /*************************************************************************/
/** UOM Cache */ /** UOM Cache */
private static CCache<Integer,MUOM> s_cache = new CCache<Integer,MUOM>("C_UOM", 30); private static CCache<Integer,MUOM> s_cache = new CCache<Integer,MUOM>(Table_Name, 30);
/** /**
* Get UOM from Cache * Get UOM from Cache
@ -214,6 +218,14 @@ public class MUOM extends X_C_UOM
return qty; return qty;
} // round } // round
/**
* Second
* @return true if UOM is second
*/
public boolean isSecond()
{
return X12_SECOND.equals(getX12DE355());
}
/** /**
* Minute * Minute
* @return true if UOM is minute * @return true if UOM is minute