Code example for DatatypeFactory

Methods: newXMLGregorianCalendar

			Date source, DatatypeFactory factory) {
	    GregorianCalendar c = new GregorianCalendar();
		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