net.sourceforge.pbeans.data
Class IndexDescriptor

java.lang.Object
  extended by net.sourceforge.pbeans.data.IndexDescriptor

public class IndexDescriptor
extends java.lang.Object

Represents a unique or non-unique table index.


Constructor Summary
IndexDescriptor(java.lang.String name, boolean unique, java.lang.String fieldName)
           
IndexDescriptor(java.lang.String name, boolean unique, java.lang.String[] fieldNames, int keyLength)
           
IndexDescriptor(java.lang.String name, java.lang.String[] fieldNames)
           
 
Method Summary
 void addFieldName(java.lang.String fieldName)
           
 boolean equals(java.lang.Object other)
          Compares this IndexDescriptor to another.
 java.util.Collection getFieldNames()
           
 int getKeyLength()
           
 java.lang.String getName()
           
 int hashCode()
           
 boolean isUnique()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexDescriptor

public IndexDescriptor(java.lang.String name,
                       java.lang.String[] fieldNames)

IndexDescriptor

public IndexDescriptor(java.lang.String name,
                       boolean unique,
                       java.lang.String fieldName)

IndexDescriptor

public IndexDescriptor(java.lang.String name,
                       boolean unique,
                       java.lang.String[] fieldNames,
                       int keyLength)
Method Detail

getKeyLength

public int getKeyLength()

addFieldName

public void addFieldName(java.lang.String fieldName)

getName

public java.lang.String getName()

getFieldNames

public java.util.Collection getFieldNames()

isUnique

public boolean isUnique()

equals

public boolean equals(java.lang.Object other)
Compares this IndexDescriptor to another.

Overrides:
equals in class java.lang.Object
Returns:
True if the name, its uniqueness and the set of field names match the other IndexDescriptor.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object