Package org.teiid.metadata
Class Schema
- java.lang.Object
-
- org.teiid.metadata.AbstractMetadataRecord
-
- org.teiid.metadata.Schema
-
- All Implemented Interfaces:
Serializable
public class Schema extends AbstractMetadataRecord
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.teiid.metadata.AbstractMetadataRecord
AbstractMetadataRecord.DataModifiable, AbstractMetadataRecord.Modifiable
-
-
Field Summary
-
Fields inherited from class org.teiid.metadata.AbstractMetadataRecord
NAME_DELIM_CHAR, RELATIONAL_PREFIX
-
-
Constructor Summary
Constructors Constructor Description Schema()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFunction(FunctionMethod function)voidaddProcedure(Procedure procedure)voidaddServer(Server server)voidaddTable(Table table)AbstractMetadataRecordgetChild(String type, String id)Get the child of the given typestatic StringgetChildType(Class<? extends AbstractMetadataRecord> child)Return the object type name for a given child type class, or null if the class is not a child of a SchemaFunctionMethodgetFunction(String uid)Get a function by uidNavigableMap<String,FunctionMethod>getFunctions()Get the functions defined in this schema in a map of uuid toFunctionMethodStringgetPrimaryMetamodelUri()ProceduregetProcedure(String procName)NavigableMap<String,Procedure>getProcedures()Get the procedures defined in this schemaList<AbstractMetadataRecord>getResolvingOrder()ServergetServer(String serverName)List<Server>getServers()TablegetTable(String tableName)NavigableMap<String,Table>getTables()Get the tables defined in this schemastatic StringgetTypeName()booleanisPhysical()booleanisVisible()List<FunctionMethod>removeFunctions(String functionName)ProcedureremoveProcedure(String procedureName)TableremoveTable(String tableName)voidsetPhysical(boolean physical)voidsetPrimaryMetamodelUri(String string)voidsetVisible(boolean visible)-
Methods inherited from class org.teiid.metadata.AbstractMetadataRecord
equals, getAnnotation, getCanonicalName, getFullName, getIdentifier, getIncomingObjects, getName, getNameInSource, getParent, getProperties, getProperty, getProperty, getSourceName, getSQLString, getSQLString, getUUID, hashCode, isUUIDSet, setAnnotation, setIncomingObjects, setName, setNameInSource, setProperties, setProperty, setUUID, toString
-
-
-
-
Method Detail
-
addTable
public void addTable(Table table)
-
addProcedure
public void addProcedure(Procedure procedure)
-
addFunction
public void addFunction(FunctionMethod function)
-
removeFunctions
public List<FunctionMethod> removeFunctions(String functionName)
-
getTables
public NavigableMap<String,Table> getTables()
Get the tables defined in this schema- Returns:
-
getProcedures
public NavigableMap<String,Procedure> getProcedures()
Get the procedures defined in this schema- Returns:
-
getFunctions
public NavigableMap<String,FunctionMethod> getFunctions()
Get the functions defined in this schema in a map of uuid toFunctionMethod- Returns:
-
getFunction
public FunctionMethod getFunction(String uid)
Get a function by uid- Returns:
-
getPrimaryMetamodelUri
public String getPrimaryMetamodelUri()
-
isPhysical
public boolean isPhysical()
-
setPrimaryMetamodelUri
public void setPrimaryMetamodelUri(String string)
- Parameters:
string-
-
setPhysical
public void setPhysical(boolean physical)
-
getResolvingOrder
public List<AbstractMetadataRecord> getResolvingOrder()
-
addServer
public void addServer(Server server)
-
isVisible
public boolean isVisible()
-
setVisible
public void setVisible(boolean visible)
-
getChildType
public static String getChildType(Class<? extends AbstractMetadataRecord> child)
Return the object type name for a given child type class, or null if the class is not a child of a Schema- Parameters:
child-- Returns:
-
getTypeName
public static String getTypeName()
- Returns:
- the literal value schema
-
getChild
public AbstractMetadataRecord getChild(String type, String id)
Get the child of the given type- Parameters:
type-id- can be either the name or the uid depending on type- Returns:
-
-