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

pack-priv Class LongValueColumnImpl

extends ColumnImpl
Class Inheritance
Known Direct Subclasses
io.github.spannm.jackcess.impl.MemoColumnImpl
Imports
io.github.spannm.jackcess.InvalidValueException, .JackcessRuntimeException, java.io.IOException, java.nio.ByteBuffer, .ByteOrder, java.util.Collection, java.util.logging.Level

ColumnImpl subclass which is used for long value data types.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
LongValueColumnImpl.LegacyLongValueBufferHolder

Manages a common, shared extra page for long values.

private abstract class
LongValueColumnImpl.LongValueBufferHolder

Manages secondary page buffers for long value writing.

private class
LongValueColumnImpl.UmapLongValueBufferHolder

Manages the column usage maps for long values.

Field Summary

Modifier and TypeField and Description
private static final int
LONG_VALUE_TYPE_MASK

Mask to apply the long length in order to get the flag bits (only the first 2 bits are type flags).

private static final byte
LONG_VALUE_TYPE_OTHER_PAGE

Long value (LVAL) type that indicates that the value is stored on another page

private static final byte
LONG_VALUE_TYPE_OTHER_PAGES

Long value (LVAL) type that indicates that the value is stored on multiple other pages

private static final byte
LONG_VALUE_TYPE_THIS_PAGE

Long value (LVAL) type that indicates that the value is stored on the same page

private LongValueColumnImpl.LongValueBufferHolder
lvalBufferH

Holds additional info for writing long values

private int
Inherited from io.github.spannm.jackcess.impl.ColumnImpl:
AUTO_NUMBER_FLAG_MASKAUTO_NUMBER_GUID_FLAG_MASKBASE_LDBASE_LDTBASE_LTCOMPLEX_FK_EXT_FLAG_MASKCOMPRESSED_UNICODE_EXT_FLAG_MASKFIXED_LEN_FLAG_MASKGENERAL_97_SORT_ORDERGENERAL_LEGACY_SORT_ORDERGENERAL_SORT_ORDERHYPERLINK_FLAG_MASKINVALID_AUTO_NUMBERINVALID_LENGTHLDT_DATE_TIME_FACTORYLOGGERMILLIS_BETWEEN_EPOCH_AND_1900NUMERIC_NEGATIVE_BYTERETURN_ROW_IDRUSSIAN_SORT_ORDERTURKISH_SORT_ORDERUKRAINIAN_SORT_ORDERUPDATABLE_FLAG_MASK

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected int
pack-priv void
protected final int
public int
getOwnedPageCount()

Overrides io.github.spannm.jackcess.impl.ColumnImpl.getOwnedPageCount.

Returns the number of database pages owned by this column.

pack-priv void
postTableLoadInit()

Overrides io.github.spannm.jackcess.impl.ColumnImpl.postTableLoadInit.

Secondary column initialization after the table is fully loaded.

public Object
read(byte[] data, ByteOrder order)

Overrides io.github.spannm.jackcess.impl.ColumnImpl.read.

Deserialize a raw byte value for this column into an Object

private String
readLongStringValue(byte[]
Column value that points to an LVAL record
lvalDefinition
)

Returns: The LVAL data

protected byte[]

Returns:

The LVAL data
readLongValue
(byte[]
Column value that points to an LVAL record
lvalDefinition
)

Returns the LVAL data.

pack-priv void
setUsageMaps(UsageMap ownedPages, UsageMap freeSpacePages)

Overrides io.github.spannm.jackcess.impl.ColumnImpl.setUsageMaps.

Sets the usage maps for this column.

protected ByteBuffer

Returns:

A buffer containing the LVAL definition and (possibly) the column value (unless written to other pages)
writeLongValue
(byte[]
Value of the LVAL column
value
,
int remainingRowLength)

Write an LVAL column into a ByteBuffer inline if it fits, otherwise in other data page(s).

