@Persistent(dependent = "true")
private AuditRecord auditRecord = new AuditRecord();
@Override
public void jdoPreStore() {
ObjectState state = JDOHelper.getObjectState(this);
if (state.equals(ObjectState.TRANSIENT)
|| state.equals(ObjectState.PERSISTENT_NEW))
{
auditCreate();
} else if (state.equals(ObjectState.PERSISTENT_DIRTY)
|| state.equals(ObjectState.PERSISTENT_NONTRANSACTIONAL_DIRTY)
|| state.equals(ObjectState.DETACHED_DIRTY)) {
auditUpdate();
}
}