本文整理了Java中org.eclipse.persistence.internal.helper.Helper.calendarFromUtilDate()
方法的一些代码示例,展示了Helper.calendarFromUtilDate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Helper.calendarFromUtilDate()
方法的具体详情如下:
包路径:org.eclipse.persistence.internal.helper.Helper
类名称:Helper
方法名:calendarFromUtilDate
[英]Answer a Calendar from a date.
[中]从日期开始回答日历。
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* Build a valid instance of java.util.Calendar from the given source object.
* @param sourceObject Valid instance of java.util.Date, String, java.sql.Timestamp, or Long
*/
protected Calendar convertObjectToCalendar(Object sourceObject) throws ConversionException {
if (sourceObject instanceof Calendar) {
return (Calendar)sourceObject;
} else if (sourceObject instanceof java.util.Date) {
// PERF: Avoid double conversion for date subclasses.
return Helper.calendarFromUtilDate((java.util.Date)sourceObject);
}
return Helper.calendarFromUtilDate(convertObjectToUtilDate(sourceObject));
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* Build a valid instance of java.util.Calendar from the given source object.
* @param sourceObject Valid instance of java.util.Date, String, java.sql.Timestamp, or Long
*/
protected Calendar convertObjectToCalendar(Object sourceObject) throws ConversionException {
if (sourceObject instanceof Calendar) {
return (Calendar)sourceObject;
} else if (sourceObject instanceof java.util.Date) {
// PERF: Avoid double conversion for date subclasses.
return Helper.calendarFromUtilDate((java.util.Date)sourceObject);
}
return Helper.calendarFromUtilDate(convertObjectToUtilDate(sourceObject));
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Build a valid instance of java.util.Calendar from the given source object.
* @param sourceObject Valid instance of java.util.Date, String, java.sql.Timestamp, or Long
*/
protected Calendar convertObjectToCalendar(Object sourceObject) throws ConversionException {
if (sourceObject instanceof Calendar) {
return (Calendar)sourceObject;
} else if (sourceObject instanceof java.util.Date) {
// PERF: Avoid double conversion for date subclasses.
return Helper.calendarFromUtilDate((java.util.Date)sourceObject);
}
return Helper.calendarFromUtilDate(convertObjectToUtilDate(sourceObject));
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
public Calendar convertStringToCalendar(String sourceString, QName schemaTypeQName) {
java.util.Date date = convertStringToDate(sourceString, schemaTypeQName);
Calendar cal = Helper.calendarFromUtilDate(date);
cal.setTimeZone(getTimeZone());
return cal;
}
内容来源于网络,如有侵权,请联系作者删除!