org.jboss.dna.common.jdbc.model.spi
Class IndexBean

java.lang.Object
  extended by org.jboss.dna.common.jdbc.model.spi.CoreMetaDataBean
      extended by org.jboss.dna.common.jdbc.model.spi.DatabaseNamedObjectBean
          extended by org.jboss.dna.common.jdbc.model.spi.SchemaObjectBean
              extended by org.jboss.dna.common.jdbc.model.spi.IndexBean
All Implemented Interfaces:
Serializable, CoreMetaData, DatabaseNamedObject, Index, SchemaObject

public class IndexBean
extends SchemaObjectBean
implements Index

Provides all database table's index specific metadata.

Author:
Sergiy Litsenko
See Also:
Serialized Form

Constructor Summary
IndexBean()
          Default constructor
 
Method Summary
 void addColumn(IndexColumn indexColumn)
          Adds IndexColumn
 void deleteColumn(IndexColumn indexColumn)
          delete IndexColumn
 IndexColumn findColumnByName(String columnName)
          Returns index column for specified column name or null
 Integer getCardinality()
          When TYPE is tableIndexStatistic, then this is the number of rows in the table; otherwise, it is the number of unique values in the index.
 Set<IndexColumn> getColumns()
          Retrieves index columns
 String getFilterCondition()
          Returns the filter condition, if any.
 IndexType getIndexType()
          Gets index type
 Integer getPages()
          When TYPE is tableIndexStatisic then this is the number of pages used for the table, otherwise it is the number of pages used for the current index.
 Boolean isUnique()
          Can index values be non-unique. false when TYPE is tableIndexStatistic.
 void setCardinality(Integer cardinality)
          When TYPE is tableIndexStatistic, then this is the number of rows in the table; otherwise, it is the number of unique values in the index.
 void setFilterCondition(String filterCondition)
          Sets the filter condition, if any.
 void setIndexType(IndexType indexType)
          Sets index type
 void setPages(Integer pages)
          When TYPE is tableIndexStatisic then this is the number of pages used for the table, otherwise it is the number of pages used for the current index.
 void setUnique(Boolean unique)
          Can index values be non-unique. false when TYPE is tableIndexStatistic.
 
Methods inherited from class org.jboss.dna.common.jdbc.model.spi.SchemaObjectBean
getCatalog, getSchema, setCatalog, setSchema
 
Methods inherited from class org.jboss.dna.common.jdbc.model.spi.DatabaseNamedObjectBean
addExtraProperty, deleteExtraProperty, getExtraProperties, getExtraProperty, getName, getRemarks, setName, setRemarks
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.dna.common.jdbc.model.api.SchemaObject
getCatalog, getSchema, setCatalog, setSchema
 
Methods inherited from interface org.jboss.dna.common.jdbc.model.api.DatabaseNamedObject
addExtraProperty, deleteExtraProperty, getExtraProperties, getExtraProperty, getName, getRemarks, setName, setRemarks
 

Constructor Detail

IndexBean

public IndexBean()
Default constructor

Method Detail

getColumns

public Set<IndexColumn> getColumns()
Retrieves index columns

Specified by:
getColumns in interface Index
Returns:
index columns

addColumn

public void addColumn(IndexColumn indexColumn)
Adds IndexColumn

Specified by:
addColumn in interface Index
Parameters:
indexColumn - the IndexColumn

deleteColumn

public void deleteColumn(IndexColumn indexColumn)
delete IndexColumn

Specified by:
deleteColumn in interface Index
Parameters:
indexColumn - the IndexColumn

findColumnByName

public IndexColumn findColumnByName(String columnName)
Returns index column for specified column name or null

Specified by:
findColumnByName in interface Index
Parameters:
columnName - the name of column
Returns:
index column for specified column name or null.

isUnique

public Boolean isUnique()
Can index values be non-unique. false when TYPE is tableIndexStatistic.

Specified by:
isUnique in interface Index
Returns:
true if index values can be non-unique.

setUnique

public void setUnique(Boolean unique)
Can index values be non-unique. false when TYPE is tableIndexStatistic.

Specified by:
setUnique in interface Index
Parameters:
unique - true if index values can be non-unique.

getIndexType

public IndexType getIndexType()
Gets index type

Specified by:
getIndexType in interface Index
Returns:
index type

setIndexType

public void setIndexType(IndexType indexType)
Sets index type

Specified by:
setIndexType in interface Index
Parameters:
indexType - index type

getCardinality

public Integer getCardinality()
When TYPE is tableIndexStatistic, then this is the number of rows in the table; otherwise, it is the number of unique values in the index.

Specified by:
getCardinality in interface Index
Returns:
the number of rows in the table if index type is STATISTICS; otherwise, the number of unique values in the index.

setCardinality

public void setCardinality(Integer cardinality)
When TYPE is tableIndexStatistic, then this is the number of rows in the table; otherwise, it is the number of unique values in the index.

Specified by:
setCardinality in interface Index
Parameters:
cardinality - the number of rows in the table if index type is STATISTICS; otherwise, the number of unique values in the index.

getPages

public Integer getPages()
When TYPE is tableIndexStatisic then this is the number of pages used for the table, otherwise it is the number of pages used for the current index.

Specified by:
getPages in interface Index
Returns:
the number of pages used for the table if index type is STATISTICS; otherwise the number of pages used for the current index.

setPages

public void setPages(Integer pages)
When TYPE is tableIndexStatisic then this is the number of pages used for the table, otherwise it is the number of pages used for the current index.

Specified by:
setPages in interface Index
Parameters:
pages - the number of pages used for the table if index type is STATISTICS; otherwise the number of pages used for the current index.

getFilterCondition

public String getFilterCondition()
Returns the filter condition, if any. (may be null)

Specified by:
getFilterCondition in interface Index
Returns:
the filter condition, if any. (may be null)

setFilterCondition

public void setFilterCondition(String filterCondition)
Sets the filter condition, if any. (may be null)

Specified by:
setFilterCondition in interface Index
Parameters:
filterCondition - the filter condition, if any. (may be null)


Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.