Package ghidra.util.database
Class DBCachedObjectStoreFactory.AbstractDBFieldCodec<VT,OT extends DBAnnotatedObject,FT extends Field>
java.lang.Object
ghidra.util.database.DBCachedObjectStoreFactory.AbstractDBFieldCodec<VT,OT,FT>
- All Implemented Interfaces:
DBCachedObjectStoreFactory.DBFieldCodec<VT,OT, FT>
- Direct Known Subclasses:
AbstractDBTracePropertyMap.SaveableDBFieldCodec,DBCachedObjectStoreFactory.BooleanDBFieldCodec,DBCachedObjectStoreFactory.ByteArrayDBFieldCodec,DBCachedObjectStoreFactory.ByteDBFieldCodec,DBCachedObjectStoreFactory.EnumDBByteFieldCodec,DBCachedObjectStoreFactory.IntDBFieldCodec,DBCachedObjectStoreFactory.LongArrayDBFieldCodec,DBCachedObjectStoreFactory.LongDBFieldCodec,DBCachedObjectStoreFactory.ShortDBFieldCodec,DBCachedObjectStoreFactory.StringDBFieldCodec,DBCachedObjectStoreFactory.VariantDBFieldCodec,DBTraceObject.ObjectPathDBFieldCodec,DBTraceObjectDBFieldCodec,DBTraceObjectManager.DBTraceObjectSchemaDBFieldCodec,DBTraceOverlaySpaceAdapter.AddressDBFieldCodec,DBTraceSymbolManager.VariableStorageDBFieldCodec,DBTraceUtils.AbstractOffsetSnapDBFieldCodec,DBTraceUtils.CompilerSpecIDDBFieldCodec,DBTraceUtils.LanguageIDDBFieldCodec,DBTraceUtils.RefTypeDBFieldCodec,DBTraceUtils.URLDBFieldCodec
- Enclosing class:
DBCachedObjectStoreFactory
public abstract static class DBCachedObjectStoreFactory.AbstractDBFieldCodec<VT,OT extends DBAnnotatedObject,FT extends Field>
extends Object
implements DBCachedObjectStoreFactory.DBFieldCodec<VT,OT,FT>
An abstract implementation of
DBCachedObjectStoreFactory.DBFieldCodec
This reduces the implementation burden to doLoad(DBAnnotatedObject, DBRecord),
doStore(DBAnnotatedObject, DBRecord), and DBCachedObjectStoreFactory.DBFieldCodec.store(Object, db.Field).
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidSame asload(DBAnnotatedObject, DBRecord), but permits exceptionsprotected abstract voidSame asstore(DBAnnotatedObject, DBRecord), but permits exceptionsGet the type of field storing the valuesGet the upper bound on objects with fields using this codecGet the value from the objectGet the type of values encoded and decodedvoidDecode the field from the given record into the given objectprotected voidSet the value of the objectvoidEncode the field from the given object into the given recordMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ghidra.util.database.DBCachedObjectStoreFactory.DBFieldCodec
encodeField, store
-
Field Details
-
valueType
-
objectType
-
fieldType
-
field
-
column
protected final int column
-
-
Constructor Details
-
Method Details
-
store
Description copied from interface:DBCachedObjectStoreFactory.DBFieldCodecEncode the field from the given object into the given record- Specified by:
storein interfaceDBCachedObjectStoreFactory.DBFieldCodec<VT,OT extends DBAnnotatedObject, FT extends Field> - Parameters:
obj- the source objectrecord- the destination record
-
load
Description copied from interface:DBCachedObjectStoreFactory.DBFieldCodecDecode the field from the given record into the given object- Specified by:
loadin interfaceDBCachedObjectStoreFactory.DBFieldCodec<VT,OT extends DBAnnotatedObject, FT extends Field> - Parameters:
obj- the destination objectrecord- the source record
-
getValueType
Description copied from interface:DBCachedObjectStoreFactory.DBFieldCodecGet the type of values encoded and decoded- Specified by:
getValueTypein interfaceDBCachedObjectStoreFactory.DBFieldCodec<VT,OT extends DBAnnotatedObject, FT extends Field> - Returns:
- the value type
-
getObjectType
Description copied from interface:DBCachedObjectStoreFactory.DBFieldCodecGet the upper bound on objects with fields using this codec- Specified by:
getObjectTypein interfaceDBCachedObjectStoreFactory.DBFieldCodec<VT,OT extends DBAnnotatedObject, FT extends Field> - Returns:
- the upper bound
-
getFieldType
Description copied from interface:DBCachedObjectStoreFactory.DBFieldCodecGet the type of field storing the values- Specified by:
getFieldTypein interfaceDBCachedObjectStoreFactory.DBFieldCodec<VT,OT extends DBAnnotatedObject, FT extends Field> - Returns:
- the field type
-
getValue
Description copied from interface:DBCachedObjectStoreFactory.DBFieldCodecGet the value from the object- Specified by:
getValuein interfaceDBCachedObjectStoreFactory.DBFieldCodec<VT,OT extends DBAnnotatedObject, FT extends Field> - Parameters:
obj- the source object- Returns:
- the value
-
setValue
Set the value of the object- Parameters:
obj- the object whose field to setvalue- the value to assign- Throws:
IllegalArgumentException- as inField.set(Object, Object)IllegalAccessException- as inField.set(Object, Object)
-
doStore
protected abstract void doStore(OT obj, DBRecord record) throws IllegalArgumentException, IllegalAccessException Same asstore(DBAnnotatedObject, DBRecord), but permits exceptions -
doLoad
protected abstract void doLoad(OT obj, DBRecord record) throws IllegalArgumentException, IllegalAccessException Same asload(DBAnnotatedObject, DBRecord), but permits exceptions
-