org.apache.tuscany.sdo.api
Interface SDOHelper.MetaDataBuilder

All Known Implementing Classes:
SDOHelperBase, SDOHelperImpl
Enclosing interface:
SDOHelper

public static interface SDOHelper.MetaDataBuilder

This interface provides methods which can be used to programatically create SDO Types and Properties. It provides a lower level and more efficient API then the DataObject-based one of TypeHelper.define().


Method Summary
 void addAliasName(Property property, String aliasName)
          Add an aliasName to the specified property.
 void addAliasName(Type type, String aliasName)
          Add an aliasName to the specified type.
 void addBaseType(Type type, Type baseType)
          Add a baseType to the specified type.
 void addPropertyInstanceProperty(Property definedProperty, Property instanceProperty, Object value)
          Add anf instance property to the specified property.
 void addTypeInstanceProperty(Type definedType, Property instanceProperty, Object value)
          Add an instance property to the specified type.
 Property createOpenContentProperty(HelperContext hc, String uri, String name, Type type)
          Create a new open content property in the specified TypeHelper scope.
 Property createProperty(Type containingType, String name, Type propertyType)
          Create a new property in the specified containingType.
 Type createType(HelperContext hc, String uri, String name, boolean isDataType)
          Create a Type in the specified TypeHelper scope.
 void setAbstract(Type type, boolean isAbstract)
          Set the isAbstract value of the specified type.
 void setContainment(Property property, boolean isContainment)
          Set the isContainment value of the specified property.
 void setDefault(Property property, String defaultValue)
          Set the default value of the specified property.
 void setJavaClassName(Type type, String javaClassName)
          Set the isAbstract value of the specified type.
 void setMany(Property property, boolean isMany)
          Set the isMany value of the specified property.
 void setOpen(Type type, boolean isOpen)
          Set the isOpen value of the specified type.
 void setOpposite(Property property, Property opposite)
          Set the opposite value of the specified property.
 void setPropertyXMLKind(Property property, boolean isXmlElement)
          Set a SDO property to become an XSD element or attribute
 void setReadOnly(Property property, boolean isReadOnly)
          Set the isReadOnly value of the specified property.
 void setSequenced(Type type, boolean isSequenced)
          Set the isSequenced value of the specified type.
 

Method Detail

createType

Type createType(HelperContext hc,
                String uri,
                String name,
                boolean isDataType)
Create a Type in the specified TypeHelper scope.

Returns:
the new Type.

addBaseType

void addBaseType(Type type,
                 Type baseType)
Add a baseType to the specified type.


addAliasName

void addAliasName(Type type,
                  String aliasName)
Add an aliasName to the specified type.


setOpen

void setOpen(Type type,
             boolean isOpen)
Set the isOpen value of the specified type.


setSequenced

void setSequenced(Type type,
                  boolean isSequenced)
Set the isSequenced value of the specified type.


setAbstract

void setAbstract(Type type,
                 boolean isAbstract)
Set the isAbstract value of the specified type.


setJavaClassName

void setJavaClassName(Type type,
                      String javaClassName)
Set the isAbstract value of the specified type.


createProperty

Property createProperty(Type containingType,
                        String name,
                        Type propertyType)
Create a new property in the specified containingType.


setPropertyXMLKind

void setPropertyXMLKind(Property property,
                        boolean isXmlElement)
Set a SDO property to become an XSD element or attribute


createOpenContentProperty

Property createOpenContentProperty(HelperContext hc,
                                   String uri,
                                   String name,
                                   Type type)
Create a new open content property in the specified TypeHelper scope.


addAliasName

void addAliasName(Property property,
                  String aliasName)
Add an aliasName to the specified property.


setMany

void setMany(Property property,
             boolean isMany)
Set the isMany value of the specified property.


setContainment

void setContainment(Property property,
                    boolean isContainment)
Set the isContainment value of the specified property.


setDefault

void setDefault(Property property,
                String defaultValue)
Set the default value of the specified property.


setReadOnly

void setReadOnly(Property property,
                 boolean isReadOnly)
Set the isReadOnly value of the specified property.


setOpposite

void setOpposite(Property property,
                 Property opposite)
Set the opposite value of the specified property.


addTypeInstanceProperty

void addTypeInstanceProperty(Type definedType,
                             Property instanceProperty,
                             Object value)
Add an instance property to the specified type.


addPropertyInstanceProperty

void addPropertyInstanceProperty(Property definedProperty,
                                 Property instanceProperty,
                                 Object value)
Add anf instance property to the specified property.



Copyright © 2013 The Apache Software Foundation. All Rights Reserved.