Class DefaultCache
- java.lang.Object
-
- org.pentaho.di.trans.steps.databaselookup.DefaultCache
-
- All Implemented Interfaces:
DatabaseLookupData.Cache
public class DefaultCache extends Object implements DatabaseLookupData.Cache
Old code, copied from DatabaseLookup- Author:
- Andrey Khayrutdinov
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object[]getRowFromCache(org.pentaho.di.core.row.RowMetaInterface lookupMeta, Object[] lookupRow)Returns the very first data row that matches all conditions ornullif none has been found.static DefaultCachenewCache(DatabaseLookupData data, int cacheSize)voidstoreRowInCache(DatabaseLookupMeta meta, org.pentaho.di.core.row.RowMetaInterface lookupMeta, Object[] lookupRow, Object[] add)Savedaddas data row andlookupRowas a key for searching it.
-
-
-
Method Detail
-
newCache
public static DefaultCache newCache(DatabaseLookupData data, int cacheSize)
-
getRowFromCache
public Object[] getRowFromCache(org.pentaho.di.core.row.RowMetaInterface lookupMeta, Object[] lookupRow) throws org.pentaho.di.core.exception.KettleException
Description copied from interface:DatabaseLookupData.CacheReturns the very first data row that matches all conditions ornullif none has been found. Note, cache should keep the order in which elements were put into it.- Specified by:
getRowFromCachein interfaceDatabaseLookupData.Cache- Parameters:
lookupMeta- meta object for dealing withlookupRowlookupRow- tuple containing values for comparison- Returns:
- first matching data row or
null - Throws:
org.pentaho.di.core.exception.KettleException
-
storeRowInCache
public void storeRowInCache(DatabaseLookupMeta meta, org.pentaho.di.core.row.RowMetaInterface lookupMeta, Object[] lookupRow, Object[] add)
Description copied from interface:DatabaseLookupData.CacheSavedaddas data row andlookupRowas a key for searching it.- Specified by:
storeRowInCachein interfaceDatabaseLookupData.Cache- Parameters:
meta- step's metalookupMeta-lookupRow's metalookupRow- tuple of keysadd- tuple of data
-
-