java.lang.Object
com.northconcepts.datapipeline.transform.lookup.Lookup
Direct Known Subclasses:
BasicLookup, DataReaderLookup, JdbcLookup, ProxyLookup, RecordListLookup

public abstract class Lookup extends Object
Searches for data in another source to merge with each record passing through this lookup's transformer -- the streaming version of a join.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Called when the LookupTransformer using this lookup is closed; override to release resources.
    abstract RecordList
    get(Object... keys)
    Returns the records that match the supplied composite lookup key.
    get(List<?> keys)
    Returns the records matching the list's values as a composite key; a null or empty list is passed on as a null array.
    protected void
    Called when the LookupTransformer using this lookup is opened; override to acquire resources.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Lookup

      public Lookup()
  • Method Details

    • open

      protected void open()
      Called when the LookupTransformer using this lookup is opened; override to acquire resources.
    • close

      protected void close()
      Called when the LookupTransformer using this lookup is closed; override to release resources.
    • get

      public abstract RecordList get(Object... keys)
      Returns the records that match the supplied composite lookup key.

      Contract for subclasses (see also docs/authoring/Lookup.md):

      • Called once per source record by LookupTransformer; keep it fast.
      • Return an empty RecordList when no match is found. null is also tolerated by LookupTransformer for backward compatibility, but new code should prefer an empty list for clearer semantics.
      • Do not mutate the supplied keys; they are owned by the caller.
    • get

      public RecordList get(List<?> keys)
      Returns the records matching the list's values as a composite key; a null or empty list is passed on as a null array.