/** Explicitly mark the parameter instance and field dirty. * Normally, <code>PersistenceCapable</code> classes are able to detect * changes made to their fields. However, if a reference to an array is * given to a method outside the class, and the array is modified, then the * persistent instance is not aware of the change. This API allows the * application to notify the instance that a change was made to a field. * * <P>Transient instances and instances of classes * that do not implement <code>PersistenceCapable</code> ignore this method. * @see PersistenceCapable#jdoMakeDirty(String fieldName) * @param pc the <code>PersistenceCapable</code> instance. * @param fieldName the name of the field to be marked dirty. */ public static void makeDirty(Object pc, String fieldName) { if (pc instanceof PersistenceCapable) { ((PersistenceCapable)pc).jdoMakeDirty(fieldName); } else { implHelper.nonBinaryCompatibleMakeDirty(pc, fieldName); } }
/** Explicitly mark the parameter instance and field dirty. * Normally, <code>PersistenceCapable</code> classes are able to detect * changes made to their fields. However, if a reference to an array is * given to a method outside the class, and the array is modified, then the * persistent instance is not aware of the change. This API allows the * application to notify the instance that a change was made to a field. * * <P>Transient instances and instances of classes * that do not implement <code>PersistenceCapable</code> ignore this method. * @see PersistenceCapable#jdoMakeDirty(String fieldName) * @param pc the <code>PersistenceCapable</code> instance. * @param fieldName the name of the field to be marked dirty. */ public static void makeDirty(Object pc, String fieldName) { if (pc instanceof PersistenceCapable) { ((PersistenceCapable)pc).jdoMakeDirty(fieldName); } else { implHelper.nonBinaryCompatibleMakeDirty(pc, fieldName); } }