Class PresenceInput
java.lang.Object
ch.tocco.nice2.optional.qualification.impl.util.entities.inputtypes.AbstractInputType
ch.tocco.nice2.optional.qualification.impl.util.entities.inputtypes.PresenceInput
handles display and logic for presence input types
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
Nested classes/interfaces inherited from class ch.tocco.nice2.optional.qualification.impl.util.entities.inputtypes.AbstractInputType
AbstractInputType.AbstractDataStoreRecord, AbstractInputType.AbstractStatistics, AbstractInputType.ExamRecord, AbstractInputType.InboundInputDataRecord, AbstractInputType.InboundRatingRecord, AbstractInputType.RatingRecord
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
aggregateInputData
(Input input) @Nullable Object
getDatabaseValue
(AbstractInputType.InboundInputDataRecord inboundInputDataRecord, Entity entity) @Nullable BigDecimal
getDatabaseValue
(AbstractInputType.InboundRatingRecord inboundRatingRecord, Entity entity) getDataStoreRecord
(InputData inputData) Returns aDataStoreRecord
as simplified representation of a givenInput_data
to be used in the client UI.getEvaluationObject
(InputData inputData) only calculated presence is relevant in evaluation, because any entered presence gets transferred to that fieldint
getNumNonEmptyRatings
(InputData inputData) get the number of non empty ratingsgetServerFeedback
(InputData inputData) used to display the entered and calculated presence in grade input@Nullable Object
getSingleRelevantRating
(InputData inputData) getStatistics
(Input input) getStatistics
(List<Input> inputs) getUserGradesDetailData
(InputData inputData) boolean
Determine whether a InputData entity is empty, i.e.writeDataStoreRecord
(AbstractInputType.InboundInputDataRecord inboundInputDataRecord, Entity entity) there are 2 cases to case about while writing dispense → simply add the boolean to the dispense field presence entered → write the value entered to both entered_ and calculated_presencevoid
writeDataStoreRecord
(AbstractInputType.InboundRatingRecord inboundRatingRecord, Entity entity) boolean
writeRow
(ImportHelper helper, org.apache.poi.ss.usermodel.Row row, InputData inputData) Methods inherited from class ch.tocco.nice2.optional.qualification.impl.util.entities.inputtypes.AbstractInputType
getEventsAsString, validateImportStructure
-
Constructor Details
-
PresenceInput
public PresenceInput()
-
-
Method Details
-
getDataStoreRecord
Description copied from class:AbstractInputType
Returns aDataStoreRecord
as simplified representation of a givenInput_data
to be used in the client UI.- Specified by:
getDataStoreRecord
in classAbstractInputType
- Parameters:
inputData
- theInput_data
to build the representation for- Returns:
- the simple representation of the given
Input_data
-
writeDataStoreRecord
public String writeDataStoreRecord(AbstractInputType.InboundInputDataRecord inboundInputDataRecord, Entity entity) there are 2 cases to case about while writing dispense → simply add the boolean to the dispense field presence entered → write the value entered to both entered_ and calculated_presence- Specified by:
writeDataStoreRecord
in classAbstractInputType
-
writeDataStoreRecord
public void writeDataStoreRecord(AbstractInputType.InboundRatingRecord inboundRatingRecord, Entity entity) - Specified by:
writeDataStoreRecord
in classAbstractInputType
-
getServerFeedback
used to display the entered and calculated presence in grade input- Specified by:
getServerFeedback
in classAbstractInputType
- Returns:
InputEditActionService.ServerFeedback
containing the two presence values
-
getDatabaseValue
@Nullable public @Nullable Object getDatabaseValue(AbstractInputType.InboundInputDataRecord inboundInputDataRecord, Entity entity) - Specified by:
getDatabaseValue
in classAbstractInputType
-
getDatabaseValue
@Nullable public @Nullable BigDecimal getDatabaseValue(AbstractInputType.InboundRatingRecord inboundRatingRecord, Entity entity) - Specified by:
getDatabaseValue
in classAbstractInputType
-
getDataType
- Specified by:
getDataType
in classAbstractInputType
- Returns:
- the datatype of the input data (e.g. double, text, etc.) as used to display in a ext grid
-
getEvaluationObject
only calculated presence is relevant in evaluation, because any entered presence gets transferred to that field- Specified by:
getEvaluationObject
in classAbstractInputType
- Returns:
- the data containing presence as text because it is a fixed and formatted value that should always be displayed
-
aggregateInputData
- Specified by:
aggregateInputData
in classAbstractInputType
-
getStatistics
- Specified by:
getStatistics
in classAbstractInputType
-
getStatistics
- Specified by:
getStatistics
in classAbstractInputType
-
isEmpty
Description copied from class:AbstractInputType
Determine whether a InputData entity is empty, i.e. no inputs have been made or all relevant inputs have been deleted- Specified by:
isEmpty
in classAbstractInputType
- Parameters:
inputData
- the InputData to analyze- Returns:
- true if the InputData is empty
-
getNumNonEmptyRatings
Description copied from class:AbstractInputType
get the number of non empty ratings- Specified by:
getNumNonEmptyRatings
in classAbstractInputType
- Parameters:
inputData
- the data- Returns:
- a number
>=
0
-
getSingleRelevantRating
- Specified by:
getSingleRelevantRating
in classAbstractInputType
-
writeRow
public boolean writeRow(ImportHelper helper, org.apache.poi.ss.usermodel.Row row, InputData inputData) - Specified by:
writeRow
in classAbstractInputType
-
getUserGradesDetailData
- Specified by:
getUserGradesDetailData
in classAbstractInputType
-