static final class PropertyMaps.Handler
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
private class |
PropertyMaps.Handler.BooleanPropColumn
Normal boolean columns do not write into the actual row data, so we
need to do a little extra work.
|
private class |
PropertyMaps.Handler.PropColumn
Column adapted to work w/out a Table.
|
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<DataType,PropertyMaps.Handler.PropColumn> |
_columns
cache of PropColumns used to read/write property values
|
private DatabaseImpl |
_database
the current database
|
private ColumnImpl |
_propCol
the system table "property" column
|
| Constructor and Description |
|---|
Handler(DatabaseImpl database) |
| Modifier and Type | Method and Description |
|---|---|
private PropertyMaps.Handler.PropColumn |
getColumn(DataType dataType,
java.lang.String propName,
int dataSize,
java.lang.Object value)
Gets a PropColumn capable of reading/writing a property of the given
DataType
|
private static boolean |
isPseudoGuidColumn(DataType dataType,
java.lang.String propName,
int dataSize,
java.lang.Object value) |
PropertyMaps |
read(byte[] propBytes,
int objectId,
RowIdImpl rowId) |
private java.util.List<java.lang.String> |
readPropertyNames(java.nio.ByteBuffer bbBlock) |
private PropertyMapImpl |
readPropertyValues(java.nio.ByteBuffer bbBlock,
java.util.List<java.lang.String> propNames,
short blockType,
PropertyMaps maps) |
private java.lang.String |
readPropName(java.nio.ByteBuffer buffer)
Reads a property name from the given data block
|
void |
save(PropertyMaps maps)
Saves PropertyMaps instance to the db.
|
byte[] |
write(PropertyMaps maps) |
private void |
writeBlock(PropertyMapImpl propMap,
java.util.Set<java.lang.String> propNames,
short blockType,
ByteArrayBuilder bab) |
private void |
writePropertyNames(java.util.Set<java.lang.String> propNames,
ByteArrayBuilder bab) |
private void |
writePropertyValues(PropertyMapImpl propMap,
java.util.Set<java.lang.String> propNames,
ByteArrayBuilder bab) |
private void |
writePropName(java.lang.String propName,
ByteArrayBuilder bab)
Writes a property name to the given data block
|
private final DatabaseImpl _database
private final ColumnImpl _propCol
private final java.util.Map<DataType,PropertyMaps.Handler.PropColumn> _columns
Handler(DatabaseImpl database)
public PropertyMaps read(byte[] propBytes, int objectId, RowIdImpl rowId) throws java.io.IOException
null result).java.io.IOExceptionpublic byte[] write(PropertyMaps maps) throws java.io.IOException
java.io.IOExceptionpublic void save(PropertyMaps maps) throws java.io.IOException
java.io.IOExceptionprivate void writeBlock(PropertyMapImpl propMap, java.util.Set<java.lang.String> propNames, short blockType, ByteArrayBuilder bab) throws java.io.IOException
java.io.IOExceptionprivate java.util.List<java.lang.String> readPropertyNames(java.nio.ByteBuffer bbBlock)
private void writePropertyNames(java.util.Set<java.lang.String> propNames,
ByteArrayBuilder bab)
private PropertyMapImpl readPropertyValues(java.nio.ByteBuffer bbBlock, java.util.List<java.lang.String> propNames, short blockType, PropertyMaps maps) throws java.io.IOException
java.io.IOExceptionprivate void writePropertyValues(PropertyMapImpl propMap, java.util.Set<java.lang.String> propNames, ByteArrayBuilder bab) throws java.io.IOException
java.io.IOExceptionprivate java.lang.String readPropName(java.nio.ByteBuffer buffer)
private void writePropName(java.lang.String propName,
ByteArrayBuilder bab)
private PropertyMaps.Handler.PropColumn getColumn(DataType dataType, java.lang.String propName, int dataSize, java.lang.Object value) throws java.io.IOException
java.io.IOExceptionprivate static boolean isPseudoGuidColumn(DataType dataType, java.lang.String propName, int dataSize, java.lang.Object value) throws java.io.IOException
java.io.IOException