Interface Index

  • All Known Implementing Classes:
    IndexImpl

    public interface Index
    Access database index definition. A Table has a list of Index instances. Indexes can enable fast searches and ordered traversal on a Table (for the indexed columns). These features can be utilized via an IndexCursor.
    Author:
    James Ahlborn
    Usage:
    General: This class is general use.
    • Method Detail

      • getTable

        Table getTable()
      • isPrimaryKey

        boolean isPrimaryKey()
      • isForeignKey

        boolean isForeignKey()
      • getColumnCount

        int getColumnCount()
        Usage:
        General: This method is general use.
      • getColumns

        List<? extends Index.Column> getColumns()
        Returns:
        the Columns for this index (unmodifiable)
      • getReferencedIndex

        Index getReferencedIndex()
                          throws IOException
        Returns:
        the Index referenced by this Index's ForeignKeyReference (if it has one), otherwise null.
        Throws:
        IOException
      • shouldIgnoreNulls

        boolean shouldIgnoreNulls()
        Whether or not null values are actually recorded in the index.
      • isUnique

        boolean isUnique()
        Whether or not index entries must be unique.

        Some notes about uniqueness:

        • Access does not seem to consider multiple null entries invalid for a unique index
        • text indexes collapse case, and Access seems to compare only the index entry bytes, therefore two strings which differ only in case will violate the unique constraint
      • isRequired

        boolean isRequired()
        Whether or not values are required for index columns.
      • getProperties

        PropertyMap getProperties()
                           throws IOException
        Returns the properties for this index. An index has a property block of its own, separate from the block of the column it is named after.
        Throws:
        IOException
      • newCursor

        CursorBuilder newCursor()
        Convenience method for constructing a new CursorBuilder for this Index.