Class AnswerDataFactory

java.lang.Object
org.javarosa.core.model.data.AnswerDataFactory

public class AnswerDataFactory
extends Object
This is not a factory, actually, since there's no drop-in component model, but it could be in the future. Just wanted a centralized place to dispatch common templating methods. In the future this could be a legitimate factory which is stored in... say... the evaluation context
Author:
ctsims
  • Constructor Details

  • Method Details

    • template

      public static IAnswerData template​(int controlType, int datatype)
      The one-template to rule them all. Takes in a control type and a data type and returns the appropriate answer data template with which to cast incoming values. All enormous spaghetti ifs should be replaced with a call to this
    • templateByDataType

      public static IAnswerData templateByDataType​(int datatype)