|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--planetj.common.BusinessObject | +--planetj.common.ConvertUtility
This type was created in VisualAge.
Constructor Summary | |
ConvertUtility()
|
Method Summary | |
static String |
addApostrophes(String value)
This method adds an additional apostrophe into contractions to satisfy an SQL statement An example would be: "can't" becomes "can''t". |
static BigDecimal |
convertNumberToBigDecimal(Number pNumber)
Takes a java.lang.Number and returns a java.math.BigDecimal that has the BigDecimal form of the value in the Number. |
static String[] |
convertToStringArray(List stringList)
Creates a String[] from the given List containing Strings. |
static int |
get4DigitYear(Date pDate)
Return the 4 digit year part of a date for example 2002-01-01 would be returned as 2002 |
static int |
getCentury(Date pDate)
Return the century part of a date, for example 2002-01-01 in this context has a century of 20. |
static Date |
getDate(int pYr,
int pMonth,
int pDay)
Return the Date based on ints for 4 digit year, month and day |
static Date |
getDate(int pCentry,
int pYr,
int pMonth,
int pDay)
Return the Date based on ints for century, year, month and day |
static int |
getDay(Date pDate)
Return the day part of a date |
static int |
getMonth(Date pDate)
Return the month part of a date |
static String |
getStringSpacedOutTo(int pSize,
Object obj)
Return a String spaced out to the specified length with either spaces of 0 if it is numberic |
static int |
getTime(Date pDate)
Returns the time portion of the date as a 6 or 5 digit number in the form of HHMMSS. |
static int |
getYear(Date pDate)
Return the 2 digit year part of a date for example 2002-01-01 would be returned as 2 |
static String |
insertLeadingZeros(String value,
int length)
Insert the method's description here. |
static String |
replace(String pString,
String pOldValue,
String pNewValue)
Replace each occurance of string pOldValue with string pNewValue and return the resulting string |
static ConvertUtility |
singleton()
|
static Vector |
subString(String val,
int length)
Take a String and convert it to a Vector of Strings by substring the specified length |
static String |
toHTMLString(int value)
Converts a number to an HTML-safe string |
Methods inherited from class planetj.common.BusinessObject |
generateException, generateException, generateException, generateException, generateException, getTranslation, invoke, toBoolean, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ConvertUtility()
Method Detail |
public static String addApostrophes(String value)
value
- java.lang.String
public static BigDecimal convertNumberToBigDecimal(Number pNumber)
pNumber
- java.lang.Number
public static String[] convertToStringArray(List stringList) throws CMException
stringList
- List of Strings
CMException
- thrown when given List doesn't contain all Strings.public static int get4DigitYear(Date pDate)
public static int getCentury(Date pDate)
public static Date getDate(int pYr, int pMonth, int pDay)
public static Date getDate(int pCentry, int pYr, int pMonth, int pDay)
public static int getDay(Date pDate)
public static int getMonth(Date pDate)
public static String getStringSpacedOutTo(int pSize, Object obj)
public static int getTime(Date pDate)
public static int getYear(Date pDate)
public static String insertLeadingZeros(String value, int length)
public static String replace(String pString, String pOldValue, String pNewValue)
public static ConvertUtility singleton()
public static Vector subString(String val, int length)
public static String toHTMLString(int value)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |