protected Time convertObjectToSQLTime(Object sourceObject, QName schemaTypeQName) { if (sourceObject instanceof String) { Date date = convertStringToDate((String) sourceObject, schemaTypeQName); return new java.sql.Time((date.getTime() / 1000) * 1000); } return super.convertObjectToTime(sourceObject); }
protected java.sql.Date convertObjectToSQLDate(Object sourceObject, QName schemaTypeQName) { if (sourceObject instanceof String) { Date date = convertStringToDate((String) sourceObject, schemaTypeQName); return new java.sql.Date((date.getTime() / 1000) * 1000); } return convertObjectToDate(sourceObject); }
private Date convertObjectToUtilDate(Object sourceObject, QName schemaTypeQName) { if (sourceObject instanceof String) { return convertStringToDate((String) sourceObject, schemaTypeQName); } return super.convertObjectToUtilDate(sourceObject); }
protected java.sql.Date convertObjectToSQLDate(Object sourceObject, QName schemaTypeQName) { if (sourceObject instanceof String) { Date date = convertStringToDate((String) sourceObject, schemaTypeQName); return new java.sql.Date((date.getTime() / 1000) * 1000); } return super.convertObjectToDate(sourceObject); }
private Date convertObjectToUtilDate(Object sourceObject, QName schemaTypeQName) { if (sourceObject instanceof String) { return convertStringToDate((String) sourceObject, schemaTypeQName); } return super.convertObjectToUtilDate(sourceObject); }
protected Time convertObjectToSQLTime(Object sourceObject, QName schemaTypeQName) { if (sourceObject instanceof String) { Date date = convertStringToDate((String) sourceObject, schemaTypeQName); return new java.sql.Time((date.getTime() / 1000) * 1000); } return super.convertObjectToTime(sourceObject); }
private Date convertObjectToUtilDate(Object sourceObject, QName schemaTypeQName) { if (sourceObject instanceof String) { return convertStringToDate((String) sourceObject, schemaTypeQName); } return super.convertObjectToUtilDate(sourceObject); }
protected java.sql.Date convertObjectToSQLDate(Object sourceObject, QName schemaTypeQName) { if (sourceObject instanceof String) { Date date = convertStringToDate((String) sourceObject, schemaTypeQName); return new java.sql.Date((date.getTime() / 1000) * 1000); } return convertObjectToDate(sourceObject); }
protected Time convertObjectToSQLTime(Object sourceObject, QName schemaTypeQName) { if (sourceObject instanceof String) { Date date = convertStringToDate((String) sourceObject, schemaTypeQName); return new java.sql.Time((date.getTime() / 1000) * 1000); } return super.convertObjectToTime(sourceObject); }
public Calendar convertStringToCalendar(String sourceString, QName schemaTypeQName) { java.util.Date date = convertStringToDate(sourceString, schemaTypeQName); Calendar cal = Helper.calendarFromUtilDate(date); cal.setTimeZone(getTimeZone()); return cal; }
/** * Convert from a String representation of the Date type to a Date. * * @param dateString a String representation of the Date type * @return a Date from a String representation of the Date type. */ public Date toDate(String dateString) { if (null == dateString) { return null; } if (dateString.startsWith("P")) { Calendar cal = toCalendar(getXMLConversionManager().convertStringToDuration(dateString), null); return cal.getTime(); } try { return getXMLConversionManager().convertStringToDate(dateString, null); } catch(ConversionException e){ throw new IllegalArgumentException(e); } }
/** * Convert from a String representation of the Date type to a Date. * * @param dateString a String representation of the Date type * @return a Date from a String representation of the Date type. */ public Date toDate(String dateString) { if (null == dateString) { return null; } if (dateString.startsWith("P")) { Calendar cal = toCalendar(getXMLConversionManager().convertStringToDuration(dateString), null); return cal.getTime(); } try { return getXMLConversionManager().convertStringToDate(dateString, null); } catch(ConversionException e){ throw new IllegalArgumentException(e); } }