|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.teiid.connector.metadata.runtime.MetadataFactory
public class MetadataFactory
| Constructor Summary | |
|---|---|
MetadataFactory(java.lang.String modelName,
java.util.Map<java.lang.String,DatatypeRecordImpl> dataTypes,
java.util.Properties importProperties)
|
|
| Method Summary | |
|---|---|
AnnotationRecordImpl |
addAnnotation(java.lang.String annotation,
AbstractMetadataRecord record)
Add an annotation of description to a record. |
ColumnRecordImpl |
addColumn(java.lang.String name,
java.lang.String type,
ColumnSetRecordImpl table)
Adds a column to the table with the given name and type. |
PropertyRecordImpl |
addExtensionProperty(java.lang.String name,
java.lang.String value,
AbstractMetadataRecord record)
Adds an extension property to the given record. |
ForeignKeyRecordImpl |
addForiegnKey(java.lang.String name,
java.util.List<java.lang.String> columnNames,
TableRecordImpl pkTable,
TableRecordImpl table)
Adds a foreign key to the given table. |
ColumnSetRecordImpl |
addIndex(java.lang.String name,
boolean nonUnique,
java.util.List<java.lang.String> columnNames,
TableRecordImpl table)
Adds an index or unique key constraint to the given table. |
ColumnSetRecordImpl |
addPrimaryKey(java.lang.String name,
java.util.List<java.lang.String> columnNames,
TableRecordImpl table)
Adds a primary key to the given table. |
ProcedureRecordImpl |
addProcedure(java.lang.String name)
Add a procedure with the given name to the model. |
ProcedureParameterRecordImpl |
addProcedureParameter(java.lang.String name,
java.lang.String type,
short parameterType,
ProcedureRecordImpl procedure)
|
ColumnRecordImpl |
addProcedureResultSetColumn(java.lang.String name,
java.lang.String type,
ProcedureRecordImpl procedure)
|
TableRecordImpl |
addTable(java.lang.String name)
Add a table with the given name to the model. |
java.util.Collection<AnnotationRecordImpl> |
getAnnotations()
Get the annotations defined for this model |
java.util.Properties |
getImportProperties()
|
ModelRecordImpl |
getModel()
Get the model that this metadata represents. |
java.util.Collection<ProcedureRecordImpl> |
getProcedures()
Get the procedures defined for this model |
java.util.Collection<PropertyRecordImpl> |
getProperties()
Get the extension properties defined for this model |
java.util.Collection<TableRecordImpl> |
getTables()
Get the tables defined for this model |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MetadataFactory(java.lang.String modelName,
java.util.Map<java.lang.String,DatatypeRecordImpl> dataTypes,
java.util.Properties importProperties)
| Method Detail |
|---|
public java.util.Properties getImportProperties()
public ModelRecordImpl getModel()
ConnectorMetadata
getModel in interface ConnectorMetadatapublic java.util.Collection<TableRecordImpl> getTables()
ConnectorMetadata
getTables in interface ConnectorMetadatapublic java.util.Collection<ProcedureRecordImpl> getProcedures()
ConnectorMetadata
getProcedures in interface ConnectorMetadatapublic java.util.Collection<AnnotationRecordImpl> getAnnotations()
ConnectorMetadata
getAnnotations in interface ConnectorMetadatapublic java.util.Collection<PropertyRecordImpl> getProperties()
ConnectorMetadata
getProperties in interface ConnectorMetadata
public TableRecordImpl addTable(java.lang.String name)
throws ConnectorException
name -
ConnectorException
public ColumnRecordImpl addColumn(java.lang.String name,
java.lang.String type,
ColumnSetRecordImpl table)
throws ConnectorException
name - type - should be one of TypeFacility.RUNTIME_NAMEStable -
ConnectorException
public AnnotationRecordImpl addAnnotation(java.lang.String annotation,
AbstractMetadataRecord record)
annotation - record -
public ColumnSetRecordImpl addPrimaryKey(java.lang.String name,
java.util.List<java.lang.String> columnNames,
TableRecordImpl table)
throws ConnectorException
name - columnNames - table -
ConnectorException
public ColumnSetRecordImpl addIndex(java.lang.String name,
boolean nonUnique,
java.util.List<java.lang.String> columnNames,
TableRecordImpl table)
throws ConnectorException
name - nonUnique - true indicates that an index is being added.columnNames - table -
ConnectorException
public ForeignKeyRecordImpl addForiegnKey(java.lang.String name,
java.util.List<java.lang.String> columnNames,
TableRecordImpl pkTable,
TableRecordImpl table)
throws ConnectorException
name - columnNames - pkTable - table -
ConnectorException
public PropertyRecordImpl addExtensionProperty(java.lang.String name,
java.lang.String value,
AbstractMetadataRecord record)
throws ConnectorException
name - value - record -
ConnectorException
public ProcedureRecordImpl addProcedure(java.lang.String name)
throws ConnectorException
name -
ConnectorException
public ProcedureParameterRecordImpl addProcedureParameter(java.lang.String name,
java.lang.String type,
short parameterType,
ProcedureRecordImpl procedure)
throws ConnectorException
name - type - should be one of MetadataConstants.PARAMETER_TYPESparameterType - should be one of TypeFacility.RUNTIME_NAMESprocedure -
ConnectorException
public ColumnRecordImpl addProcedureResultSetColumn(java.lang.String name,
java.lang.String type,
ProcedureRecordImpl procedure)
throws ConnectorException
name - type - should be one of TypeFacility.RUNTIME_NAMESprocedure -
ConnectorException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||