protected ByteBuffer
Inherited from io.github.spannm.jackcess.impl.ColumnImpl:
booleanToIntegercalcLengthInUnitscompareTocountVariableLengthcreatedecodeTextValuedecodeUncompressedTextencodeTextValueencodeUncompressedTextfromDateDoublefromLocalDateDoublegenerateDefaultValuegetAutoNumberGeneratorgetCalculationContextgetCharsetgetColumnIdgetColumnIndexgetColumnNumbergetColumnValidatorgetComplexInfogetDatabasegetDateTimeFactorygetDateTimeFactorygetDisplayIndexgetFixedDataOffsetgetFixedDataSizegetFormatgetLengthgetLengthInUnitsgetNamegetOriginalDataTypegetPageChannelgetPrecisiongetPropertiesgetRowValuegetRowValuegetScalegetSQLTypegetTablegetTextCodePagegetTextSortOrdergetTimeZonegetTypegetVarLenTableIndexgetVersionHistoryColumngetZoneIdinitColumnValidatorisAppendOnlyisAutoNumberisCalculatedisComplexValueForeignKeyisCompressedUnicodeisGUIDValueisHyperlinkisImmutableValueisRawDataisThisColumnisVariableLengthldtFromLocalDateDoublepropertiesUpdatedrawDataWrapperreadreadCodePagereadExtraFlagsreadFromNullMaskreadSortOrderreloadPropertiesValidatorssetCalcColEvalContextsetColumnIndexsetColumnValidatorsetRowValuesetRowValuesetVersionHistoryColumnstoreInNullMasktoBigDecimaltoBigDecimaltoBigDecimaltoBooleanValuetoByteArraytoCharSequencetoDateDoubletoDateDoubletoInternalValuetoInternalValuetoLocalDateDoubletoLocalDateTimetoStringtoUnscaledByteArrayvalidatewithErrorContextwritewritewriteColUsageMapDefinitionwriteColUsageMapDefinitionswriteDefinitionwriteDefinitionswriteFixedLengthFieldwriteFixedLengthFieldwriteToNullMask

Field Detail

LONG_VALUE_TYPE_MASKback to summary
private static final int LONG_VALUE_TYPE_MASK

Mask to apply the long length in order to get the flag bits (only the first 2 bits are type flags).

LONG_VALUE_TYPE_OTHER_PAGEback to summary
private static final byte LONG_VALUE_TYPE_OTHER_PAGE

Long value (LVAL) type that indicates that the value is stored on another page

LONG_VALUE_TYPE_OTHER_PAGESback to summary
private static final byte LONG_VALUE_TYPE_OTHER_PAGES

Long value (LVAL) type that indicates that the value is stored on multiple other pages

LONG_VALUE_TYPE_THIS_PAGEback to summary
private static final byte LONG_VALUE_TYPE_THIS_PAGE

Long value (LVAL) type that indicates that the value is stored on the same page

lvalBufferHback to summary
private LongValueColumnImpl.LongValueBufferHolder lvalBufferH

Holds additional info for writing long values

maxLenInUnitsback to summary
private int maxLenInUnits

Constructor Detail

LongValueColumnImplback to summary
pack-priv LongValueColumnImpl(ColumnImpl.InitArgs args)

Method Detail

calcMaxLengthInUnitsback to summary
protected int calcMaxLengthInUnits()
collectUsageMapPagesback to summary
pack-priv void collectUsageMapPages(Collection<Integer> pages)

Overrides io.github.spannm.jackcess.impl.ColumnImpl.collectUsageMapPages.

Annotations
@Override
getMaxLengthInUnitsback to summary
protected final int getMaxLengthInUnits()
getOwnedPageCountback to summary
public int getOwnedPageCount()

Overrides io.github.spannm.jackcess.impl.ColumnImpl.getOwnedPageCount.

Doc from io.github.spannm.jackcess.impl.ColumnImpl.getOwnedPageCount.

