Methods Summary |
---|
public java.lang.String | getBuilderString()
return builderString;
|
public oracle.toplink.essentials.internal.databaseaccess.DatabasePlatform | getPlatform()
return platform;
|
public java.io.StringWriter | getWriter()
return writer;
|
public void | printByte(java.lang.Byte aByte)
printString("new Byte((byte)");
printString((aByte).toString());
printString(")");
|
public void | printCharacter(java.lang.Character aCharacter)
printString("new Character('");
printString((aCharacter).toString());
printString("')");
|
public void | printJava(java.lang.Object object)
if (object == null) {
printString("null");
} else if (object.getClass() == ClassConstants.STRING) {
printString("\"");
printString((String)object);
printString("\"");
} else if (object instanceof Calendar) {
printString("new java.util.Date(");
printString(String.valueOf(((Calendar)object).getTimeInMillis()));
printString("L)");
} else if (object.getClass() == ClassConstants.TIMESTAMP) {
printString("new java.sql.Timestamp(");
printString(String.valueOf(((java.sql.Timestamp)object).getTime()));
printString("L)");
} else if (object.getClass() == ClassConstants.SQLDATE) {
printString("new java.sql.Date(");
printString(String.valueOf(((java.sql.Date)object).getTime()));
printString("L)");
} else if (object.getClass() == ClassConstants.TIME) {
printString("new java.sql.Time(");
printString(String.valueOf(((java.sql.Time)object).getTime()));
printString("L)");
} else if (object.getClass() == ClassConstants.UTILDATE) {
printString("new java.util.Date(");
printString(String.valueOf(((java.util.Date)object).getTime()));
printString("L)");
} else if (object.getClass() == ClassConstants.BYTE) {
printByte((Byte)object);
} else if (object.getClass() == ClassConstants.APBYTE) {
printString("new byte[] {");
byte[] bytes = (byte[])object;
if (bytes.length > 0) {
printString(String.valueOf((int)bytes[0]));
for (int index = 1; index < bytes.length; index++) {
printString(",");
printString(String.valueOf((int)bytes[index]));
}
}
printString("}");
} else if (object.getClass() == ClassConstants.ABYTE) {
printString("new Byte[] {");
Byte[] bytes = (Byte[])object;
if (bytes.length > 0) {
printByte(bytes[0]);
for (int index = 1; index < bytes.length; index++) {
printString(",");
printByte(bytes[index]);
}
}
printString("}");
} else if (object.getClass() == ClassConstants.CHAR) {
printCharacter((Character)object);
} else if (object.getClass() == ClassConstants.APCHAR) {
printString("new char[] {");
char[] chars = (char[])object;
if (chars.length > 0) {
printString("'");
printString(String.valueOf(chars[0]));
printString("'");
for (int index = 1; index < chars.length; index++) {
printString(",");
printString("'");
printString(String.valueOf(chars[index]));
printString("'");
}
}
printString("}");
} else if (object.getClass() == ClassConstants.ACHAR) {
printString("new Character[] {");
Character[] chars = (Character[])object;
if (chars.length > 0) {
printCharacter(chars[0]);
for (int index = 1; index < chars.length; index++) {
printString(",");
printCharacter(chars[index]);
}
}
printString("}");
} else if (object.getClass() == ClassConstants.BIGDECIMAL) {
printString("new java.math.BigDecimal(\"");
printString(((BigDecimal)object).toString());
printString("\")");
} else if (object.getClass() == ClassConstants.BIGINTEGER) {
printString("new java.math.BigInteger(\"");
printString(((BigInteger)object).toString());
printString("\")");
} else {
printString((String)ConversionManager.getDefaultManager().convertObject(object, String.class));
}
|
public void | printString(java.lang.String value)
getWriter().write(value);
|