Class DataListService

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

    public class DataListService
    extends ServiceConfig
    • Constructor Detail

      • DataListService

        @Autowired
        public DataListService​(org.springframework.core.convert.ConversionService conversionService)
    • Method Detail

      • asBeanList

        public <T> List<T> asBeanList​(@NonNull
                                      @NonNull DataList dataList,
                                      Class<T> beanClass)
                               throws AWException
        Return the datalist as bean list
        Type Parameters:
        T - class type
        Parameters:
        dataList - datalist
        beanClass - bean class
        Returns:
        bean list
        Throws:
        AWException - AWE exception
      • getParameterBeanValue

        public <T> T getParameterBeanValue​(Class<T> beanClass,
                                           Map<String,​Object> paramsMap)
                                    throws AWException
        Retrieve parameter as bean value from JSON. You can use Spring Formatter SPI with annotations
        Type Parameters:
        T - Bean type
        Parameters:
        beanClass - Bean class
        paramsMap - Parameter map
        Returns:
        Bean value
        Throws:
        AWException - AWE Exception
      • getParameterBeanListValue

        public <T> List<T> getParameterBeanListValue​(Class<T> beanClass,
                                                     Map<String,​Object> paramsMap)
                                              throws AWException
        Retrieve parameter as bean list value. You can use Spring Formatter SPI with annotations.
        Parameters:
        beanClass - Bean class
        paramsMap - Parameter map
        Returns:
        Bean list
        Throws:
        AWException - AWE exception