org.datanucleus.store.objectvaluegenerator
Interface ObjectValueGenerator


public interface ObjectValueGenerator

Interface providing value generation based on an input (persistable) object.


Method Summary
 java.lang.Object generate(ExecutionContext ec, java.lang.Object obj, ExtensionMetaData[] extensions)
          Method that takes the object being persisted by the specified ObjectManager and generates a value (based on the contents of the object).
 

Method Detail

generate

java.lang.Object generate(ExecutionContext ec,
                          java.lang.Object obj,
                          ExtensionMetaData[] extensions)
Method that takes the object being persisted by the specified ObjectManager and generates a value (based on the contents of the object). This could be used, for example, to generate a unique value for the object based on some of its fields.

Parameters:
ec - execution context
obj - The object (persistent, or being persisted)
extensions - Extensions on the field being generated
Returns:
The value


Copyright © 2011. All Rights Reserved.