Jump to: navigation, search

Difference between revisions of "EclipseLink/Examples/SDO/BasicAPI"

Line 2: Line 2:
  
 
==TypeHelper - Access Metadata==
 
==TypeHelper - Access Metadata==
 +
TypeHelper provides a convenient means of handling SDO metadata.
 +
<source lang="java">
 +
TypeHelper typeHelper = helperContext.getTypeHelper();
 +
</source>
  
 
==XSDHelper - Access XML Schema Metadata==
 
==XSDHelper - Access XML Schema Metadata==
 +
XSDHelper provides a convenient means of handling XML Schema metadata.
 +
<source lang="java">
 +
XSDHelper xsdHelper = helperContext.getXSDHelper();
 +
</source>
  
 
==DataFactory - Create DataObjects==
 
==DataFactory - Create DataObjects==
 +
DataFactory provides a convenient means of creating SDO DataObjects.
 +
<source lang="java">
 +
DataFactory dataFactory = helperContext.getDataFactory();
 +
</source>
  
 
==DataHelper - Convert Simple Values==
 
==DataHelper - Convert Simple Values==
 +
DataHelper provides a convenient means of converting SDO data type values.
 +
<source lang="java">
 +
DataHelper dataHelper = helperContext.getDataHelper();
 +
</source>
  
 
==XMLHelper - Handle XML Data as DataObjects==
 
==XMLHelper - Handle XML Data as DataObjects==
 +
XMLHelper provides a convenient means of handling XML data as DataObjects.
 +
<source lang="java">
 +
XMLHelper xmlHelper = helperContext.getXMLHelper();
 +
</source>
  
 
==CopyHelper - Create Copies of DataObjects==
 
==CopyHelper - Create Copies of DataObjects==
 
CopyHelper provides a convenient means of copying DataObjects.
 
CopyHelper provides a convenient means of copying DataObjects.
 
<source lang="java">
 
<source lang="java">
CopyHelper copyHelper = helperContext.getCopyyHelper();
+
CopyHelper copyHelper = helperContext.getCopyHelper();
 
</source>
 
</source>
  

Revision as of 14:51, 25 February 2009

HelperContext

TypeHelper - Access Metadata

TypeHelper provides a convenient means of handling SDO metadata.

TypeHelper typeHelper = helperContext.getTypeHelper();

XSDHelper - Access XML Schema Metadata

XSDHelper provides a convenient means of handling XML Schema metadata.

XSDHelper xsdHelper = helperContext.getXSDHelper();

DataFactory - Create DataObjects

DataFactory provides a convenient means of creating SDO DataObjects.

DataFactory dataFactory = helperContext.getDataFactory();

DataHelper - Convert Simple Values

DataHelper provides a convenient means of converting SDO data type values.

DataHelper dataHelper = helperContext.getDataHelper();

XMLHelper - Handle XML Data as DataObjects

XMLHelper provides a convenient means of handling XML data as DataObjects.

XMLHelper xmlHelper = helperContext.getXMLHelper();

CopyHelper - Create Copies of DataObjects

CopyHelper provides a convenient means of copying DataObjects.

CopyHelper copyHelper = helperContext.getCopyHelper();

Shallow Copy

Create a new DataObject containing the values of all dataType=true properties (excluding the ChangeSummary property).

DataObject shallowCopy = copyHelper.copyShallow(dataObject);

Deep Copy

Create a copy of the entire tree.

DataObject deepCopy = copyHelper.copy(dataObject);

EqualityHelper - Compare DataObjects

EqualityHelper provides a convenient means of comparing DataObjects.

EqualityHelper equalityHelper = helperContext.getEqualityHelper();

Shallow Equal

Two DataObjects are considered shallow equal if the data objects are of the same type and all the values of all dataType=true properties (excluding the ChangeSummary property) are equal.

boolean isShallowEqual = equalityHelper.equalShallow(dataObject1, dataObject2);

Deep Equal

Two DataObjects are considered deep equal if the data objects and the trees that they belong to are both equal.

boolean isDeepEqual = equalityHelper.equal(dataObject1, dataObject2);