public class ReverseLookupListener extends InstrumentedListenerAdapter implements NotificationStepReceiver, ReverseLookup
InstrumentedListener.ErrorNotification, InstrumentedListener.Notification
ReverseLookup.Null
source
Modifier and Type | Method and Description |
---|---|
void |
dumpReverseTable(com.fishlib.io.logger.Logger log) |
long |
get(Object key)
Gets the index value where key exists in the table, or the no-entry-value if it is not found in the table.
|
protected Object |
getKey(long row)
Gets the key for a given row.
|
String[] |
getKeyColumns() |
long |
getLastNotificationStep() |
long |
getNoEntryValue()
Returns the value that will be returned from
ReverseLookup.get(java.lang.Object) or if no entry exists for a given key. |
long |
getPrev(Object key)
Gets the index value where key previously in the table, or the no-entry-value if it is was not found in the table.
|
protected Object |
getPrevKey(long row)
Gets the previous key for a given row.
|
static ReverseLookupListener |
makeReverseLookupListenerWithLock(DynamicTable source,
String... columns) |
static ReverseLookupListener |
makeReverseLookupListenerWithSnapshot(BaseTable source,
String... columns) |
void |
onUpdate(Index added,
Index removed,
Index modified)
Process notification of table changes.
|
static void |
prepareForTree(BaseTable preTree,
String idColumn)
Prepare the parameter table for use with
tree table |
void |
setLastNotificationStep(long lastNotificationStep) |
String |
toString() |
onFailureInternal
append, getEntry, getErrorNotification, getNotification, onFailure, satisfied, setInitialImage, setVerboseLogging
public static ReverseLookupListener makeReverseLookupListenerWithSnapshot(BaseTable source, String... columns)
public static ReverseLookupListener makeReverseLookupListenerWithLock(DynamicTable source, String... columns)
@ScriptApi public static void prepareForTree(BaseTable preTree, String idColumn)
tree table
preTree
- The tree to prepareidColumn
- The column that will be used as the id for Table.treeTable(String, String)
public long get(Object key)
ReverseLookup
get
in interface ReverseLookup
key
- a single object for a single column, or a SmartKey
for multiple columnspublic long getPrev(Object key)
ReverseLookup
getPrev
in interface ReverseLookup
key
- a single object for a single column, or a SmartKey
for multiple columnspublic long getNoEntryValue()
ReverseLookup
ReverseLookup.get(java.lang.Object)
or if no entry exists for a given key.getNoEntryValue
in interface ReverseLookup
protected Object getKey(long row)
row
- the index value to retrieve the key forprotected Object getPrevKey(long row)
row
- the index value to retrieve the previous key forpublic void onUpdate(Index added, Index removed, Index modified)
Listener
onUpdate
in interface Listener
onUpdate
in class InstrumentedListenerAdapter
added
- rows addedremoved
- rows removedmodified
- rows modifiedpublic void dumpReverseTable(com.fishlib.io.logger.Logger log)
dumpReverseTable
in interface ReverseLookup
public long getLastNotificationStep()
getLastNotificationStep
in interface NotificationStepReceiver
public void setLastNotificationStep(long lastNotificationStep)
setLastNotificationStep
in interface NotificationStepReceiver
public String[] getKeyColumns()
getKeyColumns
in interface ReverseLookup