com.viaoa.util.OAIdXmlAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of oa-core Show documentation
Show all versions of oa-core Show documentation
Object Automation library
The newest version!
package com.viaoa.util;
import javax.xml.bind.annotation.adapters.XmlAdapter;
//qqqqqq does not work with JAXB when using "int" instead of Integer
public class OAIdXmlAdapter extends XmlAdapter {
@Override
public String marshal(Integer id) throws Exception {
if (id == null) return "0";
return ""+id.intValue();
}
@Override
public Integer unmarshal(String s) throws Exception {
if (s == null) return (int) 0;
return Integer.parseInt(s);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy