Class GridCustomFieldHandler

java.lang.Object
ch.cern.eam.wshub.core.services.grids.customfields.GridCustomFieldHandler
All Implemented Interfaces:
Serializable

public class GridCustomFieldHandler extends Object implements Serializable
Handles the custom fields when making grid requests.
Author:
pkulig
See Also:
  • Field Details

    • NUMERICAL_VALUE

      public static String NUMERICAL_VALUE
      EAM stores different types of custom fields in different fields in R5PROPERTYVALUES
    • DATE_VALUE

      public static String DATE_VALUE
    • VARCHAR_VALUE

      public static String VARCHAR_VALUE
  • Constructor Details

    • GridCustomFieldHandler

      public GridCustomFieldHandler(Tools tools)
  • Method Details

    • initializeForDataspy

      public void initializeForDataspy(String dataspyID)
      Initializes the handler, to fetch custom fields for a given dataspy. This dataspy is then in the state of the handler to avoid fetching the custom fields multiple times.
      Parameters:
      dataspyID -
    • getCustomFieldsAsDataspyFields

      public List<DataspyField> getCustomFieldsAsDataspyFields()
      Converts custom fields (DataspyCustomField) to normal dataspy fields (DataspyField)
    • attachCustomFields

      public List<String> attachCustomFields(List<String> sqlStatements)
      In the JPAGrids class we fetch all the fields that need to be selected, as a list. This method attaches the names of the of the custom fields to this list.
    • addCustomFieldsJoinClause

      public String addCustomFieldsJoinClause(String sqlStatementFrom)
      Adds the join clause to the SQL used to fetch the grid.
    • getCustomFieldsAsGridFields

      public GridField[] getCustomFieldsAsGridFields(String dataspyID)
    • getCustomFieldsForGrid

      public Map<String,DataField> getCustomFieldsForGrid(String gridID)
      Fetches the custom fields possible for a grid. To do this it checks all custom fields belonging to dataspies belonging to a grid. Also fetches the type of the custom fields.
    • getCustomFieldJoinConditions

      public String getCustomFieldJoinConditions()
      For parts we have to use the deprecated join syntax with the plus (+) To make the join we add ANDs to the where clause.
    • getDataspyID

      public String getDataspyID()