org.eclipse.persistence.tools.schemaframework
Class IndexDefinition
java.lang.Object
org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
org.eclipse.persistence.tools.schemaframework.IndexDefinition
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class IndexDefinition
- extends DatabaseObjectDefinition
Purpose: Allow for indexes to be created.
- See Also:
- Serialized Form
- Author:
- James Sutherland
- Since:
- EclipseLink 2.2
Field Summary |
protected java.util.List<java.lang.String> |
fields
|
protected boolean |
isUnique
|
protected java.lang.String |
targetTable
|
Method Summary |
void |
addField(java.lang.String fieldName)
PUBLIC:
Add the field to the index. |
java.io.Writer |
buildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session,
java.io.Writer writer)
INTERNAL:
Return the create type statement. |
java.io.Writer |
buildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session,
java.io.Writer writer)
INTERNAL:
Return the drop type statement. |
java.util.List<java.lang.String> |
getFields()
|
java.lang.String |
getTargetTable()
|
boolean |
isUnique()
|
void |
setFields(java.util.List<java.lang.String> fields)
|
void |
setIsUnique(boolean isUnique)
|
void |
setTargetTable(java.lang.String targetTable)
|
Methods inherited from class org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition |
clone, createObject, createOnDatabase, dropFromDatabase, dropObject, getFullName, getName, getQualifier, postCreateObject, preDropObject, setName, setQualifier, toString |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
targetTable
protected java.lang.String targetTable
fields
protected java.util.List<java.lang.String> fields
isUnique
protected boolean isUnique
IndexDefinition
public IndexDefinition()
isUnique
public boolean isUnique()
setIsUnique
public void setIsUnique(boolean isUnique)
getTargetTable
public java.lang.String getTargetTable()
setTargetTable
public void setTargetTable(java.lang.String targetTable)
addField
public void addField(java.lang.String fieldName)
- PUBLIC:
Add the field to the index.
buildCreationWriter
public java.io.Writer buildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session,
java.io.Writer writer)
throws ValidationException
- INTERNAL:
Return the create type statement.
- Specified by:
buildCreationWriter
in class DatabaseObjectDefinition
- Throws:
ValidationException
buildDeletionWriter
public java.io.Writer buildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session,
java.io.Writer writer)
throws ValidationException
- INTERNAL:
Return the drop type statement.
- Specified by:
buildDeletionWriter
in class DatabaseObjectDefinition
- Throws:
ValidationException
getFields
public java.util.List<java.lang.String> getFields()
setFields
public void setFields(java.util.List<java.lang.String> fields)