}
if (param1 instanceof String && ((String)param1).length() == 0) {
return null;
}
if (!(param2 instanceof String)) {
throw new ParseException(PARAM_EXCEPTION);
}
if (param1 instanceof String) {
return (String)param1;
}
else if (param1 instanceof Number) {
try {
OracleNumberFormat format = new OracleNumberFormat((String)param2);
return format.format((Number)param1);
} catch (java.text.ParseException e) {
throw new ParseException(e.getMessage());
}
}
else if (param1 instanceof java.util.Date) {
try {
OracleTimestampFormat format = new OracleTimestampFormat((String)param2, cal, symb);
return format.format((java.sql.Timestamp)param1);
} catch (java.text.ParseException e) {
throw new ParseException(e.getMessage());
}
} else {
throw new ParseException(TYPE_EXCEPTION);
}
}