Expresso 5-6

com.jcorporate.expresso.core.dbobj
Class DBIndex

java.lang.Object
  extended bycom.jcorporate.expresso.core.dbobj.DBIndex
All Implemented Interfaces:
Serializable

public class DBIndex
extends Object
implements Serializable

Bean class that describes a database index. Kept internally for DBObject

Author:
Michael Rimov
See Also:
Serialized Form

Constructor Summary
DBIndex()
          Default Constructor - Sets everything to null
DBIndex(String theIndexName, String theTableName, String theFieldNames, boolean isItUnique)
          All in one constructor
 
Method Summary
 String constructSQL()
          Constructs a SQL CREATE INDEX statement for use in the DBCreate sequence
 String getFieldNames()
           
 String getIndexName()
           
 String getTableName()
           
 boolean isUnique()
           
 void setFieldNames(String newFieldNames)
           
 void setIndexName(String newIndexName)
           
 void setTableName(String newTableName)
           
 void setUnique(boolean newUnique)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBIndex

public DBIndex()
Default Constructor - Sets everything to null


DBIndex

public DBIndex(String theIndexName,
               String theTableName,
               String theFieldNames,
               boolean isItUnique)
All in one constructor

Parameters:
theIndexName - The name you're going to call the index
theTableName - The name of the table this index is attached to
theFieldNames - A comma delimited list of fields in the table
isItUnique - Set it to true if you wish for the index to not have duplicate entries
Method Detail

getIndexName

public String getIndexName()

setIndexName

public void setIndexName(String newIndexName)

getFieldNames

public String getFieldNames()

isUnique

public boolean isUnique()

setFieldNames

public void setFieldNames(String newFieldNames)

setUnique

public void setUnique(boolean newUnique)

constructSQL

public String constructSQL()
                    throws DBException
Constructs a SQL CREATE INDEX statement for use in the DBCreate sequence

Returns:
The constructed SQL string.
Throws:
DBException - if there was an error constructing the sql or if there is a bad argument

setTableName

public void setTableName(String newTableName)

getTableName

public String getTableName()

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.