code: private Integer investigateVersionAndCheckForConflict(JPAObject newObject) throws EDBException {
          JPAEntry entry = newObject.getEntry(EDBConstants.MODEL_VERSION);
          String oid = newObject.getOID();
          Integer modelVersion = 0;
  
          if (entry != null) {
              modelVersion = Integer.parseInt(entry.getValue());
              Integer currentVersion = dao.getVersionOfOid(oid);
              if (!modelVersion.equals(currentVersion)) {
                  try {
                      checkForConflict(newObject);
                  } catch (EDBException e) {
                      LOGGER.info("conflict detected, user get informed");
                      throw new EDBException("conflict was detected. There is a newer version of the model with the oid "
                              + oid + " saved.");
                  }
                  modelVersion = currentVersion;
              }
          } else {
              modelVersion = dao.getVersionOfOid(oid);
          }
  
          return modelVersion;
      }
docs: Investigates the version of an JPAObject and checks if a conflict can be found.