OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

sdo message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [sdo] Section 3.9.2 of the CD2 Java spec


I’ve logged this as http://www.osoa.org/jira/browse/SDO-169

 

From: Frank Budinsky [mailto:frankb@ca.ibm.com]
Sent: Montag, 22. März 2010 20:53
To: sdo@lists.oasis-open.org
Subject: [sdo] Section 3.9.2 of the CD2 Java spec

 

There's an example of using JavaHelper on lines 479-483, but it's all messed up. It's calling the deprecated TypeHelper.define(Class) method and then calling a nonexistent create(Type) method on the JavaHelper. I'm not sure what happened there :-)

Anyway, since the spec says that JavaHelper.create(Class) calls define(Class), the example could just call it:

Customer c = SDO.getDefaultHelperContext().getJavaHelper().create(Customer.class);
((DataObject)c).set(“lastName”,”Smith”);
System.out.println(c.getLastName());


Either that, or we could also show how to do it using DataFactory.create():

Type t = SDO.getDefaultHelperContext().getJavaHelper().define(Customer.class);
DataObject o = SDO.getDefaultHelperContext().getDataFactory().create(t);
o.set(“lastName”,”Smith”);
System.out.println(((Customer)o).getLastName());


Maybe we want them both.

Frank.



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]