|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ujorm.orm.ao.IndexModelBuilder
public class IndexModelBuilder
The database index model builder. The builder sorts columns of the composite index
according the natural order of Keys in the Ujo class
See the next example to create a composite index with two columns with a natural order:
@Column(index = IDX_STATE_NOTE) public static final Key<XOrder, State> STATE = newKey(); @Column(index = IDX_STATE_NOTE) public static final Key<XOrder, Integer> COUNT = newKey();The builder class can be changed by the parameter
MetaParams.INDEX_MODEL_BUILDER.
IndexModelOrderedBuilder,
MetaParams.INDEX_MODEL_BUILDER| Field Summary | |
|---|---|
protected Map<String,MetaIndex> |
mapIndex
Map a MetaIndex for an index name (case insensitive) |
protected MetaTable |
metaTable
MetaTable |
protected SqlNameProvider |
nameProvider
SQL name provider |
| Constructor Summary | |
|---|---|
IndexModelBuilder()
|
|
| Method Summary | |
|---|---|
protected void |
addColumnsToIndex()
Add columns to index |
protected void |
addIndex(String indexName,
MetaColumn column,
boolean unique)
Add the column model to the index model from the IndexMap according the index name (case insensitive) |
Collection<MetaIndex> |
getIndexModels()
Returns all indexes of the current table |
void |
init(MetaTable metaTable)
Initialize the object |
protected Boolean |
isExtendedIndexStrategy()
Is an extended index naming strategy |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected MetaTable metaTable
protected SqlNameProvider nameProvider
protected Map<String,MetaIndex> mapIndex
| Constructor Detail |
|---|
public IndexModelBuilder()
| Method Detail |
|---|
public void init(MetaTable metaTable)
throws IllegalStateException
IllegalStateException
protected void addIndex(String indexName,
MetaColumn column,
boolean unique)
indexName - Case sensitive index namecolumn - Column modelunique - Unique index requestpublic Collection<MetaIndex> getIndexModels()
protected void addColumnsToIndex()
protected Boolean isExtendedIndexStrategy()
MoreParams.EXTENTED_INDEX_NAME_STRATEGY
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||