org.teiid.metadata.index
Class SimpleIndexUtil

java.lang.Object
  extended by org.teiid.metadata.index.SimpleIndexUtil

public class SimpleIndexUtil
extends Object

IndexUtil


Field Summary
static boolean CASE_SENSITIVE_INDEX_FILE_NAMES
           
 
Constructor Summary
SimpleIndexUtil()
           
 
Method Summary
static Index[] getIndexes(String indexName, Index[] indexes)
          Return an array of indexes given a indexName.
static String getIndexFileNameForRecordType(char recordType)
          Return the name of the index file to use for the specified record type, applies only for sever and vdb index files.
static IEntryResult[] queryIndex(Index[] indexes, char[] pattern, boolean isPrefix, boolean isCaseSensitive, boolean returnFirstMatch)
          Return all index file records that match the specified record prefix or pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CASE_SENSITIVE_INDEX_FILE_NAMES

public static final boolean CASE_SENSITIVE_INDEX_FILE_NAMES
See Also:
Constant Field Values
Constructor Detail

SimpleIndexUtil

public SimpleIndexUtil()
Method Detail

queryIndex

public static IEntryResult[] queryIndex(Index[] indexes,
                                        char[] pattern,
                                        boolean isPrefix,
                                        boolean isCaseSensitive,
                                        boolean returnFirstMatch)
                                 throws TeiidException
Return all index file records that match the specified record prefix or pattern. The pattern can be constructed from any combination of characters including the multiple character wildcard '*' and single character wildcard '?'. The prefix may be constructed from any combination of characters excluding the wildcard characters. The prefix specifies a fixed number of characters that the index record must start with.

Parameters:
monitor - an optional ProgressMonitor
indexes - the array of MtkIndex instances to query
pattern -
Returns:
results
Throws:
MetamatrixCoreException
TeiidException

getIndexes

public static Index[] getIndexes(String indexName,
                                 Index[] indexes)
Return an array of indexes given a indexName.

Parameters:
indexName - The shortName of the index file
selector - The indexSelector to lookup indexes
Returns:
An array of indexes, may be duplicates depending on index selector.
Throws:
MetamatrixCoreException - If there is an error looking up indexes
Since:
4.2

getIndexFileNameForRecordType

public static String getIndexFileNameForRecordType(char recordType)
Return the name of the index file to use for the specified record type, applies only for sever and vdb index files.

Parameters:
recordType -
Returns:


Copyright © 2011. All Rights Reserved.