/** * OBSOLETE: Set the name of the field holding the sequence name. * * @deprecated use ((SDKSequence)getDefaultSequence()).setNameFieldName() instead */ public void setSequenceNameFieldName(String sequenceNameFieldName) { if (getDefaultSequence() instanceof SDKSequence) { ((SDKSequence) getDefaultSequence()).setNameFieldName(sequenceNameFieldName); } else if (!sequenceNameFieldName.equals((new SDKSequence()).getNameFieldName())) { throw ValidationException.wrongSequenceType( Helper.getShortClassName(getDefaultSequence()), "setNameFieldName"); } }
public String toString() { StringWriter writer = new StringWriter(); writer.write(Helper.getShortClassName(getClass())); writer.write("("); writer.write(getValue().toString()); writer.write(")"); return writer.toString(); }
/** * If using native SQL then print a byte[] literally as a hex string otherwise use ODBC format as * provided in DatabasePlatform. */ protected void appendByteArray(byte[] bytes, Writer writer) throws IOException { if (usesNativeSQL()) { writer.write("Ox"); Helper.writeHexString(bytes, writer); } else { super.appendByteArray(bytes, writer); } }
/** * OBSOLETE: Return the name of the field holding the sequence name. * * @deprecated use ((SDKSequence)getDefaultSequence()).getNameFieldName() instead */ public String getSequenceNameFieldName() { if (getDefaultSequence() instanceof SDKSequence) { return ((SDKSequence) getDefaultSequence()).getNameFieldName(); } else { throw ValidationException.wrongSequenceType( Helper.getShortClassName(getDefaultSequence()), "getNameFieldName"); } }
/** * INTERNAL: Appends an Oracle specific Timestamp, if usesNativeSQL is true otherwise use the ODBC * format. Native Format: to_timestamp ('1997-11-06 10:35:45.656' , 'yyyy-mm-dd hh:mm:ss.ff') */ protected void appendTimestamp(java.sql.Timestamp timestamp, Writer writer) throws IOException { if (usesNativeSQL()) { writer.write("to_timestamp('"); writer.write(Helper.printTimestamp(timestamp)); writer.write("','yyyy-mm-dd HH24:MI:SS.FF')"); } else { super.appendTimestamp(timestamp, writer); } }
/** * Appends an MySQL specific Timestamp, if usesNativeSQL is true otherwise use the ODBC format. * Native Format: 'YYYY-MM-DD HH:MM:SS' */ protected void appendCalendar(Calendar calendar, Writer writer) throws IOException { if (usesNativeSQL()) { writer.write("TIMESTAMP '"); writer.write(Helper.printCalendarWithoutNanos(calendar)); writer.write("'"); } else { super.appendCalendar(calendar, writer); } }
/** * Appends an MySQL specific Timestamp, if usesNativeSQL is true otherwise use the ODBC format. * Native Format: 'YYYY-MM-DD HH:MM:SS' */ protected void appendTimestamp(java.sql.Timestamp timestamp, Writer writer) throws IOException { if (usesNativeSQL()) { writer.write("TIMESTAMP '"); writer.write(Helper.printTimestampWithoutNanos(timestamp)); writer.write("'"); } else { super.appendTimestamp(timestamp, writer); } }
/** * Appends an MySQL specific time if usesNativeSQL is true otherwise use the ODBC format. Native * FORMAT: 'HH:MM:SS'. */ protected void appendTime(java.sql.Time time, Writer writer) throws IOException { if (usesNativeSQL()) { writer.write("TIME '"); writer.write(Helper.printTime(time)); writer.write("'"); } else { super.appendTime(time, writer); } }
/** * Appends an MySQL specific date if usesNativeSQL is true otherwise use the ODBC format. Native * FORMAT: 'YYYY-MM-DD' */ protected void appendDate(java.sql.Date date, Writer writer) throws IOException { if (usesNativeSQL()) { writer.write("DATE '"); writer.write(Helper.printDate(date)); writer.write("'"); } else { super.appendDate(date, writer); } }
public String toString() { return Helper.getShortClassName(getClass()) + "(" + getFullName() + ")"; }