本文整理了Java中org.eclipse.persistence.internal.helper.Helper.printDate()
方法的一些代码示例,展示了Helper.printDate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Helper.printDate()
方法的具体详情如下:
包路径:org.eclipse.persistence.internal.helper.Helper
类名称:Helper
方法名:printDate
[英]Print the sql.Date.
[中]打印sql。日期
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* Print the date part of the calendar.
*/
public static String printDate(Calendar calendar) {
return printDate(calendar, true);
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Appends a Date in Symfoware specific format.<br>
* Symfoware: DATE'YYYY-MM-DD'
*/
@Override
protected void appendDate(java.sql.Date date, Writer writer) throws IOException {
writer.write("DATE'" + Helper.printDate(date) + "'");
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* Appends a Date in Symfoware specific format.<br>
* Symfoware: DATE'YYYY-MM-DD'
*/
@Override
protected void appendDate(java.sql.Date date, Writer writer) throws IOException {
writer.write("DATE'" + Helper.printDate(date) + "'");
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
@Override
protected void appendDate(Date date, Writer writer) throws IOException {
writer.write("TO_DATE('");
writer.write(Helper.printDate(date));
writer.write("')");
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* Answer a platform correct string representation of a Date, suitable for SQL generation.
* The date is printed in the ODBC platform independent format {d 'yyyy-mm-dd'}.
*/
protected void appendDate(java.sql.Date date, Writer writer) throws IOException {
writer.write("{d '");
writer.write(Helper.printDate(date));
writer.write("'}");
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* Answer a platform correct string representation of a Date, suitable for SQL generation.
* The date is printed in the ODBC platform independent format {d 'yyyy-mm-dd'}.
*/
protected void appendDate(java.sql.Date date, Writer writer) throws IOException {
writer.write("{d '");
writer.write(Helper.printDate(date));
writer.write("'}");
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
@Override
protected void appendDate(Date date, Writer writer) throws IOException {
writer.write("TO_DATE('");
writer.write(Helper.printDate(date));
writer.write("')");
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Answer a platform correct string representation of a Date, suitable for SQL generation.
* The date is printed in the ODBC platform independent format {d 'yyyy-mm-dd'}.
*/
protected void appendDate(java.sql.Date date, Writer writer) throws IOException {
writer.write("{d '");
writer.write(Helper.printDate(date));
writer.write("'}");
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* Print the Calendar without the nanos portion.
*/
public static String printCalendarWithoutNanos(Calendar calendar) {
StringBuilder timestampBuf = new StringBuilder();
timestampBuf.append(printDate(calendar));
timestampBuf.append(" ");
timestampBuf.append(printTime(calendar));
return timestampBuf.toString();
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* Print the Calendar without the nanos portion.
*/
public static String printCalendarWithoutNanos(Calendar calendar) {
StringBuffer timestampBuf = new StringBuffer();
timestampBuf.append(printDate(calendar));
timestampBuf.append(" ");
timestampBuf.append(printTime(calendar));
return timestampBuf.toString();
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Print the Calendar without the nanos portion.
*/
public static String printCalendarWithoutNanos(Calendar calendar) {
StringBuilder timestampBuf = new StringBuilder();
timestampBuf.append(printDate(calendar));
timestampBuf.append(" ");
timestampBuf.append(printTime(calendar));
return timestampBuf.toString();
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* Answer a platform correct string representation of a Date, suitable for SQL generation.
* Native format: 'yyyy-mm-dd
*/
protected void appendDate(java.sql.Date date, Writer writer) throws IOException {
if (usesNativeSQL()) {
writer.write("'");
writer.write(Helper.printDate(date));
writer.write("'");
} else {
super.appendDate(date, writer);
}
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Answer a platform correct string representation of a Date, suitable for SQL generation.
* Native format: 'yyyy-mm-dd
*/
protected void appendDate(java.sql.Date date, Writer writer) throws IOException {
if (usesNativeSQL()) {
writer.write("'");
writer.write(Helper.printDate(date));
writer.write("'");
} else {
super.appendDate(date, writer);
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* Answer a platform correct string representation of a Date, suitable for SQL generation.
* Native format: 'yyyy-mm-dd
*/
protected void appendDate(java.sql.Date date, Writer writer) throws IOException {
if (usesNativeSQL()) {
writer.write("'");
writer.write(Helper.printDate(date));
writer.write("'");
} else {
super.appendDate(date, writer);
}
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* 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("'");
writer.write(Helper.printDate(date));
writer.write("'");
} else {
super.appendDate(date, writer);
}
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* Answer a platform correct string representation of a Date, suitable for SQL generation.
* Native format: 'yyyy-mm-dd
*/
protected void appendDate(java.sql.Date date, Writer writer) throws IOException {
if (usesNativeSQL()) {
writer.write("'");
writer.write(Helper.printDate(date));
writer.write("'");
} else {
super.appendDate(date, writer);
}
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Appends an MySQL specific date if usesNativeSQL is true otherwise use the ODBC format.
* Native FORMAT: 'YYYY-MM-DD'
*/
@Override
protected void appendDate(java.sql.Date date, Writer writer) throws IOException {
if (usesNativeSQL()) {
writer.write("'");
writer.write(Helper.printDate(date));
writer.write("'");
} else {
super.appendDate(date, writer);
}
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Answer a platform correct string representation of a Date, suitable for SQL generation.
* Native format: 'yyyy-mm-dd
*/
@Override
protected void appendDate(java.sql.Date date, Writer writer) throws IOException {
if (usesNativeSQL()) {
writer.write("'");
writer.write(Helper.printDate(date));
writer.write("'");
} else {
super.appendDate(date, writer);
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* Print the sql.Date.
*/
public static String printDate(java.sql.Date date) {
// PERF: Avoid deprecated get methods, that are now very inefficient and used from toString.
Calendar calendar = allocateCalendar();
calendar.setTime(date);
String string = printDate(calendar);
releaseCalendar(calendar);
return string;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Print the sql.Date.
*/
public static String printDate(java.sql.Date date) {
// PERF: Avoid deprecated get methods, that are now very inefficient and used from toString.
Calendar calendar = allocateCalendar();
calendar.setTime(date);
String string = printDate(calendar);
releaseCalendar(calendar);
return string;
}
内容来源于网络,如有侵权,请联系作者删除!