|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.teiid.metadata.MetadataFactory
public class MetadataFactory
Allows connectors to build metadata for use by the engine. TODO: add support for datatype import TODO: add support for unique constraints
Constructor Summary | |
---|---|
MetadataFactory(String modelName,
Map<String,Datatype> dataTypes,
Properties importProperties)
|
Method Summary | |
---|---|
KeyRecord |
addAccessPattern(String name,
List<String> columnNames,
Table table)
Adds an access pattern to the given table. |
Column |
addColumn(String name,
String type,
ColumnSet<?> table)
Adds a column to the table with the given name and type. |
ForeignKey |
addForiegnKey(String name,
List<String> columnNames,
List<String> referencedColumnNames,
Table pkTable,
Table table,
boolean addUniqueConstraint)
Adds a foreign key to the given table. |
ForeignKey |
addForiegnKey(String name,
List<String> columnNames,
Table pkTable,
Table table)
Adds a foreign key to the given table. |
FunctionMethod |
addFunction(String name)
Add a function with the given name to the model. |
KeyRecord |
addIndex(String name,
boolean nonUnique,
List<String> columnNames,
Table table)
Adds an index to the given table. |
KeyRecord |
addPrimaryKey(String name,
List<String> columnNames,
Table table)
Adds a primary key to the given table. |
Procedure |
addProcedure(String name)
Add a procedure with the given name to the model. |
ProcedureParameter |
addProcedureParameter(String name,
String type,
ProcedureParameter.Type parameterType,
Procedure procedure)
Add a procedure parameter. |
Column |
addProcedureResultSetColumn(String name,
String type,
Procedure procedure)
Add a procedure resultset column to the given procedure. |
Table |
addTable(String name)
Add a table with the given name to the model. |
Properties |
getImportProperties()
|
MetadataStore |
getMetadataStore()
|
void |
setAutoCorrectColumnNames(boolean autoCorrectColumnNames)
Set to false to disable correcting column and other names to be valid Teiid names. |
void |
setMetadataStore(MetadataStore metadataStore)
|
protected void |
setUUID(AbstractMetadataRecord record)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MetadataFactory(String modelName, Map<String,Datatype> dataTypes, Properties importProperties)
Method Detail |
---|
public MetadataStore getMetadataStore()
public Properties getImportProperties()
protected void setUUID(AbstractMetadataRecord record)
public Table addTable(String name) throws TranslatorException
name
-
TranslatorException
public Column addColumn(String name, String type, ColumnSet<?> table) throws TranslatorException
name
- type
- should be one of TypeFacility.RUNTIME_NAMES
table
-
TranslatorException
public KeyRecord addPrimaryKey(String name, List<String> columnNames, Table table) throws TranslatorException
name
- columnNames
- table
-
TranslatorException
public KeyRecord addAccessPattern(String name, List<String> columnNames, Table table) throws TranslatorException
name
- columnNames
- table
-
TranslatorException
public KeyRecord addIndex(String name, boolean nonUnique, List<String> columnNames, Table table) throws TranslatorException
name
- nonUnique
- true indicates that an index is being added.columnNames
- table
-
TranslatorException
public ForeignKey addForiegnKey(String name, List<String> columnNames, Table pkTable, Table table) throws TranslatorException
name
- columnNames
- pkTable
- table
-
TranslatorException
public ForeignKey addForiegnKey(String name, List<String> columnNames, List<String> referencedColumnNames, Table pkTable, Table table, boolean addUniqueConstraint) throws TranslatorException
name
- columnNames
- referencedColumnNames,
- may be null to indicate that the primary key should be used.pkTable
- table
- addUniqueConstraint
-
TranslatorException
public Procedure addProcedure(String name) throws TranslatorException
name
-
TranslatorException
public ProcedureParameter addProcedureParameter(String name, String type, ProcedureParameter.Type parameterType, Procedure procedure) throws TranslatorException
name
- type
- should be one of TypeFacility.RUNTIME_NAMES
parameterType
- should be one of ProcedureParameter.Type
procedure
-
TranslatorException
public Column addProcedureResultSetColumn(String name, String type, Procedure procedure) throws TranslatorException
name
- type
- should be one of TypeFacility.RUNTIME_NAMES
procedure
-
TranslatorException
public FunctionMethod addFunction(String name) throws TranslatorException
name
-
TranslatorException
public void setAutoCorrectColumnNames(boolean autoCorrectColumnNames)
autoCorrectColumnNames
- public void setMetadataStore(MetadataStore metadataStore)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |