T
- The type of entries that this adapter works on.public interface DataTypeAdapter<T> extends DataReader<Object>, DataWriter<Object>, Persistable
Modifier and Type | Method and Description |
---|---|
default InternalDataAdapter<T> |
asInternalAdapter(short internalAdapterId) |
default InternalDataAdapter<T> |
asInternalAdapter(short internalAdapterId,
VisibilityHandler visibilityHandler) |
default Map<String,String> |
describe() |
Class<T> |
getDataClass()
Return the class that represents the data stored by this adapter.
|
byte[] |
getDataId(T entry)
Get a data ID for the entry.
|
FieldDescriptor<?> |
getFieldDescriptor(String fieldName) |
FieldDescriptor<?>[] |
getFieldDescriptors() |
Object |
getFieldValue(T entry,
String fieldName)
Returns the value of the field with the given name from the entry.
|
default FieldReader<Object> |
getReader(String fieldName)
Get a reader for an individual field.
|
String |
getTypeName()
Return the data adapter's type name.
|
default FieldWriter<Object> |
getWriter(String fieldName)
Get a writer for an individual field given the ID.
|
RowBuilder<T> |
newRowBuilder(FieldDescriptor<?>[] outputFieldDescriptors) |
fromBinary, toBinary
String getTypeName()
byte[] getDataId(T entry)
entry
- the entrydefault InternalDataAdapter<T> asInternalAdapter(short internalAdapterId)
default InternalDataAdapter<T> asInternalAdapter(short internalAdapterId, VisibilityHandler visibilityHandler)
default FieldWriter<Object> getWriter(String fieldName)
DataWriter
getWriter
in interface DataWriter<Object>
fieldName
- the unique field IDdefault FieldReader<Object> getReader(String fieldName)
DataReader
getReader
in interface DataReader<Object>
fieldName
- the ID of the fieldObject getFieldValue(T entry, String fieldName)
entry
- the entryfieldName
- the field nameClass<T> getDataClass()
RowBuilder<T> newRowBuilder(FieldDescriptor<?>[] outputFieldDescriptors)
FieldDescriptor<?>[] getFieldDescriptors()
FieldDescriptor<?> getFieldDescriptor(String fieldName)
Copyright © 2013–2022. All rights reserved.