Class JAXBDataFactory

  • All Implemented Interfaces:
    commonj.sdo.helper.DataFactory, SDODataFactory

    public class JAXBDataFactory
    extends SDODataFactoryDelegate
    This implementation of commonj.sdo.helper.DataFactory is responsible for ensuring that newly created DataObjects are assigned a JAXB aware value store.
     Type customerType = jaxbHelperContext.getType(Customer.class);
     DataObject customerDO = jaxbHelperContext.getDataFactory().create(customerType);
     customerDO.set("first-name", "Jane");
     
     Customer customer = jaxbHelperContext.unwrap(customerDO);
     customer.getFirstName();  // returns "Jane" 
     
    • Field Summary

      • Fields inherited from interface commonj.sdo.helper.DataFactory

        INSTANCE
    • Constructor Summary

      Constructors 
      Constructor Description
      JAXBDataFactory​(commonj.sdo.helper.HelperContext helperContext)  
    • Constructor Detail

      • JAXBDataFactory

        public JAXBDataFactory​(commonj.sdo.helper.HelperContext helperContext)
    • Method Detail

      • create

        public commonj.sdo.DataObject create​(commonj.sdo.Type type)
        Return a new DataObject of the specified Type. If a corresponding class (based on XML schema information) exists in the JAXBContext, then the returned DataObject will wrap an instance of that class.
        Specified by:
        create in interface commonj.sdo.helper.DataFactory
        Overrides:
        create in class SDODataFactoryDelegate