APIdia Launch Partner
Top Description Inners Methods
io.github.spannm.jackcess

public Interface Index

Known Direct Implementers
io.github.spannm.jackcess.impl.IndexImpl
Imports
java.io.IOException, java.util.List

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.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
Index.Column

Information about a Column in an Index

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the number of columns covered by this index
getColumnCount
()

Returns the number of columns covered by this index.

public List<? extends Index.Column>

Returns:

the Columns for this index (unmodifiable)
getColumns
()

Returns the Columns for this index (unmodifiable).

public String

Returns:

the name of this index
getName
()

Returns the name of this index.

public Index

Returns:

the Index referenced by this Index's ForeignKeyReference (if it has one), otherwise null.
getReferencedIndex
()

Returns the Index referenced by this Index's ForeignKeyReference (if it has one), otherwise null.

public Table

Returns:

the table to which this index belongs
getTable
()

Returns the table to which this index belongs.

public boolean

Returns:

true if this index backs a foreign key relationship
isForeignKey
()

Returns true if this index backs a foreign key relationship.

public boolean

Returns:

true if this index is the primary key index for its table
isPrimaryKey
()

Returns true if this index is the primary key index for its table.

public boolean
isRequired()

Whether or not values are required for index columns.

public boolean
isUnique()

Whether or not index entries must be unique.

public CursorBuilder
newCursor()

Convenience method for constructing a new CursorBuilder for this Index.

public boolean
shouldIgnoreNulls()

Whether or not null values are actually recorded in the index.

Method Detail

getColumnCountback to summary
public int getColumnCount()

Returns the number of columns covered by this index.

Returns:int

the number of columns covered by this index

getColumnsback to summary
public List<? extends Index.Column> getColumns()

Returns the Columns for this index (unmodifiable).

Returns:List<? extends Index.Column>

the Columns for this index (unmodifiable)

getNameback to summary
public String getName()

Returns the name of this index.

Returns:String

the name of this index

getReferencedIndexback to summary
public Index getReferencedIndex() throws IOException

Returns the Index referenced by this Index's ForeignKeyReference (if it has one), otherwise null.

Returns:Index

the Index referenced by this Index's ForeignKeyReference (if it has one), otherwise null.

getTableback to summary
public Table getTable()

Returns the table to which this index belongs.

Returns:Table

the table to which this index belongs

isForeignKeyback to summary
public boolean isForeignKey()

Returns true if this index backs a foreign key relationship.

Returns:boolean

true if this index backs a foreign key relationship

isPrimaryKeyback to summary
public boolean isPrimaryKey()

Returns true if this index is the primary key index for its table.

Returns:boolean

true if this index is the primary key index for its table

isRequiredback to summary
public boolean isRequired()

Whether or not values are required for index columns.

isUniqueback to summary
public 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
newCursorback to summary
public CursorBuilder newCursor()

Convenience method for constructing a new CursorBuilder for this Index.

shouldIgnoreNullsback to summary
public boolean shouldIgnoreNulls()

Whether or not null values are actually recorded in the index.

io.github.spannm.jackcess back to summary

public Interface Index.Column

Known Direct Implementers
io.github.spannm.jackcess.impl.IndexData.ColumnDescriptor

Information about a Column in an Index

Method Summary

Modifier and TypeMethod and Description
public Column

Returns:

the underlying table column referenced by this index column
getColumn
()

Returns the underlying table column referenced by this index column.

public int

Returns:

the position of this column within the index (not to be confused with the underlying table column's own io.github.spannm.jackcess.Column#getColumnIndex())
getColumnIndex
()

Returns the position of this column within the index (not to be confused with the underlying table column's own io.github.spannm.jackcess.Column#getColumnIndex()).

public String

Returns:

the name of the underlying table column, equivalent to getColumn().getName()
getName
()

Returns the name of the underlying table column, equivalent to getColumn().getName().

public boolean

Returns:

true if this index column sorts in ascending order, false if descending
isAscending
()

Returns true if this index column sorts in ascending order, false if descending.

Method Detail

getColumnback to summary
public Column getColumn()

Returns the underlying table column referenced by this index column.

Returns:Column

the underlying table column referenced by this index column

getColumnIndexback to summary
public int getColumnIndex()

Returns the position of this column within the index (not to be confused with the underlying table column's own io.github.spannm.jackcess.Column#getColumnIndex()).

Returns:int

the position of this column within the index (not to be confused with the underlying table column's own io.github.spannm.jackcess.Column#getColumnIndex())

getNameback to summary
public String getName()

Returns the name of the underlying table column, equivalent to getColumn().getName().

Returns:String

the name of the underlying table column, equivalent to getColumn().getName()

isAscendingback to summary
public boolean isAscending()

Returns true if this index column sorts in ascending order, false if descending.

Returns:boolean

true if this index column sorts in ascending order, false if descending