Code example for DatatypeFactory

Methods: newXMLGregorianCalendar

0
			Date source, DatatypeFactory factory) {
		 
	    GregorianCalendar c = new GregorianCalendar();
		c.setTime(source);
		 
		return factory.newXMLGregorianCalendar(c);
		 
	} 
 
	private static XMLGregorianCalendar toXMLGregorianCalendar(
			Long source, DatatypeFactory factory) {
		return toXMLGregorianCalendar(new Date(source), factory);
	} 
 
	private static Long toLong(Date source) {
		return source.getTime();
	} 
 
	private static Long toLong(Calendar source) {
		return toLong(source.getTime());
Connect your IDE to all the code out there  Get Codota for Java