gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-19 09:24:40 28 4
gpt4 key购买 nike

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

XMLConversionManager.setTimeZoneQualified介绍

[英]Specify if Specify if when date objects are converted to Strings in the XML Schema time or dateTime format
[中]指定日期对象转换为XML模式时间或日期时间格式的字符串的时间

代码示例

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

/**
 * By setting this flag to true the marshalled date objects marshalled to
 * the XML schema types time and dateTime will be qualified by a time zone.
 * By default time information is not time zone qualified.
 */
public void setTimeZoneQualified(boolean timeZoneQualified) {
  getXmlConversionManager().setTimeZoneQualified(timeZoneQualified);
}

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

/**
 * By setting this flag to true the marshalled date objects marshalled to
 * the XML schema types time and dateTime will be qualified by a time zone.
 * By default time information is not time zone qualified.
 */
public void setTimeZoneQualified(boolean timeZoneQualified) {
  getXMLConversionManager().setTimeZoneQualified(timeZoneQualified);
}

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

/**
 * By setting this flag to true the marshalled date objects marshalled to
 * the XML schema types time and dateTime will be qualified by a time zone.
 * By default time information is not time zone qualified.
 */
public void setTimeZoneQualified(boolean timeZoneQualified) {
  getXMLConversionManager().setTimeZoneQualified(timeZoneQualified);
}

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

/**
 * By setting this flag to true the marshalled date objects marshalled to
 * the XML schema types time and dateTime will be qualified by a time zone.
 * By default time information is not time zone qualified.
 */
public void setTimeZoneQualified(boolean timeZoneQualified) {
  getXmlConversionManager().setTimeZoneQualified(timeZoneQualified);
}

代码示例来源: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 Date to a String representation of the Month type.
 * 
 * @param date the date
 * @return a Date to a String representation of the Month type.
 */
public String toMonth(Date date) {
  if (date == null) {
    return null;
  }
  
  // Temporarily turn off TZ qualification
  boolean wasTimezoneQualified = getXMLConversionManager().isTimeZoneQualified();
  getXMLConversionManager().setTimeZoneQualified(false);
  String s = getXMLConversionManager().stringFromDate(date, XMLConstants.G_MONTH_QNAME);
  getXMLConversionManager().setTimeZoneQualified(wasTimezoneQualified);
  return s;
}

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

public synchronized XMLContext getXmlContext() {  
  if (xmlContext == null) {
    xmlContext = new XMLContext(getTopLinkProject());
    XMLConversionManager xmlConversionManager = getXmlConversionManager();
    xmlConversionManager.setLoader(this.loader);
    xmlConversionManager.setTimeZone(TimeZone.getTimeZone("GMT"));
    xmlConversionManager.setTimeZoneQualified(true);
  }
  return xmlContext;
}

代码示例来源: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: org.eclipse.persistence/org.eclipse.persistence.sdo

public synchronized XMLContext getXmlContext() {
  if (xmlContext == null) {
    xmlContext = new XMLContext(getTopLinkProject());
    XMLConversionManager xmlConversionManager = getXmlConversionManager();
    xmlConversionManager.setLoader(this.loader);
    xmlConversionManager.setTimeZone(TimeZone.getTimeZone("GMT"));
    xmlConversionManager.setTimeZoneQualified(true);
  }
  return xmlContext;
}

代码示例来源: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: 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 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 Date to a String representation of the Month type.
 *
 * @param date the date
 * @return a Date to a String representation of the Month type.
 */
public String toMonth(Date date) {
  if (date == null) {
    return null;
  }
  // Temporarily turn off TZ qualification
  boolean wasTimezoneQualified = getXMLConversionManager().isTimeZoneQualified();
  getXMLConversionManager().setTimeZoneQualified(false);
  String s = getXMLConversionManager().stringFromDate(date, 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: 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 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;
}

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