Code example for DatatypeFactory

Methods: newXMLGregorianCalendar

0
    } 
     
    public LastModifiedDate toLastModifiedDate() { 
        GregorianCalendar cal = toCalendar();
        LastModifiedDate lastModifiedDate = new LastModifiedDate();
        lastModifiedDate.setValue(datatypeFactory.newXMLGregorianCalendar(cal));
        return lastModifiedDate;
    } 
     
    public CreatedDate toCreatedDate() { 
        GregorianCalendar cal = toCalendar();
        CreatedDate createdDate = new CreatedDate();
        createdDate.setValue(datatypeFactory.newXMLGregorianCalendar(cal));
        return createdDate;
    } 
   
    public List<String> getErrors() {
        return errors;
    }