db4o v1.10

com.db4o.config
Interface ObjectClass


public interface ObjectClass

configuration interface for stored classes.

Use the global Configuration object to configure db4o before opening an ObjectContainer.

Example:
Configuration config = Db4o.configure();
ObjectClass oc = config.objectClass("package.className");
oc.updateDepth(3);
oc.minimumActivationDepth(3);


Method Summary
 java.lang.String getName()
          returns the classname of the stored class.
 void maximumActivationDepth(int depth)
          sets the maximum activation depth to the desired value.

 void minimumActivationDepth(int depth)
          sets the minimum activation depth to the desired value.

 ObjectField objectField(java.lang.String fieldName)
          returns an ObjectField object to configure the specified field.

 void objectOnActivate(java.lang.String methodName, java.lang.String[] parameterFieldNames, java.lang.String resultToField)
          specifies a method of this class to be called upon activation.

 void rename(java.lang.String newName)
          renames a stored class.
 void storeTransientFields(boolean flag)
          allows to specify if transient fields are to be stored.
 void translate(ObjectTranslator translator)
          registers a translator for this class.

 void updateDepth(int depth)
          allows to specify the updateDepth.
 

Method Detail

getName

public java.lang.String getName()
returns the classname of the stored class.
Returns:
the fully qualified classname of the stored class

maximumActivationDepth

public void maximumActivationDepth(int depth)
sets the maximum activation depth to the desired value.

Parameters:
depth - the desired maximum activation depth
See Also:
Why activation?

minimumActivationDepth

public void minimumActivationDepth(int depth)
sets the minimum activation depth to the desired value.

Parameters:
depth - the desired minimum activation depth
See Also:
Why activation?

objectField

public ObjectField objectField(java.lang.String fieldName)
returns an ObjectField object to configure the specified field.

Parameters:
fieldName - the fieldname of the field to be configured.

Returns:
an instance of an ObjectField object for configuration.

objectOnActivate

public void objectOnActivate(java.lang.String methodName,
                             java.lang.String[] parameterFieldNames,
                             java.lang.String resultToField)
specifies a method of this class to be called upon activation.

Parameters:
methodName - the name of the method.
parameterFieldNames - a String array of the fieldNames of this class to read parameters for the execution of the method from.
resultToField - the fieldname of the field that is to be set to the result of the method execution.

rename

public void rename(java.lang.String newName)
renames a stored class.
Use this method to refactor classes.

Parameters:
newName - the new fully qualified classname.

storeTransientFields

public void storeTransientFields(boolean flag)
allows to specify if transient fields are to be stored.
The default for every class is false.

Parameters:
flag -  

translate

public void translate(ObjectTranslator translator)
registers a translator for this class.

Parameters:
translator -  
See Also:
ObjectTranslator

updateDepth

public void updateDepth(int depth)
allows to specify the updateDepth.

see the documentation of ObjectContainer.set() for further details.

Consider to use the objectOnUpdate() callback method for better control of updates instead.

Parameters:
depth - the depth of the desired update.

db4o v1.10