APIdia Launch Partner
Top Description Fields Constructors Methods
io.github.spannm.jackcess.impl

public Class TableUpdater

extends TableMutator
Class Inheritance
Imports
io.github.spannm.jackcess.ColumnBuilder, .DataType, .IndexBuilder, java.io.IOException, java.nio.ByteBuffer, java.util.ArrayList, .EnumSet, .HashSet, .List, .Set

Helper class used to maintain state during table mutation.

Field Summary

Modifier and TypeField and Description
private int
private TableMutator.ColumnState
private ColumnBuilder
private IndexImpl.ForeignKeyReference
private TableMutator.IndexDataState
private IndexBuilder
private final List<Integer>
private int
private final TableImpl

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ColumnImpl
public IndexImpl
pack-priv IndexImpl
addIndex(IndexBuilder newIndex, boolean isInternal, byte ignoreIdxFlags, byte ignoreColFlags)

pack-priv void
addTdefLen(int add)

pack-priv static IndexData
findIndexData(IndexBuilder idx, TableImpl table, byte ignoreIdxFlags, byte ignoreColFlags)

pack-priv int
public ColumnBuilder
private Set<String>
pack-priv short
public TableMutator.ColumnState
public IndexImpl.ForeignKeyReference
public IndexBuilder
public TableMutator.IndexDataState
pack-priv static Set<String>
getIndexNames(TableImpl table, boolean[] foundPk)

private short

Returns:

an id which no column of this table holds
getNextColumnId
()

Access assigns each column an id which it never reuses and never renumbers, so a table which has had a column deleted has gaps in its ids and its highest id can be past the last column number.

pack-priv List<Integer>
pack-priv String
public int
private void
initIndexDataState(byte ignoreIdxFlags, byte ignoreColFlags)

pack-priv boolean
isComplexColumn(String colName)

Implements abstract io.github.spannm.jackcess.impl.TableMutator.isComplexColumn.

Checks whether the named column holds a complex type.

pack-priv void
private static boolean
sameIndexData(IndexBuilder idx1, IndexData idx2, byte ignoreIdxFlags, byte ignoreColFlags)

private static boolean
pack-priv void
pack-priv void
setOrigTdefLen(int len)

private void
private void
pack-priv boolean
protected String
Inherited from io.github.spannm.jackcess.impl.TableMutator:
getColumnOffsetssetColumnOffsetsvalidateAutoNumberColumnvalidateColumnvalidateIndex

Field Detail

addedTdefLenback to summary
private int addedTdefLen
colStateback to summary
private TableMutator.ColumnState colState
columnback to summary
private ColumnBuilder column
fkReferenceback to summary
private IndexImpl.ForeignKeyReference fkReference
idxDataStateback to summary
private TableMutator.IndexDataState idxDataState
indexback to summary
private IndexBuilder index
nextPagesback to summary
private final List<Integer> nextPages
origTdefLenback to summary
private int origTdefLen
tableback to summary
private final TableImpl table

Constructor Detail

TableUpdaterback to summary
public TableUpdater(TableImpl table)

Method Detail

addColumnback to summary
public ColumnImpl addColumn(ColumnBuilder newColumn) throws IOException
addIndexback to summary
public IndexImpl addIndex(IndexBuilder newIndex) throws IOException
addIndexback to summary
pack-priv IndexImpl addIndex(IndexBuilder newIndex, boolean isInternal, byte ignoreIdxFlags, byte ignoreColFlags) throws IOException
addTdefLenback to summary
pack-priv void addTdefLen(int add)
findIndexDataback to summary
pack-priv static IndexData findIndexData(IndexBuilder idx, TableImpl table, byte ignoreIdxFlags, byte ignoreColFlags)
getAddedTdefLenback to summary
pack-priv int getAddedTdefLen()
getColumnback to summary
public ColumnBuilder getColumn()
getColumnNamesback to summary
private Set<String> getColumnNames()
getColumnNumberback to summary
pack-priv short getColumnNumber(String colName)

Implements abstract io.github.spannm.jackcess.impl.TableMutator.getColumnNumber.

Annotations
@Override
getColumnStateback to summary
public TableMutator.ColumnState getColumnState(ColumnBuilder col)

Implements abstract io.github.spannm.jackcess.impl.TableMutator.getColumnState.

Annotations
@Override
getForeignKeyback to summary
public IndexImpl.ForeignKeyReference getForeignKey(IndexBuilder idx)

Overrides io.github.spannm.jackcess.impl.TableMutator.getForeignKey.

Annotations
@Override
getIndexback to summary
public IndexBuilder getIndex()
getIndexDataStateback to summary
public TableMutator.IndexDataState getIndexDataState(IndexBuilder idx)

Implements abstract io.github.spannm.jackcess.impl.TableMutator.getIndexDataState.

Annotations
@Override
getIndexNamesback to summary
pack-priv static Set<String> getIndexNames(TableImpl table, boolean[] foundPk)
getNextColumnIdback to summary
private short getNextColumnId()

Access assigns each column an id which it never reuses and never renumbers, so a table which has had a column deleted has gaps in its ids and its highest id can be past the last column number.

Returns:short

an id which no column of this table holds

getNextPagesback to summary
pack-priv List<Integer> getNextPages()
getTableNameback to summary
pack-priv String getTableName()

Implements abstract io.github.spannm.jackcess.impl.TableMutator.getTableName.

Annotations
@Override
getTdefPageNumberback to summary
public int getTdefPageNumber()

Implements abstract io.github.spannm.jackcess.impl.TableMutator.getTdefPageNumber.

Annotations
@Override
initIndexDataStateback to summary
private void initIndexDataState(byte ignoreIdxFlags, byte ignoreColFlags)
isComplexColumnback to summary
pack-priv boolean isComplexColumn(String colName)

Implements abstract io.github.spannm.jackcess.impl.TableMutator.isComplexColumn.

Doc from io.github.spannm.jackcess.impl.TableMutator.isComplexColumn.

Checks whether the named column holds a complex type.

Annotations
@Override
resetTdefInfoback to summary
pack-priv void resetTdefInfo()
sameIndexDataback to summary
private static boolean sameIndexData(IndexBuilder idx1, IndexData idx2, byte ignoreIdxFlags, byte ignoreColFlags)
sameIndexDataback to summary
private static boolean sameIndexData(IndexBuilder.Column col1, IndexData.ColumnDescriptor col2, int ignoreColFlags)
setForeignKeyback to summary
pack-priv void setForeignKey(IndexImpl.ForeignKeyReference newFkReference)
setOrigTdefLenback to summary
pack-priv void setOrigTdefLen(int len)
validateAddColumnback to summary
private void validateAddColumn()
validateAddIndexback to summary
private void validateAddIndex()
validateUpdatedTdefback to summary
pack-priv boolean validateUpdatedTdef(ByteBuffer tableBuffer)
withErrorContextback to summary
protected String withErrorContext(String msg)

Implements abstract io.github.spannm.jackcess.impl.TableMutator.withErrorContext.

Annotations
@Override