code: protected final void populateIdAccessorMethods(EntityMetadata metadata, Class<?> clazz, Field f)
      {
          try
          {
              BeanInfo info = Introspector.getBeanInfo(clazz);
  
              for (PropertyDescriptor descriptor : info.getPropertyDescriptors())
              {
                  if (descriptor.getName().equals(f.getName()))
                  {
                      metadata.setReadIdentifierMethod(descriptor.getReadMethod());
                      metadata.setWriteIdentifierMethod(descriptor.getWriteMethod());
                      return;
                  }
              }
          }
          catch (IntrospectionException e)
          {
              throw new RuntimeException(e);
          }
      }
docs: Populates @Id accesser methods like, getId and setId of clazz to
  metadata.
  
  @param metadata
  the metadata
  @param clazz
  the clazz
  @param f
  the f