|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgpruitt.datamodeler.core.Index
public class Index
This class models a database index.
Field Summary | |
---|---|
protected java.lang.String |
comment
|
protected java.util.List<SortedColumn> |
list
|
protected java.util.Map<java.lang.String,SortedColumn> |
map
|
protected java.lang.String |
name
|
protected Table |
table
|
Constructor Summary | |
---|---|
Index(java.lang.String name)
Constructor. |
Method Summary | |
---|---|
SortedColumn |
add(SortedColumn col)
Adds a SortedColumn to the Index |
boolean |
contains(SortedColumn col)
Tests whether the given SortedColumn is in the set |
boolean |
contains(java.lang.String name)
Tests to see if the Index contains a SortedColumn with the given name |
SortedColumn |
get(int index)
Gets the SortedColumn at the given index |
SortedColumn |
get(java.lang.String name)
Gets the SortedColumn by name |
java.lang.String |
getComment()
Gets the comment associated with this Index |
java.lang.String |
getName()
Gets the name of the Index. |
Table |
getTable()
Gets the Table being indexed by this Index |
boolean |
isEmpty()
Returns true if the Index has no SortedColumns |
java.util.Iterator<SortedColumn> |
iterator()
Gets an Iterator over the SortedColumns in the Index |
void |
setComment(java.lang.String comment)
Sets the comment associated with this Index |
void |
setTable(Table table)
Sets the Table being indexed by this Index |
int |
size()
Gets the number of SortedColumns in the Index |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final java.util.Map<java.lang.String,SortedColumn> map
protected final java.util.List<SortedColumn> list
protected final java.lang.String name
protected Table table
protected java.lang.String comment
Constructor Detail |
---|
public Index(java.lang.String name)
name
- The name of the IndexMethod Detail |
---|
public java.lang.String getName()
public Table getTable()
public void setTable(Table table)
table
- the Tablepublic SortedColumn add(SortedColumn col)
col
- the SortedColumn to add
SortedColumn
public SortedColumn get(int index)
index
- the index of the SortedColumn to get
SortedColumn
public SortedColumn get(java.lang.String name)
name
- The name of the SortedColumn to get
SortedColumn
public boolean contains(java.lang.String name)
name
- the name of the SortedColumn to test for
public boolean contains(SortedColumn col)
col
- the SortedColumn
public java.util.Iterator<SortedColumn> iterator()
iterator
in interface java.lang.Iterable<SortedColumn>
public boolean isEmpty()
public int size()
public java.lang.String getComment()
public void setComment(java.lang.String comment)
comment
- the comment.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |