db4o 7.4

com.db4o.typehandlers
Class CollectionTypeHandler

java.lang.Object
  extended by com.db4o.typehandlers.CollectionTypeHandler
All Implemented Interfaces:
com.db4o.internal.CanHoldAnythingHandler, com.db4o.internal.Comparable4, com.db4o.internal.fieldhandlers.FieldHandler, com.db4o.internal.handlers.VariableLengthTypeHandler, FirstClassHandler, TypeHandler4

public class CollectionTypeHandler
extends java.lang.Object
implements TypeHandler4, FirstClassHandler, com.db4o.internal.CanHoldAnythingHandler, com.db4o.internal.handlers.VariableLengthTypeHandler

TypeHandler for Collections.


Constructor Summary
CollectionTypeHandler()
           
 
Method Summary
 void cascadeActivation(com.db4o.internal.activation.ActivationContext4 context)
          will be called during activation if the handled object is already active
 void collectIDs(com.db4o.internal.marshall.QueryingReadContext context)
          will be called during querying to ask for IDs of member objects of the handled object.
 void defragment(com.db4o.internal.DefragmentContext context)
          gets called when an object gets defragmented.
 void delete(com.db4o.internal.delete.DeleteContext context)
          gets called when an object gets deleted.
 com.db4o.foundation.PreparedComparison prepareComparison(Context context, java.lang.Object obj)
           
 java.lang.Object read(ReadContext context)
          gets called when an object is read from the database.
 TypeHandler4 readCandidateHandler(com.db4o.internal.marshall.QueryingReadContext context)
          will be called during querying to ask for the handler to be used to collect children of the handled object
 void write(WriteContext context, java.lang.Object obj)
          gets called when an object is to be written to the database.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionTypeHandler

public CollectionTypeHandler()
Method Detail

prepareComparison

public com.db4o.foundation.PreparedComparison prepareComparison(Context context,
                                                                java.lang.Object obj)
Specified by:
prepareComparison in interface com.db4o.internal.Comparable4

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 interface TypeHandler4
obj - the object

read

public java.lang.Object read(ReadContext context)
Description copied from interface: TypeHandler4
gets called when an object is read from the database.

Specified by:
read in interface TypeHandler4
Returns:
the instantiated object

delete

public void delete(com.db4o.internal.delete.DeleteContext context)
            throws Db4oIOException
Description copied from interface: TypeHandler4
gets called when an object gets deleted.

Specified by:
delete in interface TypeHandler4
Throws:
Db4oIOException

defragment

public void defragment(com.db4o.internal.DefragmentContext context)
Description copied from interface: TypeHandler4
gets called when an object gets defragmented.

Specified by:
defragment in interface TypeHandler4

cascadeActivation

public final void cascadeActivation(com.db4o.internal.activation.ActivationContext4 context)
Description copied from interface: FirstClassHandler
will be called during activation if the handled object is already active

Specified by:
cascadeActivation in interface FirstClassHandler

readCandidateHandler

public TypeHandler4 readCandidateHandler(com.db4o.internal.marshall.QueryingReadContext context)
Description copied from interface: FirstClassHandler
will be called during querying to ask for the handler to be used to collect children of the handled object

Specified by:
readCandidateHandler in interface FirstClassHandler
Returns:

collectIDs

public void collectIDs(com.db4o.internal.marshall.QueryingReadContext context)
Description copied from interface: FirstClassHandler
will be called during querying to ask for IDs of member objects of the handled object.

Specified by:
collectIDs in interface FirstClassHandler

db4o 7.4

Copyright 2007 db4objects Inc. All rights reserved.