本文整理了Java中org.eclipse.persistence.internal.helper.Helper.printCalendarWithoutNanos()
方法的一些代码示例,展示了Helper.printCalendarWithoutNanos()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Helper.printCalendarWithoutNanos()
方法的具体详情如下:
包路径:org.eclipse.persistence.internal.helper.Helper
类名称:Helper
方法名:printCalendarWithoutNanos
[英]Print the Calendar without the nanos portion.
[中]打印日历,但不打印Nano部分。
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Write a Calendar in Symfoware specific format.<br>
* Note that Symfoware does not support nanoseconds.<br>
* Symfoware: CNV_TIMESTAMP(calendar, 'YYYY-MM-DD hh24:mm:ss')
*/
@Override
protected void appendCalendar(Calendar calendar, Writer writer) throws IOException {
writer.write("TIMESTAMP'" + Helper.printCalendarWithoutNanos(calendar) + "'");
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* Write a Calendar in Symfoware specific format.<br>
* Note that Symfoware does not support nanoseconds.<br>
* Symfoware: CNV_TIMESTAMP(calendar, 'YYYY-MM-DD hh24:mm:ss')
*/
@Override
protected void appendCalendar(Calendar calendar, Writer writer) throws IOException {
writer.write("TIMESTAMP'" + Helper.printCalendarWithoutNanos(calendar) + "'");
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Appends an MySQL specific Timestamp, if usesNativeSQL is true otherwise use the ODBC format.
* Native Format: 'YYYY-MM-DD HH:MM:SS'
*/
@Override
protected void appendCalendar(Calendar calendar, Writer writer) throws IOException {
if (usesNativeSQL()) {
writer.write("'");
writer.write(Helper.printCalendarWithoutNanos(calendar));
writer.write("'");
} else {
super.appendCalendar(calendar, writer);
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* Appends an TimesTen specific Timestamp, if usesNativeSQL is true otherwise use the ODBC format.
* Native Format: 'YYYY-MM-DD HH:MM:SS'
*/
@Override
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);
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* Appends an MySQL specific Timestamp, if usesNativeSQL is true otherwise use the ODBC format.
* Native Format: 'YYYY-MM-DD HH:MM:SS'
*/
@Override
protected void appendCalendar(Calendar calendar, Writer writer) throws IOException {
if (usesNativeSQL()) {
writer.write("'");
writer.write(Helper.printCalendarWithoutNanos(calendar));
writer.write("'");
} else {
super.appendCalendar(calendar, writer);
}
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* INTERNAL:
* Appends an Oracle specific Timestamp, if usesNativeSQL is true otherwise use the ODBC format.
* Native Format: to_date ('1997-11-06 10:35:45.0' , 'yyyy-mm-dd hh:mm:ss.n')
*/
protected void appendCalendar(Calendar calendar, Writer writer) throws IOException {
if (usesNativeSQL()) {
writer.write("to_date('");
writer.write(Helper.printCalendarWithoutNanos(calendar));
writer.write("','yyyy-mm-dd hh24:mi:ss')");
} else {
super.appendCalendar(calendar, writer);
}
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* Appends an TimesTen specific Timestamp, if usesNativeSQL is true otherwise use the ODBC format.
* Native Format: 'YYYY-MM-DD HH:MM:SS'
*/
@Override
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);
}
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* 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("'");
writer.write(Helper.printCalendarWithoutNanos(calendar));
writer.write("'");
} else {
super.appendCalendar(calendar, writer);
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* Print the sql.Timestamp without the nanos portion.
*/
public static String printTimestampWithoutNanos(java.sql.Timestamp timestamp) {
// PERF: Avoid deprecated get methods, that are now very inefficient and used from toString.
Calendar calendar = allocateCalendar();
calendar.setTime(timestamp);
String string = printCalendarWithoutNanos(calendar);
releaseCalendar(calendar);
return string;
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* Print the sql.Timestamp without the nanos portion.
*/
public static String printTimestampWithoutNanos(java.sql.Timestamp timestamp) {
// PERF: Avoid deprecated get methods, that are now very inefficient and used from toString.
Calendar calendar = allocateCalendar();
calendar.setTime(timestamp);
String string = printCalendarWithoutNanos(calendar);
releaseCalendar(calendar);
return string;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Appends an TimesTen specific Timestamp, if usesNativeSQL is true otherwise use the ODBC format.
* Native Format: 'YYYY-MM-DD HH:MM:SS'
*/
@Override
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);
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* INTERNAL:
* Appends an Oracle specific Timestamp, if usesNativeSQL is true otherwise use the ODBC format.
* Native Format: to_date ('1997-11-06 10:35:45.0' , 'yyyy-mm-dd hh:mm:ss.n')
*/
@Override
protected void appendCalendar(Calendar calendar, Writer writer) throws IOException {
if (usesNativeSQL()) {
writer.write("to_date('");
writer.write(Helper.printCalendarWithoutNanos(calendar));
writer.write("','yyyy-mm-dd hh24:mi:ss')");
} else {
super.appendCalendar(calendar, writer);
}
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Print the sql.Timestamp without the nanos portion.
*/
public static String printTimestampWithoutNanos(java.sql.Timestamp timestamp) {
// PERF: Avoid deprecated get methods, that are now very inefficient and used from toString.
Calendar calendar = allocateCalendar();
calendar.setTime(timestamp);
String string = printCalendarWithoutNanos(calendar);
releaseCalendar(calendar);
return string;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* INTERNAL:
* Appends an Oracle specific Timestamp, if usesNativeSQL is true otherwise use the ODBC format.
* Native Format: to_date ('1997-11-06 10:35:45.0' , 'yyyy-mm-dd hh:mm:ss.n')
*/
@Override
protected void appendCalendar(Calendar calendar, Writer writer) throws IOException {
if (usesNativeSQL()) {
writer.write("to_date('");
writer.write(Helper.printCalendarWithoutNanos(calendar));
writer.write("','yyyy-mm-dd hh24:mi:ss')");
} else {
super.appendCalendar(calendar, writer);
}
}
内容来源于网络,如有侵权,请联系作者删除!