code: public Field getIdentityProperty(Class clazz) {
          Field info = _idPropertyCache.get(clazz);
          if (info != null) {
              return info;
          }
  
          try {
              Field idField = Arrays.stream(Introspector.getBeanInfo(clazz).getPropertyDescriptors())
                      .filter(x -> _findIdentityProperty.apply(x))
                      .findFirst()
                      .map(x -> getField(clazz, x.getName()))
                      .orElse(null);
  
              _idPropertyCache.put(clazz, idField);
  
              return idField;
          } catch (IntrospectionException e) {
              throw new RuntimeException(e);
          }
      }
docs: Gets the identity property.
  @param clazz Class of entity
  @return Identity property (field)