def getDqType: DqType = if()

in measure/src/main/scala/org/apache/griffin/measure/configuration/dqdefinition/DQConfig.scala [250:270]


  def getDqType: DqType = if (dqType != null) DqType.withNameWithDefault(dqType) else Unknown
  def getCache: Boolean = if (cache) cache else false

  def getInDfName(defName: String = ""): String = if (inDfName != null) inDfName else defName
  def getOutDfName(defName: String = ""): String = if (outDfName != null) outDfName else defName
  def getRule: String = if (rule != null) rule else ""
  def getDetails: Map[String, Any] = if (details != null) details else Map[String, Any]()

  def getOutputs: Seq[RuleOutputParam] = if (outputs != null) outputs else Nil
  def getOutputOpt(tp: OutputType): Option[RuleOutputParam] =
    getOutputs.find(_.getOutputType == tp)

  def getErrorConfs: Seq[RuleErrorConfParam] = if (errorConfs != null) errorConfs else Nil

  def validate(): Unit = {
    assert(!StringUtil.isNullOrEmpty(dqType), "DQ type cannot be null.")
    assert(Try(getDqType).isSuccess, s"Undefined measure type '$dqType' encountered.")

    getOutputs.foreach(_.validate())
    getErrorConfs.foreach(_.validate())
  }