gpt4 book ai didi

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

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

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

XMLConversionManager.stringFromCalendar介绍

暂无

代码示例

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

private String stringFromXMLGregorianCalendar(XMLGregorianCalendar cal, QName schemaTypeQName) {
  return stringFromCalendar(cal.toGregorianCalendar(), schemaTypeQName);
}

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

private String stringFromCalendar(Calendar sourceCalendar) {
  if (!(sourceCalendar.isSet(Calendar.HOUR) || sourceCalendar.isSet(Calendar.MINUTE) || sourceCalendar.isSet(Calendar.SECOND) || sourceCalendar.isSet(Calendar.MILLISECOND))) {
    return stringFromCalendar(sourceCalendar, Constants.DATE_QNAME);
  } else if (!(sourceCalendar.isSet(Calendar.YEAR) || sourceCalendar.isSet(Calendar.MONTH) || sourceCalendar.isSet(Calendar.DATE))) {
    return stringFromCalendar(sourceCalendar, Constants.TIME_QNAME);
  } else {
    return stringFromCalendar(sourceCalendar, Constants.DATE_TIME_QNAME);
  }
}

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

private String stringFromCalendar(Calendar sourceCalendar) {
  if (!(sourceCalendar.isSet(Calendar.HOUR) || sourceCalendar.isSet(Calendar.MINUTE) || sourceCalendar.isSet(Calendar.SECOND) || sourceCalendar.isSet(Calendar.MILLISECOND))) {
    return stringFromCalendar(sourceCalendar, Constants.DATE_QNAME);
  } else if (!(sourceCalendar.isSet(Calendar.YEAR) || sourceCalendar.isSet(Calendar.MONTH) || sourceCalendar.isSet(Calendar.DATE))) {
    return stringFromCalendar(sourceCalendar, Constants.TIME_QNAME);
  } else {
    return stringFromCalendar(sourceCalendar, Constants.DATE_TIME_QNAME);
  }
}

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

private String stringFromXMLGregorianCalendar(XMLGregorianCalendar cal, QName schemaTypeQName) {
  if(schemaTypeQName !=null && schemaTypeQName.equals(cal.getXMLSchemaType()) && schemaTypeQName != Constants.G_MONTH_QNAME){
   return cal.toXMLFormat();
  }
  GregorianCalendar gCal = cal.toGregorianCalendar();
  if(cal.getTimezone() == DatatypeConstants.FIELD_UNDEFINED) {
    gCal.clear(Calendar.ZONE_OFFSET);
  }        
  return  stringFromCalendar(gCal, schemaTypeQName);
}

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

private String stringFromXMLGregorianCalendar(XMLGregorianCalendar cal, QName schemaTypeQName) {
  if(schemaTypeQName !=null && schemaTypeQName.equals(cal.getXMLSchemaType()) && schemaTypeQName != Constants.G_MONTH_QNAME){
   return cal.toXMLFormat();
  }
  GregorianCalendar gCal = cal.toGregorianCalendar();
  if(cal.getTimezone() == DatatypeConstants.FIELD_UNDEFINED) {
    gCal.clear(Calendar.ZONE_OFFSET);
  }
  return  stringFromCalendar(gCal, schemaTypeQName);
}

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

private String stringFromCalendar(Calendar sourceCalendar) {
  if (!(sourceCalendar.isSet(Calendar.HOUR) || sourceCalendar.isSet(Calendar.MINUTE) || sourceCalendar.isSet(Calendar.SECOND) || sourceCalendar.isSet(Calendar.MILLISECOND))) {
    return stringFromCalendar(sourceCalendar, XMLConstants.DATE_QNAME);
  } else if (!(sourceCalendar.isSet(Calendar.YEAR) || sourceCalendar.isSet(Calendar.MONTH) || sourceCalendar.isSet(Calendar.DATE))) {
    return stringFromCalendar(sourceCalendar, XMLConstants.TIME_QNAME);
  } else {
    return stringFromDate(sourceCalendar.getTime());
  }
}

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

/**
 * Convert from a Calendar to a String representation of the DateTime type.
 * 
 * @param calendar the calendar to convert
 * @return a Calendar to a String representation of the DateTime type.
 */
public String toDateTime(Calendar calendar) {
  if (calendar == null) {
    return null;
  }
  // Temporarily turn off TZ qualification
  boolean wasTimezoneQualified = getXMLConversionManager().isTimeZoneQualified();
  getXMLConversionManager().setTimeZoneQualified(false);
  String s = getXMLConversionManager().stringFromCalendar(calendar, XMLConstants.DATE_TIME_QNAME);
  getXMLConversionManager().setTimeZoneQualified(wasTimezoneQualified);
  return s;
}

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

