net.sf.jaxme.sqls.impl
Class IndexImpl

java.lang.Object
  extended bynet.sf.jaxme.sqls.impl.ColumnSetImpl
      extended bynet.sf.jaxme.sqls.impl.IndexImpl
All Implemented Interfaces:
ColumnSet, Index

public class IndexImpl
extends ColumnSetImpl
implements Index

Author:
Jochen Wiedmann

Nested Class Summary
static class IndexImpl.NameImpl
           
 
Nested classes inherited from class net.sf.jaxme.sqls.Index
Index.Name
 
Method Summary
 void addColumn(Column.Name pName)
          Adds the column with the given name to the index by invoking addColumn(Column).
 void addColumn(Column pColumn)
          Adds a column to the index.
 void addColumn(java.lang.String pName)
          Adds the column with the given name to the index by invoking addColumn(Column).
 java.util.Iterator getColumns()
          Returns the column sets columns.
 Index.Name getName()
          Returns the index name.
 boolean isPrimaryKey()
          Returns whether the index is a primary key index.
 boolean isUnique()
          Returns whether the index is unique.
 void setName(Index.Name pName)
          Sets the index name.
 void setName(java.lang.String pName)
          Sets the index name.
 
Methods inherited from class net.sf.jaxme.sqls.impl.ColumnSetImpl
getTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.jaxme.sqls.ColumnSet
getTable
 

Method Detail

setName

public void setName(Index.Name pName)
Description copied from interface: Index

Sets the index name. Explicit setting of an index name is not required.

Specified by:
setName in interface Index

setName

public void setName(java.lang.String pName)
Description copied from interface: Index

Sets the index name. Explicit setting of an index name is not required.

Specified by:
setName in interface Index

getName

public Index.Name getName()
Description copied from interface: Index

Returns the index name. Explicit setting of an index name is not required.

Specified by:
getName in interface Index

addColumn

public void addColumn(Column pColumn)
Description copied from interface: Index

Adds a column to the index. The column must have the same table.

Specified by:
addColumn in interface Index

addColumn

public void addColumn(Column.Name pName)
Description copied from interface: Index

Adds the column with the given name to the index by invoking Index.addColumn(Column).

Specified by:
addColumn in interface Index

addColumn

public void addColumn(java.lang.String pName)
Description copied from interface: Index

Adds the column with the given name to the index by invoking Index.addColumn(Column).

Specified by:
addColumn in interface Index

isUnique

public boolean isUnique()
Description copied from interface: Index

Returns whether the index is unique.

Specified by:
isUnique in interface Index

isPrimaryKey

public boolean isPrimaryKey()
Description copied from interface: Index

Returns whether the index is a primary key index.

Specified by:
isPrimaryKey in interface Index

getColumns

public java.util.Iterator getColumns()
Description copied from interface: ColumnSet

Returns the column sets columns. In the case of an Index, these are the columns that have been added via Index.addColumn(Column). In the case of a ForeignKey, these are the local columns of column links.

Specified by:
getColumns in interface ColumnSet