//-------------------------------------------------------------------------
// Convenience methods for copying and refreshing objects
//-------------------------------------------------------------------------
public Object copy(Object entity) throws DataAccessException {
ObjectCopyingPolicy copyingPolicy = new ObjectCopyingPolicy();
copyingPolicy.cascadeAllParts();
copyingPolicy.setShouldResetPrimaryKey(false);
return copy(entity, copyingPolicy);
}