Package com.db4o.internal.handlers
Class IntHandler
- java.lang.Object
-
- com.db4o.internal.handlers.PrimitiveHandler
-
- com.db4o.internal.handlers.IntHandler
-
- All Implemented Interfaces:
BuiltinTypeHandler
,CanExcludeNullInQueries
,Comparable4
,Indexable4
,IndexableTypeHandler
,LinkLengthAware
,QueryableTypeHandler
,TypeHandler4
,ValueTypeHandler
- Direct Known Subclasses:
FloatHandler
,IDHandler
,IntHandler0
public class IntHandler extends PrimitiveHandler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
IntHandler.PreparedIntComparison
-
Field Summary
-
Fields inherited from class com.db4o.internal.handlers.PrimitiveHandler
_classReflector
-
-
Constructor Summary
Constructors Constructor Description IntHandler()
-
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(int first, int second)
java.lang.Object
defaultValue()
void
defragIndexEntry(DefragmentContextImpl context)
PreparedComparison
internalPrepareComparison(java.lang.Object source)
int
linkLength()
PreparedComparison
newPrepareCompare(int i)
java.lang.Class
primitiveJavaClass()
java.lang.Object
read(MarshallerFamily mf, StatefulBuffer writer, boolean redirect)
java.lang.Object
read(ReadContext context)
gets called when an value type is to be read from the database.void
write(int intValue, ByteArrayBuffer writer)
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 writer)
static void
writeInt(int a_int, ByteArrayBuffer a_bytes)
-
Methods inherited from class com.db4o.internal.handlers.PrimitiveHandler
classReflector, 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 writer, boolean redirect) throws CorruptionException
- Overrides:
read
in classPrimitiveHandler
- Throws:
CorruptionException
-
write
public void write(java.lang.Object obj, ByteArrayBuffer writer)
- Specified by:
write
in classPrimitiveHandler
-
write
public void write(int intValue, ByteArrayBuffer writer)
-
writeInt
public static final void writeInt(int a_int, ByteArrayBuffer a_bytes)
-
defragIndexEntry
public void defragIndexEntry(DefragmentContextImpl context)
- Specified by:
defragIndexEntry
in interfaceIndexable4
- Overrides:
defragIndexEntry
in classPrimitiveHandler
-
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
-
internalPrepareComparison
public PreparedComparison internalPrepareComparison(java.lang.Object source)
- Specified by:
internalPrepareComparison
in classPrimitiveHandler
-
newPrepareCompare
public PreparedComparison newPrepareCompare(int i)
-
compare
public static int compare(int first, int second)
-
-