org.gcube.data.analysis.tabulardata.model.table
Class Table
java.lang.Object
org.gcube.data.analysis.tabulardata.model.table.Table
- All Implemented Interfaces:
- MetadataHolder
- Direct Known Subclasses:
- Codelist, Dataset, GenericTable, HierarchicalCodelist, ViewTable
public abstract class Table
- extends Object
- implements MetadataHolder
Represent a generic relational table.
- Author:
- "Luigi Fortunati"
Table
public Table(long id,
String name)
- Parameters:
id - The unique id of the tablename - the relational table name
Table
public Table(String name)
getId
public Long getId()
- Returns:
- the unique id of the relational table
getName
public String getName()
- Returns:
- the database name of the relational table
getReference
public TableReference getReference()
getColumnReference
public ColumnReference getColumnReference(Column column)
getTableType
public abstract TableType getTableType()
- Returns:
- the table type enumarated value
getColumns
public abstract List<Column> getColumns()
- Returns:
- the column set of the table
getColumnByName
public Column getColumnByName(String columnName)
throws RuntimeException,
IllegalArgumentException
- Throws:
RuntimeException
IllegalArgumentException
getColumnByLabel
public Column getColumnByLabel(String columnLabel)
throws RuntimeException,
IllegalArgumentException
- Throws:
RuntimeException
IllegalArgumentException
getColumns
public List<Column> getColumns(ColumnType columnType)
getColumns
public List<Column> getColumns(ColumnType... columnTypes)
hasRelationships
public boolean hasRelationships()
getRelationships
public Collection<TableRelationship> getRelationships()
sameStructureAs
public boolean sameStructureAs(Table table)
getParentTableId
public Long getParentTableId()
setParentTableId
public void setParentTableId(Long parentTableId)
exists
public boolean exists()
setExists
public void setExists(boolean exists)
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
toString
public String toString()
- Overrides:
toString in class Object
getMetadata
public <C extends CubeMetadata<? extends Serializable>> C getMetadata(Class<C> metadataType)
- Specified by:
getMetadata in interface MetadataHolder
removeMetadata
public void removeMetadata(Class<? extends CubeMetadata<? extends Serializable>> metadataType)
- Specified by:
removeMetadata in interface MetadataHolder
setMetadata
public void setMetadata(CubeMetadata<? extends Serializable> metadata)
- Specified by:
setMetadata in interface MetadataHolder
getAllMetadata
public Collection<CubeMetadata<Serializable>> getAllMetadata()
- Specified by:
getAllMetadata in interface MetadataHolder
removeAllMetadata
public void removeAllMetadata()
- Specified by:
removeAllMetadata in interface MetadataHolder
setMetadata
public void setMetadata(Collection<? extends CubeMetadata<? extends Serializable>> metadataObjects)
- Specified by:
setMetadata in interface MetadataHolder
getMetadataObject
public <T extends Serializable> T getMetadataObject(Class<? extends CubeMetadata<T>> metadataType)
- Specified by:
getMetadataObject in interface MetadataHolder
Copyright © 2013. All Rights Reserved.