本文整理了Java中org.eclipse.persistence.internal.helper.Helper.printCalendar()
方法的一些代码示例,展示了Helper.printCalendar()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Helper.printCalendar()
方法的具体详情如下:
包路径:org.eclipse.persistence.internal.helper.Helper
类名称:Helper
方法名:printCalendar
[英]Print the Calendar.
[中]打印日历。
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* Print the Calendar.
*/
public static String printCalendar(Calendar calendar) {
return printCalendar(calendar, true);
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Print the Calendar.
*/
public static String printCalendar(Calendar calendar) {
return printCalendar(calendar, true);
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* Print the Calendar.
*/
public static String printCalendar(Calendar calendar) {
return printCalendar(calendar, true);
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Write a timestamp in Sybase specific format ( yyyy-mm-dd-hh.mm.ss.fff)
*/
protected void appendSybaseCalendar(Calendar calendar, Writer writer) throws IOException {
writer.write("'");
writer.write(Helper.printCalendar(calendar));
writer.write("'");
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* Write a timestamp in Informix specific format ( yyyy-mm-dd hh:mm:ss.fff)
*/
protected void appendInformixCalendar(Calendar calendar, Writer writer) throws IOException {
writer.write("'");
writer.write(Helper.printCalendar(calendar));
writer.write("'");
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
@Override
protected void appendCalendar(Calendar calendar, Writer writer) throws IOException {
writer.write("TO_TIMESTAMP('");
writer.write(Helper.printCalendar(calendar));
writer.write("')");
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* Write a timestamp in Informix specific format ( yyyy-mm-dd hh:mm:ss.fff)
*/
protected void appendInformixCalendar(Calendar calendar, Writer writer) throws IOException {
writer.write("'");
writer.write(Helper.printCalendar(calendar));
writer.write("'");
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* Answer a platform correct string representation of a Calendar as a Timestamp, suitable for SQL generation.
* The calendar is printed in the ODBC platform independent timestamp format {ts'YYYY-MM-DD HH:MM:SS.NNNNNNNNN'}.
*/
protected void appendCalendar(Calendar calendar, Writer writer) throws IOException {
writer.write("{ts '");
writer.write(Helper.printCalendar(calendar));
writer.write("'}");
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Write a timestamp in Sybase specific format ( yyyy-mm-dd-hh.mm.ss.fff)
*/
protected void appendSybaseCalendar(Calendar calendar, Writer writer) throws IOException {
writer.write("'");
writer.write(Helper.printCalendar(calendar));
writer.write("'");
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* Answer a platform correct string representation of a Calendar as a Timestamp, suitable for SQL generation.
* The calendar is printed in the ODBC platform independent timestamp format {ts'YYYY-MM-DD HH:MM:SS.NNNNNNNNN'}.
*/
protected void appendCalendar(Calendar calendar, Writer writer) throws IOException {
writer.write("{ts '");
writer.write(Helper.printCalendar(calendar));
writer.write("'}");
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
@Override
protected void appendCalendar(Calendar calendar, Writer writer) throws IOException {
writer.write("TO_TIMESTAMP('");
writer.write(Helper.printCalendar(calendar));
writer.write("')");
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* Write a timestamp in Sybase specific format ( yyyy-mm-dd-hh.mm.ss.fff)
*/
protected void appendSybaseCalendar(Calendar calendar, Writer writer) throws IOException {
writer.write("'");
writer.write(Helper.printCalendar(calendar));
writer.write("'");
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* Write a timestamp in Sybase specific format ( yyyy-mm-dd-hh.mm.ss.fff)
*/
protected void appendSybaseCalendar(Calendar calendar, Writer writer) throws IOException {
writer.write("'");
writer.write(Helper.printCalendar(calendar));
writer.write("'");
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* Write a timestamp in Sybase specific format ( yyyy-mm-dd-hh.mm.ss.fff)
*/
protected void appendSybaseCalendar(Calendar calendar, Writer writer) throws IOException {
writer.write("'");
writer.write(Helper.printCalendar(calendar));
writer.write("'");
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Write a timestamp in Informix specific format ( yyyy-mm-dd hh:mm:ss.fff)
*/
protected void appendInformixCalendar(Calendar calendar, Writer writer) throws IOException {
writer.write("'");
writer.write(Helper.printCalendar(calendar));
writer.write("'");
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Answer a platform correct string representation of a Calendar as a Timestamp, suitable for SQL generation.
* The calendar is printed in the ODBC platform independent timestamp format {ts'YYYY-MM-DD HH:MM:SS.NNNNNNNNN'}.
*/
protected void appendCalendar(Calendar calendar, Writer writer) throws IOException {
writer.write("{ts '");
writer.write(Helper.printCalendar(calendar));
writer.write("'}");
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* Write a timestamp in Sybase specific format ( yyyy-mm-dd-hh.mm.ss.fff)
*/
protected void appendSybaseCalendar(Calendar calendar, Writer writer) throws IOException {
writer.write("'");
writer.write(Helper.printCalendar(calendar));
writer.write("'");
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* This conversion required the use of the literal string to get the same
* functionality as the native SQL to_timestamp() approach.
*/
public static TIMESTAMPTZ buildTIMESTAMPTZ(Calendar cal, Connection con, boolean shouldPrintCalendar) throws SQLException {
//Bug5614674. It used to be a driver bug and Helper.printCalendar(cal, false) was used to make it work. It has been fixed in 11. Separate the newer version from the old ones.
if (shouldPrintCalendar) {
return new TIMESTAMPTZ(con, Helper.printCalendar(cal, false), cal);
} else {
return new TIMESTAMPTZ(con, new Timestamp(cal.getTimeInMillis()), cal);
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.oracle
/**
* This conversion required the use of the literal string to get the same
* functionality as the native SQL to_timestamp() approach.
*/
public static TIMESTAMPTZ buildTIMESTAMPTZ(Calendar cal, Connection con, boolean shouldPrintCalendar) throws SQLException {
//Bug5614674. It used to be a driver bug and Helper.printCalendar(cal, false) was used to make it work. It has been fixed in 11. Separate the newer version from the old ones.
if (shouldPrintCalendar) {
return new TIMESTAMPTZ(con, Helper.printCalendar(cal, false), cal);
} else {
return new TIMESTAMPTZ(con, new Timestamp(cal.getTimeInMillis()), cal);
}
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Build a calendar string based on the calendar fields.
* If the daylight savings time should be printed and the zone is in daylight savings time,
* print the short representation of daylight savings from the calendar's timezone data.
*/
public static String printCalendar(Calendar calendar) {
if (calendar == null) {
return "null";
}
StringWriter writer = new StringWriter();
writer.write(Helper.printCalendar(calendar, false));
writer.write(" ");
writer.write(calendar.getTimeZone().getID());
// If we should print daylight savings and the zone is reported to be using daylight time,
// write the short representation of the daylight time in the writer.
if (shouldAppendDaylightTime(calendar)) {
writer.write(" ");
writer.write(calendar.getTimeZone().getDisplayName(true, TimeZone.SHORT));
}
return writer.toString();
}
内容来源于网络,如有侵权,请联系作者删除!