Package commonj.sdo.helper

Examples of commonj.sdo.helper.TypeHelper.define()


        readOnlyListProperty.set("name", "readOnlyListVal");
        readOnlyListProperty.set("type", stringType);
        readOnlyListProperty.setBoolean("readOnly", true);
        readOnlyListProperty.setBoolean("many", true);

        types.define(testType);

        DataObject seqType = hc.getDataFactory().create("commonj.sdo", "Type");
        seqType.set("uri", TEST_URI);
        seqType.set("name", SEQ_TYPE_NAME);
        seqType.setBoolean("sequenced", true);
View Full Code Here


        DataObject uniqueNameProperty = seqType.createDataObject("property");
        uniqueNameProperty.set("name", "uniqueName");
        uniqueNameProperty.set("type", stringType);

        types.define(seqType);
    }
}
View Full Code Here

        customerType.set("uri", "http://example.com/simple");
        customerType.set("name", "Simple");
        DataObject BytesProperty = customerType.createDataObject("property");
        BytesProperty.set("name", "BytesVal");
        BytesProperty.set("type", BytesType);
        types.define(customerType);
       
        // Create two instances
        DataObject obj1 = DataFactory.INSTANCE.create("http://example.com/simple", "Simple");
        DataObject obj2 = DataFactory.INSTANCE.create("http://example.com/simple", "Simple");
View Full Code Here

        stringProperty.set("type", stringType);
       
          
        List types2Define = new ArrayList();
        types2Define.add(testType);
        List apiXSD = types.define(types2Define);
        Type apiXSDType = (Type) apiXSD.get(0);
       
        if(createDataObject)
            return dataFactory.create(apiXSDType);;
       
View Full Code Here

        containManyProperty.set("name", "ContainMany");
        containManyProperty.setBoolean("many", true);
        containManyProperty.setBoolean("containment", true);
        containManyProperty.set("type", testType);

        types.define(testType);
    }
}
View Full Code Here

        // now define the Address and Customer type so that addresses and customers can be made
        List types2define = new ArrayList();
        types2define.add(addressType);
        types2define.add(customerType);
        List typesDefined = types.define(types2define);

        // Create an empty data graph and add a root object, an instance of customerType
        //

        DataGraph dataGraph = SDOUtil.createDataGraph();
View Full Code Here

      customerType.set("uri", "http://example.com/simple");
      customerType.set("name", "Simple");
      DataObject multiProperty = customerType.createDataObject("property");
      multiProperty.set("name", "name");
      multiProperty.set("type", stringType);
      types.define(customerType);
      DataObject obj = hc.getDataFactory().create("http://example.com/simple",
      "Simple");
      obj.set("name", "John Smith");
     
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here

    XMLDocument xdoc = xmlHelper.load(bais);

    customerType = xdoc.getRootObject();
   
    // now define the Customer type so that customers can be made
    types.define(customerType);
   
    DataObject customer1 = factory.create("http://example.com/customer",
    "Customer");
   
    customer1.setInt("custNum", 1);
View Full Code Here

    lastNameProperty.set("name", "lastName");
    lastNameProperty.set("type", stringType);
    lastNameProperty.setBoolean(xmlElementProp, false);

    // now define the Customer type so that customers can be made
    types.define(customerType);
   
    DataObject customer1 = factory.create("http://example.com/customer",
    "Customer");

    customer1.setInt("custNum", 0);
View Full Code Here

    lastNameProperty.set("name", "lastName");
    lastNameProperty.set("type", stringType);
    lastNameProperty.setBoolean(xmlElementProp, false);

    // now define the Customer type so that customers can be made
    types.define(customerType);
   
    DataObject customer1 = factory.create("http://example.com/customer",
    "Customer");
   
    customer1.setInt("custNum", 1);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.