Index. See TableBuilder for example usage. Additionally, an
Index can be added to an existing Table using the addToTable(Table) method.
TableBuilder
| Modifier and Type | Class and Description |
|---|---|
| public static class | IndexBuilder.
Information about a column in this index (name and ordering). |
| Modifier and Type | Field and Description |
|---|---|
| private final List | columns
the names and orderings of the indexed columns |
| private byte | flags
additional index flags (UNKNOWN_INDEX_FLAG always seems to be set in access 2000+) |
| private int | indexNumber
0-based index number |
| private String | name
name of the new index |
| public static final String | PRIMARY_KEY_NAME
name typically used by MS Access for the primary key index |
| private byte | type
the type of the index |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Index | addToTable(Table table)
Adds a new Index to the given Table with the currently configured attributes. |
| public Index | addToTableDefinition(TableDefinition table)
Adds a new Index to the given TableDefinition with the currently configured attributes. |
| public List | |
| public byte | |
| public int | |
| public String | |
| public byte | |
| public boolean | |
| public boolean | |
| public boolean | |
| public void | |
| public String | |
| public void | |
| public IndexBuilder | |
| public IndexBuilder | withColumns(boolean ascending, String... names)
Adds the columns with the given ordering to the index. |
| public IndexBuilder | |
| public IndexBuilder | |
| private String | |
| public IndexBuilder | |
| public IndexBuilder | |
| public IndexBuilder | withPrimaryKey()
Sets this index to be a primary key index (additionally sets the index as unique and required). |
| public IndexBuilder | |
| public IndexBuilder | |
| public IndexBuilder |
| columns | back to summary |
|---|---|
| private final List<IndexBuilder. the names and orderings of the indexed columns | |
| flags | back to summary |
|---|---|
| private byte flags additional index flags (UNKNOWN_INDEX_FLAG always seems to be set in access 2000+) | |
| indexNumber | back to summary |
|---|---|
| private int indexNumber 0-based index number | |
| name | back to summary |
|---|---|
| private String name name of the new index | |
| PRIMARY_KEY_NAME | back to summary |
|---|---|
| public static final String PRIMARY_KEY_NAME name typically used by MS Access for the primary key index | |
| type | back to summary |
|---|---|
| private byte type the type of the index | |
| IndexBuilder | back to summary |
|---|---|
| public IndexBuilder(String name) | |
| addToTable | back to summary |
|---|---|
| public Index addToTable(Table table) throws IOException Adds a new Index to the given Table with the currently configured attributes. | |
| addToTableDefinition | back to summary |
|---|---|
| public Index addToTableDefinition(TableDefinition table) throws IOException Adds a new Index to the given TableDefinition with the currently configured attributes. | |
| getColumns | back to summary |
|---|---|
| public List | |
| getFlags | back to summary |
|---|---|
| public byte getFlags() | |
| getIndexNumber | back to summary |
|---|---|
| public int getIndexNumber() | |
| getName | back to summary |
|---|---|
| public String getName() | |
| getType | back to summary |
|---|---|
| public byte getType() | |
| isIgnoreNulls | back to summary |
|---|---|
| public boolean isIgnoreNulls() | |
| isPrimaryKey | back to summary |
|---|---|
| public boolean isPrimaryKey() | |
| isUnique | back to summary |
|---|---|
| public boolean isUnique() | |
| setIndexNumber | back to summary |
|---|---|
| public void setIndexNumber(int newIndexNumber) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| validate | back to summary |
|---|---|
| public void validate(Set<String> tableColNames, JetFormat format) Checks that this index definition is valid.
| |
| withColumns | back to summary |
|---|---|
| public IndexBuilder withColumns(String... names) Adds the columns with ASCENDING ordering to the index. | |
| withColumns | back to summary |
|---|---|
| public IndexBuilder withColumns(boolean ascending, String... names) Adds the columns with the given ordering to the index. | |
| withColumns | back to summary |
|---|---|
| public IndexBuilder withColumns(Iterable<String> names) | |
| withColumns | back to summary |
|---|---|
| public IndexBuilder withColumns(boolean ascending, Iterable<String> names) | |
| withErrorContext | back to summary |
|---|---|
| private String withErrorContext(String msg) | |
| withIgnoreNulls | back to summary |
|---|---|
| public IndexBuilder withIgnoreNulls() Sets this index to ignore null values. | |
| withName | back to summary |
|---|---|
| public IndexBuilder withName(String newName) Sets the name of the index. | |
| withPrimaryKey | back to summary |
|---|---|
| public IndexBuilder withPrimaryKey() Sets this index to be a primary key index (additionally sets the index as unique and required). | |
| withRequired | back to summary |
|---|---|
| public IndexBuilder withRequired() Sets this index to enforce required. | |
| withType | back to summary |
|---|---|
| public IndexBuilder withType(byte newType) | |
| withUnique | back to summary |
|---|---|
| public IndexBuilder withUnique() Sets this index to enforce uniqueness. | |
| Modifier and Type | Field and Description |
|---|---|
| private final byte | flags
column flags (ordering) |
| private String | name
name of the column to be indexed |
| Modifier and Type | Method and Description |
|---|---|
| public byte | |
| public String | |
| public boolean | |
| public String | |
| public IndexBuilder. |
| flags | back to summary |
|---|---|
| private final byte flags column flags (ordering) | |
| name | back to summary |
|---|---|
| private String name name of the column to be indexed | |
| Column | back to summary |
|---|---|
| private Column(String name, boolean ascending) | |
| getFlags | back to summary |
|---|---|
| public byte getFlags() | |
| getName | back to summary |
|---|---|
| public String getName() | |
| isAscending | back to summary |
|---|---|
| public boolean isAscending() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| withName | back to summary |
|---|---|
| public IndexBuilder. | |