/**
 * Convert from a Calendar to a String representation of the Year type.
 * 
 * @param calendar the calendar to convert
 * @return a Calendar to a String representation of the Year type.
 */
public String toYear(Calendar calendar) {
  if (calendar == null) {
    return null;
  }
  // Temporarily turn off TZ qualification
  boolean wasTimezoneQualified = getXMLConversionManager().isTimeZoneQualified();
  getXMLConversionManager().setTimeZoneQualified(false);
  String s = getXMLConversionManager().stringFromCalendar(calendar, XMLConstants.G_YEAR_QNAME);
  getXMLConversionManager().setTimeZoneQualified(wasTimezoneQualified);
  return s;
}

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

/**
 * Convert from a Calendar to a String representation of the YearMonth type.
 *
 * @param calendar the calendar to convert
 * @return a Calendar to a String representation of the YearMonth type.
 */
public String toYearMonth(Calendar calendar) {
  if (calendar == null) {
    return null;
  }
  // Temporarily turn off TZ qualification
  boolean wasTimezoneQualified = getXMLConversionManager().isTimeZoneQualified();
  getXMLConversionManager().setTimeZoneQualified(false);
  String s = getXMLConversionManager().stringFromCalendar(calendar, XMLConstants.G_YEAR_MONTH_QNAME);
  getXMLConversionManager().setTimeZoneQualified(wasTimezoneQualified);
  return s;
}

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

/**
 * Convert from a Calendar to a String representation of the YearMonthDay
 * type.
 * 
 * @param calendar the calendar to convert
 * @return a Calendar to a String representation of the YearMonthDay type.
 */
public String toYearMonthDay(Calendar calendar) {
  if (calendar == null) {
    return null;
  }
  // Temporarily turn off TZ qualification
  boolean wasTimezoneQualified = getXMLConversionManager().isTimeZoneQualified();
  getXMLConversionManager().setTimeZoneQualified(false);
  String s = getXMLConversionManager().stringFromCalendar(calendar, XMLConstants.DATE_QNAME);
  getXMLConversionManager().setTimeZoneQualified(wasTimezoneQualified);
  return s;
}

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

/**
 * Convert from a Calendar to a String representation of the Time type.
 * 
 * @param calendar the calendar to convert
 * @return a Calendar to a String representation of the Time type.
 */
public String toTime(Calendar calendar) {
  if (calendar == null) {
    return null;
  }
  // Temporarily turn off TZ qualification
  boolean wasTimezoneQualified = getXMLConversionManager().isTimeZoneQualified();
  getXMLConversionManager().setTimeZoneQualified(false);
  String s = getXMLConversionManager().stringFromCalendar(calendar, XMLConstants.TIME_QNAME);
  getXMLConversionManager().setTimeZoneQualified(wasTimezoneQualified);
  return s;
}

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

/**
 * Convert from a Calendar to a String representation of the DateTime type.
 *
 * @param calendar the calendar to convert
 * @return a Calendar to a String representation of the DateTime type.
 */
public String toDateTime(Calendar calendar) {
  if (calendar == null) {
    return null;
  }
  // Temporarily turn off TZ qualification
  boolean wasTimezoneQualified = getXMLConversionManager().isTimeZoneQualified();
  getXMLConversionManager().setTimeZoneQualified(false);
  String s = getXMLConversionManager().stringFromCalendar(calendar, XMLConstants.DATE_TIME_QNAME);
  getXMLConversionManager().setTimeZoneQualified(wasTimezoneQualified);
  return s;
}

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

/**
 * Convert from a Calendar to a String representation of the Year type.
 *
 * @param calendar the calendar to convert
 * @return a Calendar to a String representation of the Year type.
 */
public String toYear(Calendar calendar) {
  if (calendar == null) {
    return null;
  }
  // Temporarily turn off TZ qualification
  boolean wasTimezoneQualified = getXMLConversionManager().isTimeZoneQualified();
  getXMLConversionManager().setTimeZoneQualified(false);
  String s = getXMLConversionManager().stringFromCalendar(calendar, XMLConstants.G_YEAR_QNAME);
  getXMLConversionManager().setTimeZoneQualified(wasTimezoneQualified);
  return s;
}

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

/**
 * Convert from a Calendar to a String representation of the YearMonth type.
 * 
 * @param calendar the calendar to convert
 * @return a Calendar to a String representation of the YearMonth type.
 */
