public class QueryPlanIndex
extends java.lang.Object
Constructor and Description |
---|
QueryPlanIndex(java.util.Map<TableLookupIndexReqKey,QueryPlanIndexItem> items) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
addIndex(java.lang.String[] indexProperties,
java.lang.Class[] coercionTypes)
Add an index specification element.
|
java.lang.Class[] |
getCoercionTypes(java.lang.String[] indexProperties)
Returns a list of coercion types for a given index.
|
protected TableLookupIndexReqKey |
getFirstIndexNum() |
protected Pair<TableLookupIndexReqKey,int[]> |
getIndexNum(java.lang.String[] indexProps,
java.lang.String[] rangeProps)
Find a matching index for the property names supplied.
|
java.lang.String[][] |
getIndexProps()
For testing - Returns property names of all indexes.
|
java.util.Map<TableLookupIndexReqKey,QueryPlanIndexItem> |
getItems() |
static QueryPlanIndex |
makeIndex(java.util.List<QueryPlanIndexItem> indexesSet) |
static QueryPlanIndex |
makeIndex(QueryPlanIndexItem... items) |
static QueryPlanIndex |
makeIndexTableAccess(TableLookupIndexReqKey indexName) |
static java.lang.String |
print(QueryPlanIndex[] indexSpecs)
Print index specifications in readable format.
|
void |
setCoercionTypes(java.lang.String[] indexProperties,
java.lang.Class[] coercionTypes)
Sets the coercion types for a given index.
|
java.lang.String |
toString() |
public QueryPlanIndex(java.util.Map<TableLookupIndexReqKey,QueryPlanIndexItem> items)
public java.util.Map<TableLookupIndexReqKey,QueryPlanIndexItem> getItems()
public static QueryPlanIndex makeIndex(QueryPlanIndexItem... items)
public static QueryPlanIndex makeIndex(java.util.List<QueryPlanIndexItem> indexesSet)
protected Pair<TableLookupIndexReqKey,int[]> getIndexNum(java.lang.String[] indexProps, java.lang.String[] rangeProps)
indexProps
- - property names to search forrangeProps
- - range propsprotected TableLookupIndexReqKey getFirstIndexNum()
public java.lang.String addIndex(java.lang.String[] indexProperties, java.lang.Class[] coercionTypes)
indexProperties
- - list of property names to indexcoercionTypes
- - list of coercion types if required, or null if no coercion requiredpublic java.lang.String[][] getIndexProps()
public java.lang.Class[] getCoercionTypes(java.lang.String[] indexProperties)
indexProperties
- is the index field namespublic void setCoercionTypes(java.lang.String[] indexProperties, java.lang.Class[] coercionTypes)
indexProperties
- is the index property namescoercionTypes
- is the coercion typespublic java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String print(QueryPlanIndex[] indexSpecs)
indexSpecs
- - define indexespublic static QueryPlanIndex makeIndexTableAccess(TableLookupIndexReqKey indexName)