jACOB 2.7 API Documentation.

de.tif.jacob.core.definition
Class KeyType

java.lang.Object
  extended by de.tif.jacob.core.definition.KeyType

public final class KeyType
extends java.lang.Object

This class declares the different types of table keys and their common characteristics, e.g. unique or not, etc.

See Also:
IKey.getType()

Field Summary
static KeyType FOREIGN
          The key type for foreign keys.
static KeyType INDEX
          The key type for non-unique indices.
static KeyType PRIMARY
          The key type for primary keys.
static java.lang.String RCS_ID
          The internal revision control system id.
static java.lang.String RCS_REV
          The internal revision control system id in short form.
static KeyType UNIQUE
          The key type for unique indices.
 
Method Summary
 java.lang.String getPrefix()
          Returns the prefix of this key type.
 boolean isIndex()
          Checks whether this key type is an index.
 boolean isUnique()
          Checks whether this key type is an unique constraint.
 java.lang.String toString()
          Returns a string representation of this key type, which is easy for a person to read.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RCS_ID

public static final transient java.lang.String RCS_ID
The internal revision control system id.

See Also:
Constant Field Values

RCS_REV

public static final transient java.lang.String RCS_REV
The internal revision control system id in short form.

See Also:
Constant Field Values

PRIMARY

public static final KeyType PRIMARY
The key type for primary keys.


FOREIGN

public static final KeyType FOREIGN
The key type for foreign keys.


UNIQUE

public static final KeyType UNIQUE
The key type for unique indices.

Note that indices are abstracted as keys as well.


INDEX

public static final KeyType INDEX
The key type for non-unique indices.

Note that indices are abstracted as keys as well.

Method Detail

getPrefix

public java.lang.String getPrefix()
Returns the prefix of this key type. The prefix is used to generate key name, i.e. the key name prefix indicates the type of the key.

Returns:
the key type prefix.

isIndex

public boolean isIndex()
Checks whether this key type is an index.

Returns:
true if this key type is an index, otherwise false

isUnique

public boolean isUnique()
Checks whether this key type is an unique constraint.

Returns:
true if this key type is an unique constraint, otherwise false

toString

public java.lang.String toString()
Returns a string representation of this key type, which is easy for a person to read.

Overrides:
toString in class java.lang.Object
Returns:
the string representation of this key type.

jACOB 2.7 API Documentation.