com.f1j.data.query
Interface Index


public interface Index
extends Lockable

This interface provides the API for getting and setting the name of a query index, and getting and setting the fields being used by this query index.

Since:
12.0

Method Summary
 java.lang.String getName()
          Returns the name of this query index.
 java.lang.String[] getSortFields()
          Returns the fields that are being used for this index.
 boolean[] getSortOrders()
          Returns the sort order for each field being used for this index.
 void setName(java.lang.String name)
          Sets the name of this query index to the specified name.
 void setSortInfo(java.lang.String[] strFields, boolean[] ascending)
          Takes an array of fields that should be indexed, and an array of booleans indicating whether the fields should be sorted ascending or descending.
 
Methods inherited from interface com.f1j.util.Lockable
getLock, releaseLock
 

Method Detail

getName

public java.lang.String getName()
Returns the name of this query index.
Returns:
the name of this query index.
Since:
12.0

setName

public void setName(java.lang.String name)
             throws F1Exception
Sets the name of this query index to the specified name.
Parameters:
name - The new name to give this index.
Throws:
F1Exception - if the name is invalid.
Since:
12.0

setSortInfo

public void setSortInfo(java.lang.String[] strFields,
                        boolean[] ascending)
                 throws InvalidArgumentException
Takes an array of fields that should be indexed, and an array of booleans indicating whether the fields should be sorted ascending or descending.
Parameters:
strFields - Fields that are to be indexed.
ascending - Sort order for the fields.
Throws:
InvalidArgumentException - if either array is null or if the two arrays are not the same size.
Since:
12.0

getSortFields

public java.lang.String[] getSortFields()
Returns the fields that are being used for this index. The sort order for each field can be obtained by calling the getSortOrders method.
Returns:
the fields that are being used for this index.
Since:
12.0

getSortOrders

public boolean[] getSortOrders()
Returns the sort order for each field being used for this index. This is an array of booleans with true indicating that the field is sorted in ascending order.
Returns:
the sort order for each field in the index.
Since:
12.0