Returns the number of database pages owned by this column.

Annotations
@Override
postTableLoadInitback to summary
pack-priv void postTableLoadInit() throws IOException

Overrides io.github.spannm.jackcess.impl.ColumnImpl.postTableLoadInit.

Doc from io.github.spannm.jackcess.impl.ColumnImpl.postTableLoadInit.

Secondary column initialization after the table is fully loaded.

Annotations
@Override
readback to summary
public Object read(byte[] data, ByteOrder order) throws IOException

Overrides io.github.spannm.jackcess.impl.ColumnImpl.read.

Doc from io.github.spannm.jackcess.impl.ColumnImpl.read.

Deserialize a raw byte value for this column into an Object

Annotations
@Override
readLongStringValueback to summary
private String readLongStringValue(byte[] lvalDefinition) throws IOException
Parameters
lvalDefinition:byte[]

Column value that points to an LVAL record

Returns:String

The LVAL data

readLongValueback to summary
protected byte[] readLongValue(byte[] lvalDefinition) throws IOException

Returns the LVAL data.

Parameters
lvalDefinition:byte[]

Column value that points to an LVAL record

Returns:byte[]

The LVAL data

setUsageMapsback to summary
pack-priv void setUsageMaps(UsageMap ownedPages, UsageMap freeSpacePages)

Overrides io.github.spannm.jackcess.impl.ColumnImpl.setUsageMaps.

Doc from io.github.spannm.jackcess.impl.ColumnImpl.setUsageMaps.

Sets the usage maps for this column.

Annotations
@Override
writeLongValueback to summary
protected ByteBuffer writeLongValue(byte[] value, int remainingRowLength) throws IOException

Write an LVAL column into a ByteBuffer inline if it fits, otherwise in other data page(s).

Parameters
value:byte[]

Value of the LVAL column

Returns:ByteBuffer

A buffer containing the LVAL definition and (possibly) the column value (unless written to other pages)

writeRealDataback to summary
protected ByteBuffer writeRealData(Object obj, int remainingRowLength, ByteOrder order) throws IOException

Overrides io.github.spannm.jackcess.impl.ColumnImpl.writeRealData.

Annotations
@Override
io.github.spannm.jackcess.impl back to summary

private final Class LongValueColumnImpl.LegacyLongValueBufferHolder

extends LongValueBufferHolder
Class Inheritance

Manages a common, shared extra page for long values. This is legacy behavior from before it was understood that there were additional usage maps for each columns.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
protected TempPageHolder
Inherited from io.github.spannm.jackcess.impl.LongValueColumnImpl.LongValueBufferHolder:
clearcollectUsageMapPagesfindNewPagegetLongValuePagegetOwnedPageCountgetPageNumber

Constructor Detail

LegacyLongValueBufferHolderback to summary
private LegacyLongValueBufferHolder()

Method Detail

getBufferHolderback to summary
protected TempPageHolder getBufferHolder()

Implements abstract io.github.spannm.jackcess.impl.LongValueColumnImpl.LongValueBufferHolder.getBufferHolder.

Annotations
@Override
io.github.spannm.jackcess.impl back to summary

private abstract Class LongValueColumnImpl.LongValueBufferHolder

extends Object
Class Inheritance
  • java.lang.Object
  • io.github.spannm.jackcess.impl.LongValueColumnImpl.LongValueBufferHolder
Known Direct Subclasses
io.github.spannm.jackcess.impl.LongValueColumnImpl.LegacyLongValueBufferHolder, io.github.spannm.jackcess.impl.LongValueColumnImpl.UmapLongValueBufferHolder

Manages secondary page buffers for long value writing.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
clear()

Discards the current the current long value data page.

public void
protected ByteBuffer
findNewPage(int dataLength)

protected abstract TempPageHolder
public ByteBuffer
getLongValuePage(int dataLength)

Returns a long value data page with space for data of the given length.

public int
public int
getPageNumber()

