com.amazon.carbonado.spi
Class IndexInfoImpl

java.lang.Object
  extended by com.amazon.carbonado.spi.IndexInfoImpl
All Implemented Interfaces:
IndexInfo

public class IndexInfoImpl
extends Object
implements IndexInfo

Basic implementation of an IndexInfo.

Author:
Brian S O'Neill

Constructor Summary
IndexInfoImpl(String name, boolean unique, boolean clustered, String[] propertyNames, Direction[] propertyDirections)
           
 
Method Summary
 String getName()
          Returns the name of this index, or null if not applicable.
 Direction[] getPropertyDirections()
          Returns the directions of all the properties in this index.
 String[] getPropertyNames()
          Returns the properties in this index.
 boolean isClustered()
          Returns true if index is clustered, which means it defines the physical ordering of storables.
 boolean isUnique()
          Returns true if index entries are unique.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IndexInfoImpl

public IndexInfoImpl(String name,
                     boolean unique,
                     boolean clustered,
                     String[] propertyNames,
                     Direction[] propertyDirections)
Parameters:
name - optional name for index
unique - true if index requires unique values
propertyNames - required list of property names, must have at least one name
propertyDirections - optional property directions, may be null or same length as property names array
Throws:
IllegalArgumentException
Method Detail

getName

public String getName()
Description copied from interface: IndexInfo
Returns the name of this index, or null if not applicable.

Specified by:
getName in interface IndexInfo

isUnique

public boolean isUnique()
Description copied from interface: IndexInfo
Returns true if index entries are unique.

Specified by:
isUnique in interface IndexInfo

isClustered

public boolean isClustered()
Description copied from interface: IndexInfo
Returns true if index is clustered, which means it defines the physical ordering of storables.

Specified by:
isClustered in interface IndexInfo

getPropertyNames

public String[] getPropertyNames()
Description copied from interface: IndexInfo
Returns the properties in this index. The array might be empty, but it is never null. The array is a copy, and so it may be safely modified.

Specified by:
getPropertyNames in interface IndexInfo

getPropertyDirections

public Direction[] getPropertyDirections()
Description copied from interface: IndexInfo
Returns the directions of all the properties in this index. The length of the array matches the length returned by IndexInfo.getPropertyNames(). The array is a copy, and so it may be safely modified.

Specified by:
getPropertyDirections in interface IndexInfo

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2009 Amazon Technologies, Inc.. All Rights Reserved.