|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectplanetj.common.BusinessObject
planetj.common.ConvertUtility
This type was created in VisualAge.
Field Summary |
Fields inherited from class planetj.common.BusinessObject |
methodHashTable |
Constructor Summary | |
ConvertUtility()
|
Method Summary | |
static java.lang.String |
addApostrophes(java.lang.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 java.util.Map |
convertKeyValueStringToMap(java.lang.String keyValueString,
char keySplitter,
char valueSplitter)
Converts the given string containing key value pairs separated by a character. |
static java.util.Map |
convertKeyValueStringToMap(java.lang.String keyValueString,
char keySplitter,
char valueSplitter,
boolean uppercaseKey)
Converts the given string containing key value pairs separated by a character. |
static java.util.List |
convertListValueStringToList(java.lang.String listValueString,
char listSplitter,
char fieldSplitter)
Converts the given string containing a list with another list seperated by a special character. |
static java.math.BigDecimal |
convertNumberToBigDecimal(java.lang.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 double |
convertToDouble(java.lang.String value)
Converts the given String to a double. |
static java.lang.String[] |
convertToStringArray(java.util.List stringList)
Creates a String[] from the given List containing Strings. |
static java.util.List |
convertValueStringToList(java.lang.String valueString,
char valueSplitter)
Converts the given string containing values separated by a character to a List |
static int |
get4DigitYear(java.util.Date pDate)
Return the 4 digit year part of a date for example 2002-01-01 would be returned as 2002 |
static int |
getCentury(java.util.Date pDate)
Return the century part of a date, for example 2002-01-01 in this context has a century of 20. |
static java.util.Date |
getDate(int pYr,
int pMonth,
int pDay)
Return the Date based on ints for 4 digit year, month and day |
static java.util.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(java.util.Date pDate)
Return the day part of a date |
static int |
getMonth(java.util.Date pDate)
Return the month part of a date |
static java.lang.String |
getStringSpacedOutTo(int pSize,
java.lang.Object obj)
Return a String spaced out to the specified length with either spaces of 0 if it is numberic |
static int |
getTime(java.util.Date pDate)
Returns the time portion of the date as a 6 or 5 digit number in the form of HHMMSS. |
static int |
getYear(java.util.Date pDate)
Return the 2 digit year part of a date for example 2002-01-01 would be returned as 2 |
static java.lang.String |
insertLeadingZeros(java.lang.String value,
int length)
Insert the method's description here. |
static java.lang.String |
replace(java.lang.String pString,
java.lang.String pOldValue,
java.lang.String pNewValue)
Replace each occurance of string pOldValue with string pNewValue and return the resulting string |
static ConvertUtility |
singleton()
|
static java.util.Vector |
subString(java.lang.String val,
int length)
Take a String and convert it to a Vector of Strings by substring the specified length |
static java.lang.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 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ConvertUtility()
Method Detail |
public static java.lang.String addApostrophes(java.lang.String value)
value
- java.lang.String
public static java.math.BigDecimal convertNumberToBigDecimal(java.lang.Number pNumber)
pNumber
- java.lang.Number
public static java.util.List convertValueStringToList(java.lang.String valueString, char valueSplitter)
valueString
- String containing valuesvalueSplitter
- character that denotes the starting the key value pair's valuepublic static java.util.Map convertKeyValueStringToMap(java.lang.String keyValueString, char keySplitter, char valueSplitter)
keyValueString
- String containing key value pairskeySplitter
- character that denotes the starting of a new key value pairvalueSplitter
- character that denotes the starting the key value pair's valuepublic static java.util.Map convertKeyValueStringToMap(java.lang.String keyValueString, char keySplitter, char valueSplitter, boolean uppercaseKey)
keyValueString
- String containing key value pairskeySplitter
- character that denotes the starting of a new key value pairvalueSplitter
- character that denotes the starting the key value pair's valueuppercaseKey
- whether or not the key should be uppercasedpublic static java.util.List convertListValueStringToList(java.lang.String listValueString, char listSplitter, char fieldSplitter)
public static java.lang.String[] convertToStringArray(java.util.List stringList) throws CMException
stringList
- List of Strings
CMException
- thrown when given List doesn't contain all Strings.public static double convertToDouble(java.lang.String value) throws CMException
CMException
public static int get4DigitYear(java.util.Date pDate)
public static int getCentury(java.util.Date pDate)
public static java.util.Date getDate(int pYr, int pMonth, int pDay)
public static java.util.Date getDate(int pCentry, int pYr, int pMonth, int pDay)
public static int getDay(java.util.Date pDate)
public static int getMonth(java.util.Date pDate)
public static java.lang.String getStringSpacedOutTo(int pSize, java.lang.Object obj)
public static int getTime(java.util.Date pDate)
public static int getYear(java.util.Date pDate)
public static java.lang.String insertLeadingZeros(java.lang.String value, int length)
public static java.lang.String replace(java.lang.String pString, java.lang.String pOldValue, java.lang.String pNewValue)
public static ConvertUtility singleton()
public static java.util.Vector subString(java.lang.String val, int length)
public static java.lang.String toHTMLString(int value)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |