org.teiid.metadata
Class Table

java.lang.Object
  extended by org.teiid.metadata.AbstractMetadataRecord
      extended by org.teiid.metadata.ColumnSet<Schema>
          extended by org.teiid.metadata.Table
All Implemented Interfaces:
Serializable, AbstractMetadataRecord.DataModifiable, AbstractMetadataRecord.Modifiable

public class Table
extends ColumnSet<Schema>
implements AbstractMetadataRecord.Modifiable, AbstractMetadataRecord.DataModifiable

See Also:
Serialized Form

Nested Class Summary
static class Table.TriggerEvent
           
static class Table.Type
           
 
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_URI
 
Constructor Summary
Table()
           
 
Method Summary
<T> T
addAttchment(Class<T> type, T attachment)
          Add attachment
 void addColumn(Column column)
           
 List<KeyRecord> getAccessPatterns()
           
 Collection<KeyRecord> getAllKeys()
           
<T> T
getAttachment(Class<T> type)
          Get attachment
 List<String> getBindings()
           
 int getCardinality()
           
 String getDeletePlan()
           
 List<ForeignKey> getForeignKeys()
           
 List<KeyRecord> getIndexes()
           
 String getInsertPlan()
           
 long getLastDataModification()
           
 long getLastModified()
           
 Table getMaterializedStageTable()
           
 Table getMaterializedTable()
           
 KeyRecord getPrimaryKey()
           
 String getResourcePath()
           
 List<String> getSchemaPaths()
           
 String getSelectTransformation()
           
 Table.Type getTableType()
           
 List<KeyRecord> getUniqueKeys()
           
 String getUpdatePlan()
           
 boolean isDeletePlanEnabled()
           
 boolean isInsertPlanEnabled()
           
 boolean isMaterialized()
           
 boolean isPhysical()
           
 boolean isSystem()
           
 boolean isUpdatePlanEnabled()
           
 boolean isVirtual()
           
 void setAccessPatterns(List<KeyRecord> accessPatterns)
           
 void setBindings(List<String> bindings)
           
 void setCardinality(int i)
           
 void setDeletePlan(String deletePlan)
           
 void setDeletePlanEnabled(boolean deletePlanEnabled)
           
 void setForiegnKeys(List<ForeignKey> foriegnKeys)
           
 void setIndexes(List<KeyRecord> indexes)
           
 void setInsertPlan(String insertPlan)
           
 void setInsertPlanEnabled(boolean insertPlanEnabled)
           
 void setLastDataModification(long lastDataModification)
           
 void setLastModified(long lastModified)
           
 void setMaterialized(boolean isMaterialized)
           
 void setMaterializedStageTable(Table materializedStageTable)
           
 void setMaterializedTable(Table materializedTable)
           
 void setPrimaryKey(KeyRecord primaryKey)
           
 void setResourcePath(String resourcePath)
           
 void setSchemaPaths(List<String> schemaPaths)
           
 void setSelectTransformation(String selectTransformation)
           
 void setSupportsUpdate(boolean b)
           
 void setSystem(boolean b)
           
 void setTableStats(TableStats stats)
           
 void setTableType(Table.Type i)
           
 void setUniqueKeys(List<KeyRecord> uniqueKeys)
           
 void setUpdatePlan(String updatePlan)
           
 void setUpdatePlanEnabled(boolean updatePlanEnabled)
           
 void setVirtual(boolean b)
           
 boolean supportsUpdate()
           
 
Methods inherited from class org.teiid.metadata.ColumnSet
getColumns, getParent, setColumns, setParent
 
Methods inherited from class org.teiid.metadata.AbstractMetadataRecord
equals, getAnnotation, getCanonicalName, getFullName, getName, getNameInSource, getProperties, getProperty, getUUID, hashCode, setAnnotation, setName, setNameInSource, setProperties, setProperty, setUUID, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Table

public Table()
Method Detail

getBindings

public List<String> getBindings()

setBindings

public void setBindings(List<String> bindings)

getSchemaPaths

public List<String> getSchemaPaths()

setSchemaPaths

public void setSchemaPaths(List<String> schemaPaths)

getCardinality

public int getCardinality()

isVirtual

