IBM WebSphere Application ServerTM
Release 8

com.ibm.websphere.sdo.mediator.jdbc.metadata
Interface Metadata


public interface Metadata

Metadata describes a set of database tables and how they map into an SDO DataGraph. Information from the Metadata is used to generate queries, determine the shape of a DataGraph, and construct a DataGraph.


Method Summary
 Relationship addRelationship(Key parentKey, Key childKey)
          Create and add a Relationship object with the given parentKey and childKey
 Table addTable(java.lang.String tableName)
          Create and add a Table object with the given tableName
 org.eclipse.emf.common.util.EList getOrderBys()
          Return the List of OrderBy objects contained in the Metadata
 Relationship getRelationship(java.lang.String name)
          Get the Relationship object with the specified name
 org.eclipse.emf.common.util.EList getRelationships()
          Returns the List of Relationship objects contained in the Metadata
 java.lang.String getRootObject()
          The Root Object attribute determines the type name associated with the root object in a DataGraph.
 Table getRootTable()
          Returns the root Table object
 Table getTable(java.lang.String tableName)
          Return the Table object with the given tableName
 Table getTableByPropertyName(java.lang.String propertyName)
          Return the Table object with the given propertyName
 org.eclipse.emf.common.util.EList getTables()
          Returns the List of Table objects contained in the Metadata
 int getUniqueKeyBufferSize()
          Return the value of the Unique Key Buffer Size attribute
 Table getUniqueKeyTable()
          Returns the Table used for generating unique keys.
 void save(java.io.OutputStream stream)
          Saves the current Metadata in XMI format to the given OutputStream
 void save(java.lang.String fileName)
          Saves the current Metadata in XMI format to the given file name
 void saveToEcore(java.io.OutputStream stream, java.lang.String prefix, java.lang.String packageName)
          Convert the current Metadata to an Ecore model and then save it to the given OutputStream
 void saveToEcore(java.lang.String fileName, java.lang.String prefix, java.lang.String packageName)
          Convert the current Metadata to an Ecore model and then save it to the given file name
 void setRootObject(java.lang.String value)
          Sets the value of the 'Root Object' attribute
 void setRootTable(Table value)
          Sets the value of the 'Root Table' reference
 void setUniqueKeyBufferSize(int value)
          Sets the value of the 'Unique Key Buffer Size' attribute
 void setUniqueKeyTable(java.lang.String tableName)
          Sets the value of the 'Unique Key Table' containment reference
 void setUniqueKeyTable(Table value)
          Sets the value of the 'Unique Key Table' containment reference
 void setUseForeignKeyFields(boolean useForeignKeyFields)
          Set the value of the useForeignKeyFields property.
 boolean useForeignKeyFields()
          When true, the mediator will only traverse relationships to populate foreign key fields when the relationship has been changed.
 

Method Detail

getRootObject

java.lang.String getRootObject()
The Root Object attribute determines the type name associated with the root object in a DataGraph. By default, this is DataGraphRoot.

Returns:
the name of the root object

setRootObject

void setRootObject(java.lang.String value)
Sets the value of the 'Root Object' attribute.

Parameters:
value - the new value of the 'Root Object' attribute.
See Also:
getRootObject()

getUniqueKeyTable

Table getUniqueKeyTable()
Returns the Table used for generating unique keys.

Returns:
the table used for generating unique keys

setUniqueKeyTable

void setUniqueKeyTable(Table value)
Sets the value of the 'Unique Key Table' containment reference.

Parameters:
value - the new value of the 'Unique Key Table' containment reference.
See Also:
getUniqueKeyTable()

setUniqueKeyTable

void setUniqueKeyTable(java.lang.String tableName)
Sets the value of the 'Unique Key Table' containment reference.

Parameters:
value - the new value of the 'Unique Key Table' containment reference.
See Also:
getUniqueKeyTable()

getRootTable

Table getRootTable()
Returns the root Table object

Returns:
the root table

setRootTable

void setRootTable(Table value)
Sets the value of the 'Root Table' reference.

Parameters:
value - the new value of the 'Root Table' reference.
See Also:
getRootTable()

getTables

org.eclipse.emf.common.util.EList getTables()
Returns the List of Table objects contained in the Metadata

Returns:
the list of tables

getRelationships

org.eclipse.emf.common.util.EList getRelationships()
Returns the List of Relationship objects contained in the Metadata

Returns:
the list of relationships

getRelationship

Relationship getRelationship(java.lang.String name)
Get the Relationship object with the specified name

Parameters:
name -
Returns:
a Relationship

addTable

Table addTable(java.lang.String tableName)
Create and add a Table object with the given tableName

Parameters:
tableName -
Returns:
the new table

getTable

Table getTable(java.lang.String tableName)
Return the Table object with the given tableName

Parameters:
tableName -
Returns:
the table

addRelationship

Relationship addRelationship(Key parentKey,
                             Key childKey)
Create and add a Relationship object with the given parentKey and childKey

Parameters:
parentKey - the relationship's parent key
childKey - the relationship's child key
Returns:
the new relationship

getOrderBys

org.eclipse.emf.common.util.EList getOrderBys()
Return the List of OrderBy objects contained in the Metadata

Returns:
the list of OrderBy objects

getUniqueKeyBufferSize

int getUniqueKeyBufferSize()
Return the value of the Unique Key Buffer Size attribute

Returns:
the unique key buffer size

setUniqueKeyBufferSize

void setUniqueKeyBufferSize(int value)
Sets the value of the 'Unique Key Buffer Size' attribute.

Parameters:
value - the new value of the 'Unique Key Buffer Size' attribute.
See Also:
getUniqueKeyBufferSize()

getTableByPropertyName

Table getTableByPropertyName(java.lang.String propertyName)
Return the Table object with the given propertyName

Parameters:
name -
Returns:
the table

save

void save(java.lang.String fileName)
          throws java.io.IOException
Saves the current Metadata in XMI format to the given file name

Parameters:
fileName - the name of the file
Throws:
java.io.IOException

save

void save(java.io.OutputStream stream)
          throws java.io.IOException
Saves the current Metadata in XMI format to the given OutputStream

Parameters:
stream - the output stream to which the metadata will be saved
Throws:
java.io.IOException

saveToEcore

void saveToEcore(java.lang.String fileName,
                 java.lang.String prefix,
                 java.lang.String packageName)
                 throws InvalidMetadataException,
                        java.io.IOException
Convert the current Metadata to an Ecore model and then save it to the given file name

Parameters:
fileName - the name of the file
prefix - the prefix for the Factory and Package objects
packageName - the package name
Throws:
java.io.IOException
InvalidMetadataException

saveToEcore

void saveToEcore(java.io.OutputStream stream,
                 java.lang.String prefix,
                 java.lang.String packageName)
                 throws InvalidMetadataException,
                        java.io.IOException
Convert the current Metadata to an Ecore model and then save it to the given OutputStream

Parameters:
stream - the output stream
prefix - the prefix for the Factory and Package objects
packageName - the package name
Throws:
InvalidMetadataException
java.io.IOException

useForeignKeyFields

boolean useForeignKeyFields()
When true, the mediator will only traverse relationships to populate foreign key fields when the relationship has been changed. By default, this value is set to false and the mediator will always traverse relationships for foreign key values.

Returns:
the value of the useForeignKeyFields property

setUseForeignKeyFields

void setUseForeignKeyFields(boolean useForeignKeyFields)
Set the value of the useForeignKeyFields property.


IBM WebSphere Application ServerTM
Release 8