Package com.db4o.internal.handlers
Class StringBasedValueTypeHandlerBase<T>
- java.lang.Object
-
- com.db4o.internal.handlers.StringBasedValueTypeHandlerBase<T>
-
- All Implemented Interfaces:
BuiltinTypeHandler
,Comparable4
,VariableLengthTypeHandler
,QueryableTypeHandler
,TypeHandler4
,ValueTypeHandler
- Direct Known Subclasses:
StringBufferHandler
public abstract class StringBasedValueTypeHandlerBase<T> extends java.lang.Object implements ValueTypeHandler, BuiltinTypeHandler, VariableLengthTypeHandler, QueryableTypeHandler, Comparable4
-
-
Constructor Summary
Constructors Constructor Description StringBasedValueTypeHandlerBase(java.lang.Class<T> clazz)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ReflectClass
classReflector()
protected abstract java.lang.String
convertObject(T obj)
protected abstract T
convertString(java.lang.String str)
void
defragment(DefragmentContext context)
gets called when an object gets defragmented.void
delete(DeleteContext context)
gets called when an object gets deleted.boolean
descendsIntoMembers()
PreparedComparison
prepareComparison(Context context, java.lang.Object obj)
creates a prepared comparison to compare multiple objects against one single object.java.lang.Object
read(ReadContext context)
gets called when an value type is to be read from the database.void
registerReflector(Reflector reflector)
void
write(WriteContext context, java.lang.Object obj)
gets called when an object is to be written to the database.
-
-
-
Field Detail
-
_clazz
public final java.lang.Class<T> _clazz
-
-
Constructor Detail
-
StringBasedValueTypeHandlerBase
public StringBasedValueTypeHandlerBase(java.lang.Class<T> clazz)
-
-
Method Detail
-
defragment
public void defragment(DefragmentContext context)
Description copied from interface:TypeHandler4
gets called when an object gets defragmented.- Specified by:
defragment
in interfaceTypeHandler4
-
delete
public void delete(DeleteContext context) throws Db4oIOException
Description copied from interface:TypeHandler4
gets called when an object gets deleted.- Specified by:
delete
in interfaceTypeHandler4
- Throws:
Db4oIOException
-
read
public java.lang.Object read(ReadContext context)
Description copied from interface:ValueTypeHandler
gets called when an value type is to be read from the database.- Specified by:
read
in interfaceValueTypeHandler
- Returns:
- the read value type
-
write
public void write(WriteContext context, java.lang.Object obj)
Description copied from interface:TypeHandler4
gets called when an object is to be written to the database.- Specified by:
write
in interfaceTypeHandler4
obj
- the object
-
prepareComparison
public PreparedComparison prepareComparison(Context context, java.lang.Object obj)
Description copied from interface:Comparable4
creates a prepared comparison to compare multiple objects against one single object.- Specified by:
prepareComparison
in interfaceComparable4<T>
- Parameters:
context
- the context of the comparisonobj
- the object that is to be compared against multiple other objects- Returns:
- the prepared comparison
-
classReflector
public ReflectClass classReflector()
- Specified by:
classReflector
in interfaceBuiltinTypeHandler
-
registerReflector
public void registerReflector(Reflector reflector)
- Specified by:
registerReflector
in interfaceBuiltinTypeHandler
-
descendsIntoMembers
public boolean descendsIntoMembers()
- Specified by:
descendsIntoMembers
in interfaceQueryableTypeHandler
-
convertObject
protected abstract java.lang.String convertObject(T obj)
-
convertString
protected abstract T convertString(java.lang.String str)
-
-