Class NARKeyFactory

java.lang.Object
com.nt.udc.nar.NARKeyFactory
All Implemented Interfaces:
Factory

public class NARKeyFactory extends Object implements Factory
This factory should be used in places that require a NAR key, but do not actually have (or need) the knowledge about creating the key. Given a created NAR, this class should be able to produce a suitable key to be used in a Hashtable (or some storage structure) that is storing NARs.
  • Constructor Details

    • NARKeyFactory

      @Deprecated public NARKeyFactory(int[] ka)
      Deprecated.
      Use NARKeyFactory(FieldKey[])
      Constructor to create the factory with the NAR attributes that are used in creating the key.
      Parameters:
      ka - Key attributes of the NAR
    • NARKeyFactory

      public NARKeyFactory(FieldKey[] ka)
  • Method Details

    • getObject

      public Object getObject(Object data)
      Returns the NAR key, based on the input NAR.
      Specified by:
      getObject in interface Factory
      Parameters:
      data - NAR Object that needs a key.
      Returns:
      the key for the given NAR Object, or null if the NAR has none of the key attributes
    • getKey

      public NARKey getKey(NAR data)
      Returns the NAR key, based on the input NAR.
      Parameters:
      data - NAR Object that needs a key.
      Returns:
      the key for the given NAR Object, or null if the NAR has none of the key attributes