Class EventServerTableView<T extends DynO>

Type Parameters:
T - the generic type
All Implemented Interfaces:
Serializable, EntityContainer, overit.geocall.clipboard.XClip, overit.geocall.marks.MethodExposer, overit.geocall.marks.NameExposer, AjaxableComponent, Badgeable, DAViewManager, DBViewManager, DraggableDroppable, Hideable, Identified, Tool, overit.geocall.ux.configurability.UIConfigurable, overit.geocall.ux.edm.ModelConfigurable
Direct Known Subclasses:
CrewShellCompositionServerTableView, CrewShellDraftCompositionServerTableView, ServerTableViewActiveGroupingConstraint, ServerTableViewActivityForecastHeader, ServerTableViewActivityForecastHeaderSelection, ServerTableViewAddress, ServerTableViewAgendaHistory, ServerTableViewAllocateTechnicians, ServerTableViewBundle, ServerTableViewBundleOperationOrdering, ServerTableViewCapacityPlanningActivityDetailResult, ServerTableViewCapacityPlanningResourceDetailResult, ServerTableViewCapacityPlanningScenario, ServerTableViewCopyForecastResourceDetail, ServerTableViewCrewShell, ServerTableViewCrewShellModel, ServerTableViewDailyPlanOrderConfiguration, ServerTableViewExpectedMaterial, ServerTableViewForecastActivityPriority, ServerTableViewForecastGroupingConstraint, ServerTableViewForecastHeader, ServerTableViewForecastShiftModel, ServerTableViewForecastShiftModelDetail, ServerTableViewImmediateSchedulingActivities, ServerTableViewImmediateSchedulingActivitiesHistory, ServerTableViewImportForecast, ServerTableViewImportForecastResources, ServerTableViewImportOperationActivityFromWo, ServerTableViewImportWarehouseMaterial, ServerTableViewLogDetail, ServerTableViewLogMaster, ServerTableViewLogMaster, ServerTableViewMaterial, ServerTableViewMobileErrorLog, ServerTableViewObtainedPermitHistory, ServerTableViewOperationActivity, ServerTableViewPermitSingleIntervention, ServerTableViewRequiredPermitHistory, ServerTableViewResourceForecastHeaderSelection, ServerTableViewRoughPlanning, ServerTableViewRoughPlanningActivities, ServerTableViewSchedulingProposal, ServerTableViewSchedulingUser, ServerTableViewSelectionForecastResource, ServerTableViewSelectionRoughPlanningResources, ServerTableViewSerializedMaterial, ServerTableViewStock, ServerTableViewStockDetail, ServerTableViewStockHistory, ServerTableViewTechnicalObjectType, ServerTableViewTooltipConfiguration, ServerTableViewTooltipConfigurationRules, ServerTableViewTransferRequest, ServerTableViewUser, ServerTableViewWarehouse, ServerTableViewWarehouseMaterial, ServerTableViewWarehouseOperation, ServerTableViewWorkloadDistributionRule, ServerTableViewWorkOrderNote, ServerTableViewWorkOrderOperationType, ServerTableViewWorkOrderType

