|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.pbeans.Index
public class Index
Represents a database index. An array of instances of Index may be used in a StoreInfo implementation to indicate which table indexes should be created.
StoreInfo.getIndexes(net.sourceforge.pbeans.Store)
Constructor Summary | |
---|---|
Index(boolean unique,
java.lang.String propertyName)
Construcst an instance of Index. |
|
Index(boolean unique,
java.lang.String[] propertyNames,
int keyLength)
Construcst an instance of Index. |
|
Index(java.lang.String[] propertyNames)
Construcst an instance of Index. |
Method Summary | |
---|---|
void |
addPropertyName(java.lang.String name)
Adds a property name to the index. |
boolean |
equals(java.lang.Object other)
Compares this Index with another. |
int |
getKeyLength()
|
java.util.Collection |
getPropertyNames()
|
int |
hashCode()
|
boolean |
isUnique()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Index(java.lang.String[] propertyNames)
propertyNames
- The names of JavaBean properties belonging to this index.public Index(boolean unique, java.lang.String propertyName)
unique
- If true, the underlying table may not have two rows with the same property value for the property name given.propertyName
- The name of a JavaBean property belonging to this index.public Index(boolean unique, java.lang.String[] propertyNames, int keyLength)
unique
- If true, the underlying table may not have two rows with the same set of property values for the property names given.propertyNames
- The names of JavaBean properties belonging to this index.keyLength
- Index length for string fields. If it's zero, it isn't used.Method Detail |
---|
public int getKeyLength()
public java.util.Collection getPropertyNames()
public boolean isUnique()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public void addPropertyName(java.lang.String name)
equals
method.
name
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |