Package com.db4o.internal.handlers
Class LongHandler
- java.lang.Object
-
- com.db4o.internal.handlers.PrimitiveHandler
-
- com.db4o.internal.handlers.LongHandler
-
- All Implemented Interfaces:
BuiltinTypeHandler
,CanExcludeNullInQueries
,Comparable4
,Indexable4
,IndexableTypeHandler
,LinkLengthAware
,QueryableTypeHandler
,TypeHandler4
,ValueTypeHandler
- Direct Known Subclasses:
DateHandlerBase
,DoubleHandler
,LongHandler0
public class LongHandler extends PrimitiveHandler
-
-
Field Summary
-
Fields inherited from class com.db4o.internal.handlers.PrimitiveHandler
_classReflector
-
-
Constructor Summary
Constructors Constructor Description LongHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
coerce(ReflectClass claxx, java.lang.Object obj)
static int
compare(long first, long second)
java.lang.Object
defaultValue()
PreparedComparison
internalPrepareComparison(java.lang.Object source)
int
linkLength()
java.lang.Class
primitiveJavaClass()
java.lang.Object
read(MarshallerFamily mf, StatefulBuffer buffer, boolean redirect)
java.lang.Object
read(ReadContext context)
gets called when an value type is to be read from the database.static long
readLong(ReadBuffer buffer)
void
write(WriteContext context, java.lang.Object obj)
gets called when an object is to be written to the database.void
write(java.lang.Object obj, ByteArrayBuffer buffer)
static void
writeLong(WriteBuffer buffer, long val)
-
Methods inherited from class com.db4o.internal.handlers.PrimitiveHandler
classReflector, defragIndexEntry, defragment, delete, descendsIntoMembers, excludeNull, indexEntryToObject, javaClass, nullRepresentationInUntypedArrays, prepareComparison, primitiveClassReflector, primitiveMarshaller, primitiveNull, readIndexEntry, readIndexEntry, readIndexEntryFromObjectSlot, registerReflector, writeIndexEntry
-
-
-
-
Method Detail
-
coerce
public java.lang.Object coerce(ReflectClass claxx, java.lang.Object obj)
- Overrides:
coerce
in classPrimitiveHandler
-
defaultValue
public java.lang.Object defaultValue()
- Specified by:
defaultValue
in classPrimitiveHandler
-
primitiveJavaClass
public java.lang.Class primitiveJavaClass()
- Specified by:
primitiveJavaClass
in classPrimitiveHandler
-
linkLength
public int linkLength()
- Specified by:
linkLength
in interfaceLinkLengthAware
- Specified by:
linkLength
in classPrimitiveHandler
-
read
public java.lang.Object read(MarshallerFamily mf, StatefulBuffer buffer, boolean redirect) throws CorruptionException
- Overrides:
read
in classPrimitiveHandler
- Throws:
CorruptionException
-
write
public void write(java.lang.Object obj, ByteArrayBuffer buffer)
- Specified by:
write
in classPrimitiveHandler
-
writeLong
public static final void writeLong(WriteBuffer buffer, long val)
-
readLong
public static final long readLong(ReadBuffer buffer)
-
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
- Overrides:
read
in classPrimitiveHandler
- 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
- Overrides:
write
in classPrimitiveHandler
obj
- the object
-
compare
public static int compare(long first, long second)
-
internalPrepareComparison
public PreparedComparison internalPrepareComparison(java.lang.Object source)
- Specified by:
internalPrepareComparison
in classPrimitiveHandler
-
-