Returns the page number of the current long value data page.

private void
writeLongValueHeader(ByteBuffer lvalPage)

Writes the header info for a long value page.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

LongValueBufferHolderback to summary
private LongValueBufferHolder()

Method Detail

clearback to summary
public void clear() throws IOException

Discards the current the current long value data page.

collectUsageMapPagesback to summary
public void collectUsageMapPages(Collection<Integer> pages)
findNewPageback to summary
protected ByteBuffer findNewPage(int dataLength) throws IOException
getBufferHolderback to summary
protected abstract TempPageHolder getBufferHolder()
getLongValuePageback to summary
public ByteBuffer getLongValuePage(int dataLength) throws IOException

Returns a long value data page with space for data of the given length.

getOwnedPageCountback to summary
public int getOwnedPageCount()
getPageNumberback to summary
public int getPageNumber()

Returns the page number of the current long value data page.

writeLongValueHeaderback to summary
private void writeLongValueHeader(ByteBuffer lvalPage)

Writes the header info for a long value page.

io.github.spannm.jackcess.impl back to summary

private final Class LongValueColumnImpl.UmapLongValueBufferHolder

extends LongValueBufferHolder
Class Inheritance

Manages the column usage maps for long values.

Field Summary

Modifier and TypeField and Description
private final UsageMap
freeSpacePages

Usage map of pages that this column owns with free space on them

private final TempPageHolder
longValueBufferH

page buffer used to write "long value" data

private final UsageMap
ownedPages

Usage map of pages that this column owns

Constructor Summary

AccessConstructor and Description
private
UmapLongValueBufferHolder(UsageMap ownedPages, UsageMap freeSpacePages)

Method Summary

Modifier and TypeMethod and Description
public void
clear()

Overrides io.github.spannm.jackcess.impl.LongValueColumnImpl.LongValueBufferHolder.clear.

Discards the current the current long value data page.

public void
protected ByteBuffer
protected TempPageHolder
public int
Inherited from io.github.spannm.jackcess.impl.LongValueColumnImpl.LongValueBufferHolder:
getLongValuePagegetPageNumber

Field Detail

freeSpacePagesback to summary
private final UsageMap freeSpacePages

Usage map of pages that this column owns with free space on them

longValueBufferHback to summary
private final TempPageHolder longValueBufferH

page buffer used to write "long value" data

ownedPagesback to summary
private final UsageMap ownedPages

Usage map of pages that this column owns

Constructor Detail

UmapLongValueBufferHolderback to summary
private UmapLongValueBufferHolder(UsageMap ownedPages, UsageMap freeSpacePages)

Method Detail

clearback to summary
public void clear() throws IOException

Overrides io.github.spannm.jackcess.impl.LongValueColumnImpl.LongValueBufferHolder.clear.

Doc from io.github.spannm.jackcess.impl.LongValueColumnImpl.LongValueBufferHolder.clear.

Discards the current the current long value data page.

Annotations
@Override
collectUsageMapPagesback to summary
public void collectUsageMapPages(Collection<Integer> pages)

Overrides io.github.spannm.jackcess.impl.LongValueColumnImpl.LongValueBufferHolder.collectUsageMapPages.

Annotations
@Override
findNewPageback to summary
protected ByteBuffer findNewPage(int dataLength) throws IOException

Overrides io.github.spannm.jackcess.impl.LongValueColumnImpl.LongValueBufferHolder.findNewPage.

Annotations
@Override
getBufferHolderback to summary
protected TempPageHolder getBufferHolder()

Implements abstract io.github.spannm.jackcess.impl.LongValueColumnImpl.LongValueBufferHolder.getBufferHolder.

Annotations
@Override
getOwnedPageCountback to summary
public int getOwnedPageCount()

Overrides io.github.spannm.jackcess.impl.LongValueColumnImpl.LongValueBufferHolder.getOwnedPageCount.

Annotations
@Override