|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.replicator.database.Key
public class Key
This class defines a Key
| Field Summary | |
|---|---|
static int |
IllegalType
|
static int |
NonUnique
|
static int |
Primary
|
static int |
Unique
|
| Constructor Summary | |
|---|---|
Key()
Creates a new key with no information. |
|
Key(int type)
Creates a new key including the type. |
|
| Method Summary | |
|---|---|
void |
AddColumn(Column column)
Adds a column to the key definition. |
java.util.ArrayList<Column> |
getColumns()
Returns the columns in this key. |
long |
getMaxCardinality()
Returns the maximum cardinality of index columns or 0 if cardinality is unknown. |
java.lang.String |
getName()
Returns the index name corresponding to this key. |
int |
getType()
Returns the key type. |
boolean |
isPrimaryKey()
Returns true if this is a primary key. |
boolean |
isSecondaryKey()
Returns true if this is a secondary (i.e., non-primary) key. |
boolean |
isUnique()
Returns true if key is unique, i.e., has one and only one value per entry. |
void |
setMaxCardinality(long maxCardinality)
Sets the maximum index cardinality. |
void |
setName(java.lang.String name)
Sets the index name corresponding to this key. |
void |
setType(int type)
Sets the key type. |
int |
size()
Returns the number of columns in the key. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int IllegalType
public static final int NonUnique
public static final int Primary
public static final int Unique
| Constructor Detail |
|---|
public Key()
public Key(int type)
| Method Detail |
|---|
public int getType()
public void setType(int type)
public java.lang.String getName()
public void setName(java.lang.String name)
public void AddColumn(Column column)
public java.util.ArrayList<Column> getColumns()
public long getMaxCardinality()
public void setMaxCardinality(long maxCardinality)
public boolean isUnique()
public boolean isPrimaryKey()
public boolean isSecondaryKey()
public int size()
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||