public class Key extends Object
Constructor and Description |
---|
Key() |
Modifier and Type | Method and Description |
---|---|
void |
addColumn(int pos,
String field)
Adds a column to the key
|
boolean |
equals(Object obj) |
List<String> |
getColumns()
Returns the columns that make up the key.
|
String |
getName()
Returns the name of the key.
|
int |
hashCode() |
boolean |
isUnique()
Determines if this key also enforces an unique constraint
|
void |
setName(String name)
Sets the name of the key.
|
void |
setUnique(boolean unique)
Sets the unique flag.
|
String |
toString() |
public String getName()
public void setName(String name)
name
- then name of the keypublic List<String> getColumns()
public void addColumn(int pos, String field)
pos
- the position to add atfield
- the field or column to addpublic boolean isUnique()
public void setUnique(boolean unique)
unique
- true to enforce an unique constraint, false otherwiseCopyright © 2018. All rights reserved.