Package bbd.jportal2
Class Key
- java.lang.Object
-
- bbd.jportal2.Key
-
- All Implemented Interfaces:
Serializable
public class Key extends Object implements Serializable
Keys and Indexes used for the database (if its not primary or unique then it is an index)- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Key()Contructs with default values
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector<String>getFields()StringgetName()Vector<String>getOptions()booleanhasField(String s)Checks if field is already usedbooleanisPrimary()booleanisUnique()voidreader(DataInputStream ids)voidwriter(DataOutputStream ods)
-
-
-
Field Detail
-
name
public String name
Name of index or key
-
isPrimary
public boolean isPrimary
Indicates the primary key
-
isUnique
public boolean isUnique
Indicates the index is unique (not defined if primary key)
-
-
Method Detail
-
getName
public String getName()
-
isPrimary
public boolean isPrimary()
-
isUnique
public boolean isUnique()
-
reader
public void reader(DataInputStream ids) throws IOException
- Throws:
IOException
-
writer
public void writer(DataOutputStream ods) throws IOException
- Throws:
IOException
-
hasField
public boolean hasField(String s)
Checks if field is already used
-
-