public boolean isVirtual()

isMaterialized

public boolean isMaterialized()

isPhysical

public boolean isPhysical()

isSystem

public boolean isSystem()

getTableType

public Table.Type getTableType()

supportsUpdate

public boolean supportsUpdate()

setCardinality

public void setCardinality(int i)
Parameters:
i -

setTableType

public void setTableType(Table.Type i)
Parameters:
i -

setSupportsUpdate

public void setSupportsUpdate(boolean b)
Parameters:
b -

setVirtual

public void setVirtual(boolean b)
Parameters:
b -

setMaterialized

public void setMaterialized(boolean isMaterialized)
Parameters:
isMaterialized - The isMaterialized to set.
Since:
4.2

setSystem

public void setSystem(boolean b)
Parameters:
b -

getInsertPlan

public String getInsertPlan()

getUpdatePlan

public String getUpdatePlan()

getDeletePlan

public String getDeletePlan()

setInsertPlan

public void setInsertPlan(String insertPlan)

setUpdatePlan

public void setUpdatePlan(String updatePlan)

setDeletePlan

public void setDeletePlan(String deletePlan)

getForeignKeys

public List<ForeignKey> getForeignKeys()

setForiegnKeys

public void setForiegnKeys(List<ForeignKey> foriegnKeys)

getIndexes

public List<KeyRecord> getIndexes()

setIndexes

public void setIndexes(List<KeyRecord> indexes)

getUniqueKeys

public List<KeyRecord> getUniqueKeys()

setUniqueKeys

public void setUniqueKeys(List<KeyRecord> uniqueKeys)

getAccessPatterns

public List<KeyRecord> getAccessPatterns()

setAccessPatterns

public void setAccessPatterns(List<KeyRecord> accessPatterns)

getPrimaryKey

public KeyRecord getPrimaryKey()

setPrimaryKey

public void setPrimaryKey(KeyRecord primaryKey)

getSelectTransformation

public String getSelectTransformation()

setSelectTransformation

public void setSelectTransformation(String selectTransformation)

getMaterializedStageTable

public Table getMaterializedStageTable()

getMaterializedTable

public Table getMaterializedTable()

setMaterializedStageTable

public void setMaterializedStageTable(Table materializedStageTable)

setMaterializedTable

public void setMaterializedTable(Table materializedTable)

setResourcePath

public void setResourcePath(String resourcePath)

getResourcePath

public String getResourcePath()

getAllKeys

public Collection<KeyRecord> getAllKeys()

addColumn

public void addColumn(Column column)
Overrides:
addColumn in class ColumnSet<Schema>

getLastDataModification

public long getLastDataModification()
Specified by:
getLastDataModification in interface AbstractMetadataRecord.DataModifiable

getLastModified

public long getLastModified()
Specified by:
getLastModified in interface AbstractMetadataRecord.Modifiable

setLastDataModification

public void setLastDataModification(long lastDataModification)

setLastModified

public void setLastModified(long lastModified)

setTableStats

public void setTableStats(TableStats stats)

isDeletePlanEnabled

public boolean isDeletePlanEnabled()

isInsertPlanEnabled

public boolean isInsertPlanEnabled()

isUpdatePlanEnabled

public boolean isUpdatePlanEnabled()

setInsertPlanEnabled

public void setInsertPlanEnabled(boolean insertPlanEnabled)

setDeletePlanEnabled

public void setDeletePlanEnabled(boolean deletePlanEnabled)

setUpdatePlanEnabled

public void setUpdatePlanEnabled(boolean updatePlanEnabled)

addAttchment

public <T> T addAttchment(Class<T> type,
                          T attachment)
Add attachment

Type Parameters:
T - the expected type
Parameters:
attachment - the attachment
type - the type
Returns:
any previous attachment
Throws:
IllegalArgumentException - for a null name, attachment or type
UnsupportedOperationException - when not supported by the implementation

getAttachment

public <T> T getAttachment(Class<T> type)
Get attachment

Type Parameters:
T - the expected type
Parameters:
type - the type
Returns:
the attachment or null if not present
Throws:
IllegalArgumentException - for a null name or type


Copyright © 2012. All Rights Reserved.