Class EnumBuilder

java.lang.Object
com.almis.awe.config.ServiceConfig
com.almis.awe.service.data.builder.EnumBuilder
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class EnumBuilder extends ServiceConfig
Generate enumerated datalists
  • Constructor Details

    • EnumBuilder

      public EnumBuilder()
  • Method Details

    • setEnumerated

      public EnumBuilder setEnumerated(String enumeratedId)
      Assigns the query to be recovered
      Parameters:
      enumeratedId - Enumerated identifier
      Returns:
      this
    • getEnumerated

      public EnumeratedGroup getEnumerated() throws AWException
      Launches a query (must be defined in APP or awe Queries.xml file) and generates the output Query comes defined in target-action variable
      Returns:
      Enumerated group
      Throws:
      AWException - Error retrieving enumerated group
    • build

      public List<Global> build() throws AWException
      Launches a query (must be defined in APP or awe Queries.xml file) and generates the output Query comes defined in target-action variable
      Returns:
      Enumerated
      Throws:
      AWException - Error building enumerated
    • getEnumeratedAsJson

      public com.fasterxml.jackson.databind.node.ArrayNode getEnumeratedAsJson() throws AWException
      Get enumerated element as Json
      Returns:
      Enumerated as Json
      Throws:
      AWException - Error retrieving enumerated
    • getEnumeratedAsDataList

      public DataList getEnumeratedAsDataList() throws AWException
      Get enumerated element as DataList
      Returns:
      Enumerated element as DataList
      Throws:
      AWException - Error retrieving enumerated
    • findLabel

      public String findLabel(String value) throws AWException
      Find a enumerated label
      Parameters:
      value - Label value
      Returns:
      Label found
      Throws:
      AWException - Enumerated not found
    • getOptionListAsJson

      public com.fasterxml.jackson.databind.node.ArrayNode getOptionListAsJson(EnumeratedGroup enumerated)
      Returns the group option list
      Parameters:
      enumerated - enumerated
      Returns:
      Group option list
    • getJsonRow

      public com.fasterxml.jackson.databind.node.ObjectNode getJsonRow(Global option)
      Retrieve the data as a json row
      Parameters:
      option - option
      Returns:
      Json row