Class IndexDescriptorImpl

java.lang.Object
org.apache.derby.catalog.types.IndexDescriptorImpl
All Implemented Interfaces:
Externalizable, Serializable, IndexDescriptor, Formatable, TypedFormat

public class IndexDescriptorImpl extends Object implements IndexDescriptor, Formatable
See also IndexRowGenerator.

For a description of how deferrable and non-deferrable constraints are backed differently, including the meaning of the boolean attributes used here, see IndexDescriptor.

See Also:
  • Field Details

    • isUnique

      private boolean isUnique
      This class implements Formatable. That means that it can write itself to and from a formatted stream. If you add more fields to this class, make sure that you also write/read them with the writeExternal()/readExternal() methods. If, in between releases, you add more fields to this class, then you should bump the version number emitted by the getTypeFormatId() method.
    • baseColumnPositions

      private int[] baseColumnPositions
    • isAscending

      private boolean[] isAscending
    • numberOfOrderedColumns

      private int numberOfOrderedColumns
    • indexType

      private String indexType
    • isUniqueWithDuplicateNulls

      private boolean isUniqueWithDuplicateNulls
    • isUniqueDeferrable

      private boolean isUniqueDeferrable
      The index represents a PRIMARY KEY or a UNIQUE NOT NULL constraint which is deferrable. true implies isUnique == false and isUniqueWithDuplicateNulls == false and hasDeferrableChecking == true.
    • hasDeferrableChecking

      private boolean hasDeferrableChecking
      The index represents a constraint which is deferrable.
  • Constructor Details

    • IndexDescriptorImpl

      public IndexDescriptorImpl(String indexType, boolean isUnique, boolean isUniqueWithDuplicateNulls, boolean isUniqueDeferrable, boolean hasDeferrableChecking, int[] baseColumnPositions, boolean[] isAscending, int numberOfOrderedColumns)
      Constructor for an IndexDescriptorImpl
      Parameters:
      indexType - The type of index
      isUnique - True means the index is unique
      isUniqueWithDuplicateNulls - True means the index will be unique for non null values but duplicate nulls will be allowed. This parameter has no effect if the isUnique is true. If isUnique is false and isUniqueWithDuplicateNulls is set to true the index will allow duplicate nulls but for non null keys will act like a unique index.
      isUniqueDeferrable - True means the index represents a PRIMARY KEY or a UNIQUE NOT NULL constraint which is deferrable.
      hasDeferrableChecking - True if this index supports a deferrable constraint.
      baseColumnPositions - An array of column positions in the base table. Each index column corresponds to a column position in the base table.
      isAscending - An array of booleans telling asc/desc on each column.
      numberOfOrderedColumns - In the future, it will be possible to store non-ordered columns in an index. These will be useful for covered queries.
    • IndexDescriptorImpl

      public IndexDescriptorImpl()
      Zero-argument constructor for Formatable interface
  • Method Details