--- /dev/null
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package com.axyus.generator.pespj.utils;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+public class DateAdapter extends XmlAdapter<String, Date> {
+
+ private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+
+ @Override
+ public String marshal(Date v) throws Exception {
+ return dateFormat.format(v);
+ }
+
+ @Override
+ public Date unmarshal(String v) throws Exception {
+ return dateFormat.parse(v);
+ }
+
+}