java.lang.Object
ch.tocco.nice2.optional.qualification.impl.util.entities.inputtypes.AbstractInputType
Direct Known Subclasses:
AbstractPointsInput, FreeTextInput, GradesInput, PresenceInput, TextChoiceInput

public abstract class AbstractInputType extends Object
  • Constructor Details

    • AbstractInputType

      public AbstractInputType()
  • Method Details

    • getDataStoreRecord

      public abstract DataStoreRecord getDataStoreRecord(InputData inputData)
      Returns a DataStoreRecord as simplified representation of a given Input_data to be used in the client UI.
      Parameters:
      inputData - the Input_data to build the representation for
      Returns:
      the simple representation of the given Input_data
    • writeDataStoreRecord

      public abstract String writeDataStoreRecord(AbstractInputType.InboundInputDataRecord inboundInputDataRecord, Entity entity)
    • writeDataStoreRecord

      public abstract void writeDataStoreRecord(AbstractInputType.InboundRatingRecord inboundRatingRecord, Entity entity)
    • getServerFeedback

      public abstract InputEditActionService.ServerFeedback getServerFeedback(InputData inputData)
    • getDatabaseValue

      @Nullable public abstract @Nullable Object getDatabaseValue(AbstractInputType.InboundInputDataRecord inboundInputDataRecord, Entity entity)
    • getDatabaseValue

      @Nullable public abstract @Nullable BigDecimal getDatabaseValue(AbstractInputType.InboundRatingRecord inboundRatingRecord, Entity entity)
    • getDataType

      public abstract String getDataType()
      Returns:
      the datatype of the input data (e.g. double, text, etc.) as used to display in a ext grid
    • getEvaluationObject

      public abstract GradeData getEvaluationObject(InputData inputData)
      Returns:
      the object containing the values to be displayed in the evaluation grid after evaluation
    • aggregateInputData

      public abstract void aggregateInputData(Input input)
    • getStatistics

      public abstract AbstractInputType.AbstractStatistics getStatistics(Input input)
    • getStatistics

      public abstract AbstractInputType.AbstractStatistics getStatistics(List<Input> input)
    • isEmpty

      public abstract boolean isEmpty(InputData inputData)
      Determine whether a InputData entity is empty, i.e. no inputs have been made or all relevant inputs have been deleted
      Parameters:
      inputData - the InputData to analyze
      Returns:
      true if the InputData is empty
    • getNumNonEmptyRatings

      public abstract int getNumNonEmptyRatings(InputData inputData)
      get the number of non empty ratings
      Parameters:
      inputData - the data
      Returns:
      a number >= 0
    • getSingleRelevantRating

      public abstract Object getSingleRelevantRating(InputData inputData)
    • writeRow

      public abstract boolean writeRow(ImportHelper helper, org.apache.poi.ss.usermodel.Row row, InputData inputData)
    • getUserGradesDetailData

      public abstract Map<String,Object> getUserGradesDetailData(InputData inputData)
    • validateImportStructure

      public Optional<ImporterMessage> validateImportStructure(org.apache.poi.ss.usermodel.Row headerRow, Input input)
    • getEventsAsString

      protected String getEventsAsString(EntityList events, DefaultDisplayService defaultDisplayService)
      create a string representation of a EntityList of Event entities
      Returns:
      a newline-separated string of all default displays