PersistenceCapable
class to generate a call to the field manager for each key field in the ObjectId. For example, an ObjectId class that has three key fields (int id, String name, and Float salary)
would have the method generated: void copyKeyFieldsFromObjectId
(ObjectIdFieldConsumer fm, Object objectId) {
EmployeeKey oid = (EmployeeKey)objectId;
fm.storeIntField (0, oid.id);
fm.storeStringField (1, oid.name);
fm.storeObjectField (2, oid.salary);
}
The implementation is responsible for implementing the ObjectIdFieldConsumer
to store the values for the key fields.
@param oid the ObjectId source of the copy.
@param fm the field manager that receives the field values.
|
|
|
|
|
|
|
|
|
|
|
|