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