gpt4 book ai didi

org.eclipse.persistence.internal.oxm.XMLConversionManager.convertStringToXMLGregorianCalendar()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 12:00:40 25 4
gpt4 key购买 nike

本文整理了Java中org.eclipse.persistence.internal.oxm.XMLConversionManager.convertStringToXMLGregorianCalendar()方法的一些代码示例,展示了XMLConversionManager.convertStringToXMLGregorianCalendar()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLConversionManager.convertStringToXMLGregorianCalendar()方法的具体详情如下:
包路径:org.eclipse.persistence.internal.oxm.XMLConversionManager
类名称:XMLConversionManager
方法名:convertStringToXMLGregorianCalendar

XMLConversionManager.convertStringToXMLGregorianCalendar介绍

[英]Return an XMLGregorianCalander created with a given date string
[中]返回使用给定日期字符串创建的XMLGregorianCalander

代码示例

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

public Calendar convertStringToCalendar(String sourceString, QName schemaTypeQName) {
  XMLGregorianCalendar xmlGregorianCalender = convertStringToXMLGregorianCalendar(sourceString, schemaTypeQName);
  if(xmlGregorianCalender == null) {
    return null;
  }
  return toCalendar(xmlGregorianCalender);
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

public java.util.Date convertStringToDate(String sourceString, QName schemaType) {
  XMLGregorianCalendar xmlGregorianCalender = convertStringToXMLGregorianCalendar(sourceString, schemaType);
  if(xmlGregorianCalender == null) {
    return null;
  }
  Calendar cal = toCalendar(xmlGregorianCalender);
  Date returnDate = cal.getTime();
  return returnDate;
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

public Calendar convertStringToCalendar(String sourceString, QName schemaTypeQName) {
  XMLGregorianCalendar xmlGregorianCalender = convertStringToXMLGregorianCalendar(sourceString, schemaTypeQName);
  if(xmlGregorianCalender == null) {
    return null;
  }
  return toCalendar(xmlGregorianCalender);
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

public java.util.Date convertStringToDate(String sourceString, QName schemaType) {
  XMLGregorianCalendar xmlGregorianCalender = convertStringToXMLGregorianCalendar(sourceString, schemaType);
  if(xmlGregorianCalender == null) {
    return null;
  }
  Calendar cal = toCalendar(xmlGregorianCalender);
  Date returnDate = cal.getTime();
  return returnDate;
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * Build a valid instance of XMLGregorianCalendar from the provided sourceObject.
 *
 * @param sourceObject
 */
protected XMLGregorianCalendar convertObjectToXMLGregorianCalendar(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof XMLGregorianCalendar) {
    return (XMLGregorianCalendar) sourceObject;
  }
  
  if (sourceObject instanceof String) {
    return convertStringToXMLGregorianCalendar((String) sourceObject);
  }
  throw ConversionException.couldNotBeConverted(sourceObject, ClassConstants.XML_GREGORIAN_CALENDAR);
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Build a valid instance of XMLGregorianCalendar from the provided sourceObject.
 *
 * @param sourceObject
 */
protected XMLGregorianCalendar convertObjectToXMLGregorianCalendar(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof XMLGregorianCalendar) {
    return (XMLGregorianCalendar) sourceObject;
  }
  if (sourceObject instanceof String) {
    return convertStringToXMLGregorianCalendar((String) sourceObject);
  }
  throw ConversionException.couldNotBeConverted(sourceObject, CoreClassConstants.XML_GREGORIAN_CALENDAR);
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

/**
 * Build a valid instance of XMLGregorianCalendar from the provided sourceObject.
 *
 * @param sourceObject
 */
protected XMLGregorianCalendar convertObjectToXMLGregorianCalendar(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof XMLGregorianCalendar) {
    return (XMLGregorianCalendar) sourceObject;
  }
  if (sourceObject instanceof String) {
    return convertStringToXMLGregorianCalendar((String) sourceObject);
  }
  throw ConversionException.couldNotBeConverted(sourceObject, CoreClassConstants.XML_GREGORIAN_CALENDAR);
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Build a valid instance of XMLGregorianCalendar from the provided sourceObject.
 *
 * @param sourceObject
 * @param schemaTypeQName
 */
protected XMLGregorianCalendar convertObjectToXMLGregorianCalendar(Object sourceObject, QName schemaTypeQName) throws ConversionException {
  if (sourceObject instanceof XMLGregorianCalendar) {
    return (XMLGregorianCalendar) sourceObject;
  }
  if (sourceObject instanceof String) {
    return convertStringToXMLGregorianCalendar((String) sourceObject, schemaTypeQName);
  }
  throw ConversionException.couldNotBeConverted(sourceObject, CoreClassConstants.XML_GREGORIAN_CALENDAR);
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

/**
 * Build a valid instance of XMLGregorianCalendar from the provided sourceObject.
 *
 * @param sourceObject
 * @param schemaTypeQName
 */
protected XMLGregorianCalendar convertObjectToXMLGregorianCalendar(Object sourceObject, QName schemaTypeQName) throws ConversionException {
  if (sourceObject instanceof XMLGregorianCalendar) {
    return (XMLGregorianCalendar) sourceObject;
  }
  if (sourceObject instanceof String) {
    return convertStringToXMLGregorianCalendar((String) sourceObject, schemaTypeQName);
  }
  throw ConversionException.couldNotBeConverted(sourceObject, CoreClassConstants.XML_GREGORIAN_CALENDAR);
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * Build a valid instance of XMLGregorianCalendar from the provided sourceObject.
 *
 * @param sourceObject
 * @param schemaTypeQName
 */
protected XMLGregorianCalendar convertObjectToXMLGregorianCalendar(Object sourceObject, QName schemaTypeQName) throws ConversionException {
  if (sourceObject instanceof XMLGregorianCalendar) {
    return (XMLGregorianCalendar) sourceObject;
  }
  
  if (sourceObject instanceof String) {
    return convertStringToXMLGregorianCalendar((String) sourceObject, schemaTypeQName);
  }
  throw ConversionException.couldNotBeConverted(sourceObject, ClassConstants.XML_GREGORIAN_CALENDAR);
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

public java.util.Date convertStringToDate(String sourceString, QName schemaType) {
  XMLGregorianCalendar xmlGregorianCalender = convertStringToXMLGregorianCalendar(sourceString, schemaType);
  if (schemaType == null) {
    schemaType = xmlGregorianCalender.getXMLSchemaType();
  }
  XMLGregorianCalendar defaults = getDatatypeFactory().newXMLGregorianCalendar();
  defaults.setTimezone(getTimeZone().getRawOffset()/60000);
  GregorianCalendar cal;
  if(xmlGregorianCalender.getTimezone() == DatatypeConstants.FIELD_UNDEFINED){
    cal = xmlGregorianCalender.toGregorianCalendar(getTimeZone(), null, null);
  }else{
    cal = xmlGregorianCalender.toGregorianCalendar();
  }
  cal.setGregorianChange(new Date(Long.MAX_VALUE));
  Date returnDate= cal.getTime();
  return returnDate;
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

xmlGregorianCalender = convertStringToXMLGregorianCalendar(sourceString);
} catch(Exception ex) {

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

xmlGregorianCalender = convertStringToXMLGregorianCalendar(sourceString);
} catch(Exception ex) {

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

public XMLGregorianCalendar convertStringToXMLGregorianCalendar(String sourceString, QName schemaTypeQName) {
  XMLGregorianCalendar xmlGregorianCalender = null; 
  try {
    xmlGregorianCalender = convertStringToXMLGregorianCalendar(sourceString);
  } catch (Exception ex) {
     if (XMLConstants.DATE_QNAME.equals(schemaTypeQName)) {

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

public XMLGregorianCalendar convertStringToXMLGregorianCalendar(String sourceString, QName schemaTypeQName) {
  XMLGregorianCalendar xmlGregorianCalender = null;
  try {
    xmlGregorianCalender = convertStringToXMLGregorianCalendar(sourceString);
  } catch (Exception ex) {
     if (Constants.DATE_QNAME.equals(schemaTypeQName)) {

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

public XMLGregorianCalendar convertStringToXMLGregorianCalendar(String sourceString, QName schemaTypeQName) {
  XMLGregorianCalendar xmlGregorianCalender = null;
  try {
    xmlGregorianCalender = convertStringToXMLGregorianCalendar(sourceString);
  } catch (Exception ex) {
     if (Constants.DATE_QNAME.equals(schemaTypeQName)) {

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.sdo

XMLGregorianCalendar xgc = getXMLConversionManager().convertStringToXMLGregorianCalendar(dateString);
Calendar cal;
if (xgc.getTimezone() == DatatypeConstants.FIELD_UNDEFINED) {

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

xmlGregorianCalender = convertStringToXMLGregorianCalendar(sourceString);
} catch(Exception ex) {

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

XMLGregorianCalendar xgc = getXMLConversionManager().convertStringToXMLGregorianCalendar(dateString);
Calendar cal;
if (xgc.getTimezone() == DatatypeConstants.FIELD_UNDEFINED) {

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com