org.eclipse.persistence.internal.helper.Helper.printTimestamp()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(173)

本文整理了Java中org.eclipse.persistence.internal.helper.Helper.printTimestamp()方法的一些代码示例,展示了Helper.printTimestamp()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Helper.printTimestamp()方法的具体详情如下:
包路径:org.eclipse.persistence.internal.helper.Helper
类名称:Helper
方法名:printTimestamp

Helper.printTimestamp介绍

[英]Print the sql.Timestamp.
[中]打印sql。时间戳。

代码示例

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

/**
 * Answer a platform correct string representation of a Timestamp, suitable for SQL generation.
 * The timestamp is printed in the ODBC platform independent timestamp format {ts'YYYY-MM-DD HH:MM:SS.NNNNNNNNN'}.
 */
protected void appendTimestamp(java.sql.Timestamp timestamp, Writer writer) throws IOException {
  writer.write("{ts '");
  writer.write(Helper.printTimestamp(timestamp));
  writer.write("'}");
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

@Override
protected void appendTimestamp(Timestamp timestamp, Writer writer) throws IOException {
  writer.write("TO_TIMESTAMP('");
  writer.write(Helper.printTimestamp(timestamp));
  writer.write("')");
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Answer a platform correct string representation of a Timestamp, suitable for SQL generation.
 * The timestamp is printed in the ODBC platform independent timestamp format {ts'YYYY-MM-DD HH:MM:SS.NNNNNNNNN'}.
 */
protected void appendTimestamp(java.sql.Timestamp timestamp, Writer writer) throws IOException {
  writer.write("{ts '");
  writer.write(Helper.printTimestamp(timestamp));
  writer.write("'}");
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * Answer a platform correct string representation of a Timestamp, suitable for SQL generation.
 * The timestamp is printed in the ODBC platform independent timestamp format {ts'YYYY-MM-DD HH:MM:SS.NNNNNNNNN'}.
 */
protected void appendTimestamp(java.sql.Timestamp timestamp, Writer writer) throws IOException {
  writer.write("{ts '");
  writer.write(Helper.printTimestamp(timestamp));
  writer.write("'}");
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

@Override
protected void appendTimestamp(Timestamp timestamp, Writer writer) throws IOException {
  writer.write("TO_TIMESTAMP('");
  writer.write(Helper.printTimestamp(timestamp));
  writer.write("')");
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

/**
 * 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')
 */
@Override
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);
  }
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.oracle

/**
 * 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')
 */
@Override
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);
  }
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

return sourceObject.toString();
} else if (sourceObjectClass == ClassConstants.UTILDATE) {
  return Helper.printTimestamp(Helper.timestampFromDate((java.util.Date)sourceObject));
} else if (sourceObject instanceof java.util.Calendar) {
  return Helper.printCalendar((Calendar)sourceObject);
} else if (sourceObjectClass == ClassConstants.TIMESTAMP) {
  return Helper.printTimestamp((java.sql.Timestamp)sourceObject);
} else if (sourceObject instanceof java.sql.Date) {
  return Helper.printDate((java.sql.Date)sourceObject);

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

return sourceObject.toString();
} else if (sourceObjectClass == ClassConstants.UTILDATE) {
  return Helper.printTimestamp(Helper.timestampFromDate((java.util.Date)sourceObject));
} else if (sourceObject instanceof java.util.Calendar) {
  return Helper.printCalendar((Calendar)sourceObject);
} else if (sourceObjectClass == ClassConstants.TIMESTAMP) {
  return Helper.printTimestamp((java.sql.Timestamp)sourceObject);
} else if (sourceObject instanceof java.sql.Date) {
  return Helper.printDate((java.sql.Date)sourceObject);

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

return Helper.printTimestamp(Helper.timestampFromDate((java.util.Date)sourceObject));
} else if (sourceObject instanceof Calendar) {
  return Helper.printCalendar((Calendar)sourceObject);
} else if (sourceObject instanceof java.sql.Timestamp) {
  return Helper.printTimestamp((java.sql.Timestamp)sourceObject);
} else if (sourceObject instanceof java.sql.Date) {
  return Helper.printDate((java.sql.Date)sourceObject);

相关文章

Helper类方法