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

Interface Metadata


  1. 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

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

Method Detail

getRootObject

  1. 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

  1. 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:

getUniqueKeyTable

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

setUniqueKeyTable

  1. 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:

setUniqueKeyTable

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

getRootTable

  1. Table getRootTable()
Returns the root Table object
Returns:
the root table

setRootTable

  1. void setRootTable(Table value)
Sets the value of the ' Root Table' reference.
Parameters:
value - the new value of the 'Root Table' reference.
See Also:

getTables

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

getRelationships

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

getRelationship

  1. Relationship getRelationship(java.lang.String name)
Get the Relationship object with the specified name
Parameters:
name -
Returns:
a Relationship

addTable

  1. Table addTable(java.lang.String tableName)
Create and add a Table object with the given tableName
Parameters:
tableName -
Returns:
the new table

getTable

  1. Table getTable(java.lang.String tableName)
Return the Table object with the given tableName
Parameters:
tableName -
Returns:
the table

addRelationship

  1. Relationship addRelationship(Key parentKey,
  2. 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

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

getUniqueKeyBufferSize

  1. int getUniqueKeyBufferSize()
Return the value of the Unique Key Buffer Size attribute
Returns:
the unique key buffer size

setUniqueKeyBufferSize

  1. 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:

getTableByPropertyName

  1. Table getTableByPropertyName(java.lang.String propertyName)
Return the Table object with the given propertyName
Returns:
the table

save

  1. void save(java.lang.String fileName)
  2. 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

  1. void save(java.io.OutputStream stream)
  2. 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

  1. void saveToEcore(java.lang.String fileName,
  2. java.lang.String prefix,
  3. java.lang.String packageName)
  4. throws InvalidMetadataException
  5. 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

saveToEcore

  1. void saveToEcore(java.io.OutputStream stream,
  2. java.lang.String prefix,
  3. java.lang.String packageName)
  4. throws InvalidMetadataException
  5. 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:
java.io.IOException

useForeignKeyFields

  1. 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

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