int getType(Object objectData) int getType(int integerData) int getType(float floatData) int getType(double doubleData) int getType(boolean booleanData)
Returns an integer representing the data type of the parameter you pass. You can interpret the return value by comparing it to one of these constants which are declared as static and final in the DtpDataConversion class:
None.
You can use the return values from getType() in the OKToConvert() method to determine whether a conversion is possible between two given data types.
int conversionStatus = DtpDataConversion.isOKToConvert( DtpDataConversion.getType(srcObject), DtpDataConversion.getType(destObject)); switch(conversionStatus) { case DtpDataConversion.OKTOCONVERT: // go ahead and convert break; case DtpDataConversion.POTENTIALDATALOSS: // convert, then check value break; case DtpDataConversion.CANNOTCONVERT: // return an error break; }