code: private static <T extends MPBase> T fillResource(T sourceResource, T destinationResource) throws MPException {
          Field[] declaredFields = destinationResource.getClass().getDeclaredFields();
          for (Field field : declaredFields) {
              try {
                  Field originField = sourceResource.getClass().getDeclaredField(field.getName());
                  field.setAccessible(true);
                  originField.setAccessible(true);
                  field.set(destinationResource, originField.get(sourceResource));
  
              } catch (Exception ex) {
                  throw new MPException(ex);
              }
          }
          return destinationResource;
      }
docs: Copies the atributes from an obj to a destination obj
  
  @param sourceResource                source resource obj
  @param destinationResource           destination resource obj
  @param <T>
  @return
  @throws MPException