code: private Object getValue(String key, T item) {
          Class cls = item.getClass();
  
          while( true ) {
              try {
                  Field f = cls.getDeclaredField(key);
                  int m = f.getModifiers();
  
                  if( Modifier.isTransient(m) || Modifier.isStatic(m) ) {
                      return null;
                  }
                  f.setAccessible(true);
                  return f.get(item);
              }
              catch( Exception e ) {
                  Class[] params = new Class[0];
                  String mname;
  
                  mname = "get" + key.substring(0,1).toUpperCase() + key.substring(1);
                  try {
                      Method method = cls.getDeclaredMethod(mname, params);
                      Object[] args = new Object[0];
  
                      return method.invoke(item, args);
                  }
                  catch( IllegalAccessException e2 ) {
                      // ignore
                  }
                  catch( SecurityException e2 ) {
                      // ignore
                  }
                  catch( NoSuchMethodException e2 ) {
                      // ignore
                  }
                  catch( IllegalArgumentException e2 ) {
                      // ignore
                  }
                  catch( InvocationTargetException e2 ) {
                      // ignore
                  }
                  cls = cls.getSuperclass();
                  if( cls == null || cls.getName().getClass().equals(Object.class.getName()) ) {
                      throw new CacheManagementException("No such property: " + key);
                  }
              }
          }
      }
docs: Provides the actual value for the specified unique ID key for the specified object.
  @param key the name of the unique identifier
  @param item the object who's unique identifier value is sought
  @return the unique identifier for the object's attribute matching the key