package com.onaro.sanscreen.client.view.common.functions;
import java.util.Set;
import com.onaro.client.swing.table.functional.BulkFunction;
import com.onaro.sanscreen.client.view.refresh.RefreshUtils;
import com.onaro.sanscreen.client.view.refresh.RefreshUtils.MethodDescriptor;
import com.onaro.sanscreen.client.view.tabular.AbstractTabularTableModel;
import com.onaro.sanscreen.server.interfaces.util.UpdateTimeData;
import com.onaro.sanscreen.server.interfaces.annotations.InvalidatedBy;
import com.onaro.sanscreen.server.interfaces.data.update.UpdateType;
/**
* Type of bulk function that supports detection that its contents need to be refreshed, based on the
* Client/Server {@link UpdateType} refresh mechanism. The {@link AbstractTabularTableModel} will call
* {@link #needsRefresh(UpdateTimeData, UpdateTimeData)}, which should return true when the function
* needs to be refreshed. When this method returns true, the bulk function is evaluated again against
* all of the rows, and any columns that are consumers of this function are refreshed (causing them to
* re-evaluate their function calls).
*
* The default mechanism for a AbstractRefreshableBulkFunction to check the UpdateTypes that have changed
* against the list of UpdateTypes that are included on the {@link InvalidatedBy} annotation on the declarations
* of the Server Interface methods the bulk function calls. To perform this check automatically, subclasses
* should override the {@link #getMethodCalled()} or {@link #getMethodsCalled()} methods to indicate which
* server interface methods that are called by the bulk function implementation. Alternatively, subclasses can
* override {@link #getUpdateTypes()} or {@link #needsRefresh(UpdateTimeData, UpdateTimeData)} to provide custom
* refresh detection behaviors. If none of these methods are overridden, the AbstractRefreshableBulkFunction
* will default to not supporting refreshing.
*
* @param row type this Function is able to operate on
* @param