public class ConversionUtil
extends java.lang.Object
Constructor and Description |
---|
ConversionUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
booleanToString(boolean data)
Converts boolean to string.
|
static java.lang.String |
dateToString(java.util.Date in)
This method will convert java.util.Date to ISO 8601 dateTime format
string
|
static java.lang.String |
doubleToString(double in)
Converts double to string.
|
static java.lang.String |
getMboValue(java.lang.String name,
MboRemote mbo,
int maxType)
Get value from XML and convert it to String.
|
static java.lang.Object |
getMboValueAsObject(java.lang.String name,
MboRemote mbo,
int maxType)
Get value from Mbo as object.
|
static java.lang.String |
getMboValueAsXMLValue(java.lang.String mboAttrName,
MboRemote mbo,
int maxType)
Get value from XML and convert it to String.
|
static java.lang.String |
getValueAsLocalazedString(java.lang.String value,
int maxType,
java.util.Locale locale)
Get value from XML and convert it to String.
|
static java.lang.Object |
getValueAsObject(java.lang.String value,
int maxType)
Get value from XML and convert it to String.
|
static java.lang.String |
getXMLValue(java.lang.String name,
StructureObject strucObject,
int maxType)
Get value from XML and convert it to String.
|
static java.lang.String |
intToString(int in)
Converts int to string.
|
static boolean |
isMaxTypeBlob(int maxType)
This method will detrmine in MaxType is a Blob format
|
static boolean |
isMaxTypeCrypto(int maxType)
This method will detrmine in MaxType is a Crypto format
|
static boolean |
isMaxTypeDate(int maxType)
This method will detrmine in MaxType is a date format
|
static boolean |
isMaxTypeDouble(int maxType)
This method will detrmine in MaxType is a double format
|
static boolean |
isMaxTypeLong(int maxType)
This method will detrmine in MaxType is a long format
|
static java.lang.String |
longToString(long in)
Converts long to string.
|
static void |
setValueAsObject(java.lang.String attributeName,
StructureObject str,
java.lang.String value,
int maxType)
Get value from XML and convert it to String.
|
static boolean |
stringToBoolean(java.lang.String data)
This method will convert String to boolean
|
static java.util.Date |
stringToDate(java.lang.String data)
This method will convert String in format acceptable by JMIG to
java.util.Date
|
static double |
stringToDouble(java.lang.String data)
This method will convert String to double
|
static java.lang.String |
stringToGL(java.util.List data)
Deprecated.
|
static java.lang.String |
stringToGL(java.util.List data,
java.lang.String orgId)
This method will convert String to GL account
|
static int |
stringToInt(java.lang.String data)
This method will convert String to int
|
static long |
stringToLong(java.lang.String data)
This method will convert String to long
|
public static java.util.Date stringToDate(java.lang.String data) throws MXException
data
- Give date in String formatMXException
- Maximo exceptionpublic static double stringToDouble(java.lang.String data) throws MXException
data
- Give String representataion of the dataMXException
public static int stringToInt(java.lang.String data) throws MXException
data
- Give String representataion of the dataMXException
public static long stringToLong(java.lang.String data) throws MXException
data
- Give String representataion of the dataMXException
public static boolean stringToBoolean(java.lang.String data) throws MXException
data
- Give String representataion of the dataMXException
public static java.lang.String stringToGL(java.util.List data) throws MXException
data
- Give list of GL componentsMXException
- Maximo Application exceptionpublic static java.lang.String stringToGL(java.util.List data, java.lang.String orgId) throws MXException
data
- Give list of GL componentsorgId
- OrganizationMXException
- Maximo Application exceptionpublic static java.lang.String booleanToString(boolean data) throws MXException
data
- input booleanMXException
- -
MAXIMO exceptionpublic static java.lang.String dateToString(java.util.Date in)
in
- Give date in java.util.Date formatpublic static java.lang.String doubleToString(double in)
in
- input doublepublic static java.lang.String intToString(int in)
in
- input integerpublic static java.lang.String longToString(long in)
in
- input longpublic static boolean isMaxTypeDate(int maxType)
maxType
- Give MaxType as Integerpublic static boolean isMaxTypeLong(int maxType)
maxType
- Give MaxType as Integerpublic static boolean isMaxTypeDouble(int maxType)
maxType
- Give MaxType as Integerpublic static boolean isMaxTypeBlob(int maxType)
maxType
- Give MaxType as Integerpublic static boolean isMaxTypeCrypto(int maxType)
maxType
- Give MaxType as Integerpublic static java.lang.String getXMLValue(java.lang.String name, StructureObject strucObject, int maxType) throws MXException, java.rmi.RemoteException
name
- Fields namestrucObject
- Refrence to structure ObjectmaxType
- Give MaxType as IntegerMXException
java.rmi.RemoteException
public static java.lang.String getMboValue(java.lang.String name, MboRemote mbo, int maxType) throws MXException, java.rmi.RemoteException
name
- Fields namembo
- Refrence to Mbo ObjectmaxType
- Give MaxType as IntegerMXException
java.rmi.RemoteException
public static java.lang.String getMboValueAsXMLValue(java.lang.String mboAttrName, MboRemote mbo, int maxType) throws MXException, java.rmi.RemoteException
name
- Fields namembo
- Refrence to Mbo ObjectmaxType
- Give MaxType as IntegerMXException
java.rmi.RemoteException
public static java.lang.Object getMboValueAsObject(java.lang.String name, MboRemote mbo, int maxType) throws MXException, java.rmi.RemoteException
name
- Fields namembo
- Refrence to Mbo ObjectmaxType
- Give MaxType as IntegerMXException
java.rmi.RemoteException
public static java.lang.Object getValueAsObject(java.lang.String value, int maxType) throws MXException, java.rmi.RemoteException
name
- Fields namestrucObject
- Refrence to structure ObjectmaxType
- Give MaxType as IntegerMXException
java.rmi.RemoteException
public static java.lang.String getValueAsLocalazedString(java.lang.String value, int maxType, java.util.Locale locale) throws MXException, java.rmi.RemoteException
name
- Fields namestrucObject
- Refrence to structure ObjectmaxType
- Give MaxType as IntegerMXException
java.rmi.RemoteException
public static void setValueAsObject(java.lang.String attributeName, StructureObject str, java.lang.String value, int maxType) throws MXException
name
- Fields namestrucObject
- Refrence to structure ObjectmaxType
- Give MaxType as IntegerMXException