public class LexicoPadKeyFieldCodec extends DefaultKeyFieldCodec implements KeyFieldCodec
KeyFieldCodec which uses DataFlavor specific
padding to force the encoded result to the limit or given maximum length,
creating fixed length key fields important in many partial and fuzzy scan
scenarios.
This codec can cause greatly increased data sizes where given max length far exceeds the length of the actual data to encode.
LexicographicCodec,
Type,
DataFlavor,
PaddingkeyField| Constructor and Description |
|---|
LexicoPadKeyFieldCodec(KeyFieldMapping keyField) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkEncodeOverflow(byte[] keyValue)
Returns true if the given encoded value will overflow the underlying key
field.
|
Object |
decode(byte[] value)
Returns the object representation for the given encoded bytes value.
|
byte[] |
encode(Object value)
Returns the encoded bytes representation for the given object or literal
value.
|
byte[] |
encodeNext(Object value)
Returns the encoded "next" bytes representation for the given object or
literal value, where the next value depends on the coded implementation and
may typically be the lexicographic next value.
|
org.plasma.sdo.DataFlavor |
getDataFlavor() |
int |
getMaxLength() |
boolean |
isLexicographic()
Return true if the encoded values support lexicographic ordering.
|
boolean |
isTransforming()
Return true if the encoded values are fundamentally transformed father than
formatted or padded in some way.
|
public LexicoPadKeyFieldCodec(KeyFieldMapping keyField)
public boolean isLexicographic()
KeyFieldCodecisLexicographic in interface KeyFieldCodecpublic boolean isTransforming()
KeyFieldCodecisTransforming in interface KeyFieldCodecpublic int getMaxLength()
public org.plasma.sdo.DataFlavor getDataFlavor()
public byte[] encode(Object value)
KeyFieldCodecencode in interface KeyFieldCodecvalue - the object or literal valuepublic boolean checkEncodeOverflow(byte[] keyValue)
KeyFieldCodeccheckEncodeOverflow in interface KeyFieldCodecpublic Object decode(byte[] value)
KeyFieldCodecdecode in interface KeyFieldCodecvalue - encoded bytes valuepublic byte[] encodeNext(Object value)
KeyFieldCodecencodeNext in interface KeyFieldCodecvalue - the object or literal valueCopyright © 2024. All Rights Reserved.