public class EventServerTableView<T extends DynO> extends ServerTableView
The Class that defines the event server table view.
Since:
19.0
See Also:
GCApi:
controller
  • Field Details

  • Constructor Details

    • EventServerTableView

      public EventServerTableView()
  • Method Details

    • onOpen

      public void onOpen(Object o)
      Description copied from class: Container
      Method called when is executed the WindowManager.push(overit.geocall.basic.ui.Window, java.lang.Object) of the Window that contains the Container. It calls the onOpen(o) method of all the Container's childrens.
      If a page is opened through the process of a route, it is possible that the route was called with params to pass to the page.
      The route params could be passed specifying them like query string's param on the url, using commas or the '=' character, to separate the keys and the values. Valid syntaxs are: "&params=KEY1,VAL1,KEY2,VAL2" or "&params=KEY1=VAL1,KEY2=VAL2"
      In that case it is possible to retrieve those params via the WindowManager.getRouteParams() method that returns an HashGetter with the params passed as parameters.
      For example it's possible to retrieve and use the params in this way: HashGetter hg = getWM().getRouteParams();
      String val1 = hg.getString("key1",null);
      String val2 = hg.getString("key2",null);
      Overrides:
      onOpen in class TableView
      Parameters:
      o - Object received from the caller
    • onNewDBView

      protected void onNewDBView(DBView dbv)
      Updates the table label with the count of the extracted records.
      Overrides:
      onNewDBView in class ServerTableView
      Parameters:
      dbv - the current DBView
    • onOrder

      public boolean onOrder(HashGetter hg)
      Description copied from class: TableView
      Orders the data of the table (see setMode())
      Overrides:
      onOrder in class TableView
      Parameters:
      hg - The map used to retrieve the parameter for the setMode() event
      Returns:
      true
    • search

      public void search(Map<String,Object> filters)
      Sets the map of filters used for launch the search event and launch the table refresh.
      Parameters:
      filters - the map of filters
    • refresh

      public void refresh()
      Refreshes the result table.
    • fetchRange

      protected DBView fetchRange(int maxrows, int skiprows)
      Updates the current DBView.
      Overrides:
      fetchRange in class ServerTableView
      Parameters:
      maxrows - the number of max rows
      skiprows - the number of skip rows
      Returns:
      the current DBView.
    • buildDBView

      protected DBView buildDBView(int maxRows, int skipRows, PoolKit poolKit) throws DAValidateException, DAException
      Launches the search event in order to update the current DBView.
      Parameters:
      maxRows - the number of max rows
      skipRows - the number of skip rows
      poolKit - the PoolKit
      Returns:
      the current DBView
      Throws:
      DAValidateException - the DA validate exception
      DAException - the DA exception
    • makePage

      protected Page makePage(int maxRows)
    • getLastPageIndex

      protected int getLastPageIndex()
    • getSearchEvent

      protected SearchEvent<? extends DynO,? extends DynO> getSearchEvent()
    • getSearchEvent

      protected SearchEvent<? extends DynO,? extends DynO> getSearchEvent(Page page)
    • makeFilter

      protected DynO makeFilter(EventServerTableView.EventSearch eventAnnotation)
      Initializes the class of the search filter.
      Parameters:
      eventAnnotation - the event annotation
      Returns:
      the DynO representing the search filter
    • makeSearchEvent

      protected SearchEvent<? extends DynO,? extends DynO> makeSearchEvent(EventServerTableView.EventSearch eventAnnotation, Page page, DynO searchFilter)
      Initializes the class of the search event.
      Parameters:
      eventAnnotation - the event annotation
      page - the page
      searchFilter - the search filter
      Returns:
      the search event
    • buildExtractor

      protected DynOExtractor<T> buildExtractor(EventServerTableView.EventSearch eventAnnotation)
    • buildExtractor

      protected DynOExtractor<T> buildExtractor(EventServerTableView.EventLoad eventAnnotation)
    • buildExtractor

      protected DynOExtractor<T> buildExtractor(Class<?> extractorClass)
    • completeRowData

      protected void completeRowData(DBView dbv, int rowNumber, T object, PoolKit poolKit) throws DAValidateException, DAException
      Completes the row data of the DBView extracted by the search event.
      Parameters:
      dbv - the current @link DBView}
      rowNumber - the row number
      object - the current business object of EventServerTableView type
      poolKit - the PoolKit
      Throws:
      DAValidateException - the DA validate exception
      DAException - the DA exception
    • loadCachedData

      protected void loadCachedData(List<T> object, PoolKit poolKit) throws DAValidateException, DAException
      Method used to load precomputed or cached data for multiple objects and store it in a map for later use. This method is intended to be overridden by subclasses, which should implement the logic for loading the necessary data for each object.
      Parameters:
      object - The object for which to load the data.
      poolKit - the PoolKit
      Throws:
      DAValidateException - If an error occurs during data validation.
      DAException - If an error occurs during the query execution or data processing.
    • updateRow

      public boolean updateRow(int row) throws DAValidateException, DAException
      Updates the required table row.
      Parameters:
      row - the row to update
      Returns:
      true if the row is updated, false otherwise
      Throws:
      DAValidateException - the DA validate exception
      DAException - the DA exception
    • updateRow

      public boolean updateRow(int row, PoolKit poolKit) throws DAValidateException, DAException
      Updates the required table row.
      Parameters:
      row - the row to update
      poolKit - the PoolKit
      Returns:
      true if the row is updated, false otherwise
      Throws:
      DAValidateException - the DA validate exception
      DAException - the DA exception
    • updateRow

      public boolean updateRow(int row, T object, PoolKit poolKit) throws DAValidateException, DAException
      Updates the required table row.
      Parameters:
      row - the row to update
      object - the business object of EventServerTableView type of this row
      poolKit - the PoolKit
      Returns:
      true if the row is updated, false otherwise
      Throws:
      DAValidateException - the DA validate exception
      DAException - the DA exception
    • getIdValue

      protected Long getIdValue(T currentBO)
      Returns the id of the current business object of EventServerTableView type.
      Parameters:
      currentBO - the current business object of EventServerTableView type.
      Returns:
      the current business object id
    • getAdditionalColumns

      protected String[] getAdditionalColumns()
      Defines the columns that must be added to the table's DBView.
      Returns:
      the additional columns
    • getRowObject

      public T getRowObject(int row)