code: public static void registerIdProeprty(final Class<?> cls, final String idPropertyName) {
          if (ClassUtil.getPropGetMethod(cls, idPropertyName) == null || ClassUtil.getPropSetMethod(cls, idPropertyName) == null) {
              throw new IllegalArgumentException("The specified class: " + ClassUtil.getCanonicalClassName(cls)
                      + " doesn't have getter or setter method for the specified id propery: " + idPropertyName);
          }
  
          final Method setMethod = ClassUtil.getPropSetMethod(cls, idPropertyName);
          final Class<?> parameterType = setMethod.getParameterTypes()[0];
  
          if (!(String.class.isAssignableFrom(parameterType) || ObjectId.class.isAssignableFrom(parameterType))) {
              throw new IllegalArgumentException(
                      "The parameter type of the specified id setter method must be 'String' or 'ObjectId': " + setMethod.toGenericString());
          }
  
          classIdSetMethodPool.put(cls, setMethod);
      }
docs: The object id ("_id") property will be read from/write to the specified property
  @param cls
  @param idPropertyName