Modifier and Type | Field and Description |
---|---|
protected static String |
_ON_TABLE_
The Constant _ON_TABLE_.
|
protected ArrayList<Object> |
columnList
The column list.
|
protected static String |
DROP_INDEX_
The Constant DROP_INDEX_.
|
protected int |
hashInt
The hash int.
|
protected String |
hashString
The hash string.
|
protected String |
name
The name.
|
protected SqlTableIdentity |
owner
The owner.
|
protected SQL.INDEXTYPE |
type
The type.
|
Constructor and Description |
---|
SqlIndex(SQL.INDEXTYPE type,
Object... columnList)
Instantiates a new sql index.
|
SqlIndex(String name,
SqlTableIdentity owner,
SQL.INDEXTYPE type,
Object... columnList)
Instantiates a new sql index.
|
Modifier and Type | Method and Description |
---|---|
void |
addColumn(Object column)
Adds the column.
|
protected StringBuilder |
assembleColumnListString(StringBuilder sb)
Assemble column list string.
|
String |
assembleName()
Assemble name.
|
StringBuilder |
assembleTableClassCode(StringBuilder sb)
Assemble table class code.
|
String |
buildHash()
Builds the hash.
|
String |
CREATE_INDEX()
CREAT e_ index.
|
static String |
createGenericName(Object[] columnList)
Creates the generic name.
|
String |
DROP_INDEX()
DRO p_ index.
|
static String |
ensureIndexPreAndSuffix(String customIndexName)
Ensure index pre and suffix.
|
boolean |
equals(Object obj) |
List<Object> |
getColumnList()
Gets the column list.
|
String |
getColumnListString()
Gets the column list string.
|
String |
getCompareString()
Gets the compare string.
|
String |
getName()
Gets the name.
|
SqlTableIdentity |
getOwner()
Gets the owner.
|
SQL.INDEXTYPE |
getType()
Gets the type.
|
int |
hashCode() |
Iterator<Object> |
iterator() |
void |
resetHash()
Reset hash.
|
SqlIndex |
setName(String name)
Sets the name.
|
void |
setOwner(SqlTableIdentity owner)
Sets the owner.
|
IndexDefinition |
toIndexDefinition()
To index definition.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
protected static final String DROP_INDEX_
protected static final String _ON_TABLE_
protected String name
protected SqlTableIdentity owner
protected SQL.INDEXTYPE type
protected String hashString
protected int hashInt
public SqlIndex(String name, SqlTableIdentity owner, SQL.INDEXTYPE type, Object... columnList)
name
- the nameowner
- the ownertype
- the typecolumnList
- the column listpublic SqlIndex(SQL.INDEXTYPE type, Object... columnList)
type
- the typecolumnList
- the column listpublic void addColumn(Object column)
column
- the columnpublic String CREATE_INDEX()
public String DROP_INDEX()
public StringBuilder assembleTableClassCode(StringBuilder sb)
sb
- the sbpublic String assembleName()
public static String createGenericName(Object[] columnList)
columnList
- the column listpublic static String ensureIndexPreAndSuffix(String customIndexName)
customIndexName
- the custom index namepublic String getName()
public SqlIndex setName(String name)
name
- the namepublic SqlTableIdentity getOwner()
public void setOwner(SqlTableIdentity owner)
owner
- the new ownerprotected StringBuilder assembleColumnListString(StringBuilder sb)
sb
- the sbpublic String getColumnListString()
public String getCompareString()
public int hashCode()
hashCode
in class Object
Object.hashCode()
public String buildHash()
public void resetHash()
public boolean equals(Object obj)
equals
in class Object
obj
- Object.equals(java.lang.Object)
public SQL.INDEXTYPE getType()
public IndexDefinition toIndexDefinition()
Copyright © 2003–2022 XDEV Software. All rights reserved.