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 void
addFunction(FunctionMethod function)
void
addProcedure(Procedure procedure)
void
addServer(Server server)
void
addTable(Table table)
AbstractMetadataRecord
getChild(String type, String id)
Get the child of the given typestatic 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 SchemaFunctionMethod
getFunction(String uid)
Get a function by uidNavigableMap<String,FunctionMethod>
getFunctions()
Get the functions defined in this schema in a map of uuid toFunctionMethod
String
getPrimaryMetamodelUri()
Procedure
getProcedure(String procName)
NavigableMap<String,Procedure>
getProcedures()
Get the procedures defined in this schemaList<AbstractMetadataRecord>
getResolvingOrder()
Server
getServer(String serverName)
List<Server>
getServers()
Table
getTable(String tableName)
NavigableMap<String,Table>
getTables()
Get the tables defined in this schemastatic String
getTypeName()
boolean
isPhysical()
boolean
isVisible()
List<FunctionMethod>
removeFunctions(String functionName)
Procedure
removeProcedure(String procedureName)
Table
removeTable(String tableName)
void
setPhysical(boolean physical)
void
setPrimaryMetamodelUri(String string)
void
setVisible(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:
-
-