2 Replies Latest reply on Feb 23, 2004 5:14 PM by Bela Ban

    Fully qualified names (FQNs)

    Bela Ban Master

      I have added the class Fqn, which represents a fully qualified name, ie. the concatenation of relative names from the root to a given node. It used to be a string, e.g. "/a/b/c". Now *anything* can be a relative name, as long as it is
      - an Object (no primitive type)
      - implements equals() and hashCode() and
      - is serializable

      Example:
      Fqn fqn=new Fqn(new Integer(322649));
      fqn.add("second name");
      fqn.add(new Boolean(true));


      TreeCache cache;
      cache.put(fqn, "age", new Integer(38));

      or

      EntityBeanPk key;
      Fqn fqn=new Fqn(key);
      cache.put(key, "attr1", "value1");


      The string notation is still supported, but this new class will allow for (a) potentially faster lookup and (b) eliminate the need to convert already existing keys (e.g. EntityBeanPk) into strings.

      Bela