public String toYearMonth(Calendar calendar) {
  if (calendar == null) {
    return null;
  }
  // Temporarily turn off TZ qualification
  boolean wasTimezoneQualified = getXMLConversionManager().isTimeZoneQualified();
  getXMLConversionManager().setTimeZoneQualified(false);
  String s = getXMLConversionManager().stringFromCalendar(calendar, XMLConstants.G_YEAR_MONTH_QNAME);
  getXMLConversionManager().setTimeZoneQualified(wasTimezoneQualified);
  return s;
}

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

/**
 * Convert from a Calendar to a String representation of the Month type.
 *
 * @param calendar the calendar to convert
 * @return a Calendar to a String representation of the Month type.
 */
public String toMonth(Calendar calendar) {
  if (calendar == null) {
    return null;
  }
  // Temporarily turn off TZ qualification
  boolean wasTimezoneQualified = getXMLConversionManager().isTimeZoneQualified();
  getXMLConversionManager().setTimeZoneQualified(false);
  String s = getXMLConversionManager().stringFromCalendar(calendar, XMLConstants.G_MONTH_QNAME);
  getXMLConversionManager().setTimeZoneQualified(wasTimezoneQualified);
  return s;
}

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

/**
 * Convert from a Calendar to a String representation of the Time type.
 *
 * @param calendar the calendar to convert
 * @return a Calendar to a String representation of the Time type.
 */
public String toTime(Calendar calendar) {
  if (calendar == null) {
    return null;
  }
  // Temporarily turn off TZ qualification
  boolean wasTimezoneQualified = getXMLConversionManager().isTimeZoneQualified();
  getXMLConversionManager().setTimeZoneQualified(false);
  String s = getXMLConversionManager().stringFromCalendar(calendar, XMLConstants.TIME_QNAME);
  getXMLConversionManager().setTimeZoneQualified(wasTimezoneQualified);
  return s;
}

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

/**
 * Convert from a Calendar to a String representation of the Day type.
 * 
 * @param calendar the calendar to convert
 * @return a Calendar to a String representation of the Day type.
 */
public String toDay(Calendar calendar) {
  if (calendar == null) {
    return null;
  }
  // Temporarily turn off TZ qualification
  boolean wasTimezoneQualified = getXMLConversionManager().isTimeZoneQualified();
  getXMLConversionManager().setTimeZoneQualified(false);
  String s = getXMLConversionManager().stringFromCalendar(calendar, XMLConstants.G_DAY_QNAME);
  getXMLConversionManager().setTimeZoneQualified(wasTimezoneQualified);
  return s;
}

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

/**
 * Convert from a Calendar to a String representation of the Month type.
 * 
 * @param calendar the calendar to convert
 * @return a Calendar to a String representation of the Month type.
 */
public String toMonth(Calendar calendar) {
  if (calendar == null) {
    return null;
  }
  // Temporarily turn off TZ qualification
  boolean wasTimezoneQualified = getXMLConversionManager().isTimeZoneQualified();
  getXMLConversionManager().setTimeZoneQualified(false);
  String s = getXMLConversionManager().stringFromCalendar(calendar, XMLConstants.G_MONTH_QNAME);
  getXMLConversionManager().setTimeZoneQualified(wasTimezoneQualified);
  return s;
}

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

/**
 * Convert from a Calendar to a String representation of the Day type.
 *
 * @param calendar the calendar to convert
 * @return a Calendar to a String representation of the Day type.
 */
public String toDay(Calendar calendar) {
  if (calendar == null) {
    return null;
  }
  // Temporarily turn off TZ qualification
  boolean wasTimezoneQualified = getXMLConversionManager().isTimeZoneQualified();
  getXMLConversionManager().setTimeZoneQualified(false);
  String s = getXMLConversionManager().stringFromCalendar(calendar, XMLConstants.G_DAY_QNAME);
  getXMLConversionManager().setTimeZoneQualified(wasTimezoneQualified);
  return s;
}

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

/**
 * Convert from a Calendar to a String representation of the YearMonthDay
 * type.
 *
 * @param calendar the calendar to convert
 * @return a Calendar to a String representation of the YearMonthDay type.
 */
public String toYearMonthDay(Calendar calendar) {
  if (calendar == null) {
    return null;
  }
  // Temporarily turn off TZ qualification
  boolean wasTimezoneQualified = getXMLConversionManager().isTimeZoneQualified();
  getXMLConversionManager().setTimeZoneQualified(false);
  String s = getXMLConversionManager().stringFromCalendar(calendar, XMLConstants.DATE_QNAME);
  getXMLConversionManager().setTimeZoneQualified(wasTimezoneQualified);
  return s;
}

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