Package com.almis.awe.model.service
Class DataListService
java.lang.Object
com.almis.awe.config.ServiceConfig
com.almis.awe.model.service.DataListService
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
-
Constructor Summary
ConstructorDescriptionDataListService
(org.springframework.core.convert.ConversionService conversionService) -
Method Summary
Modifier and TypeMethodDescription<T> List<T>
asBeanList
(@NonNull DataList dataList, Class<T> beanClass) Return the datalist as bean list<T> List<T>
getParameterBeanListValue
(Class<T> beanClass, Map<String, Object> paramsMap) Retrieve parameter as bean list value.<T> T
getParameterBeanValue
(Class<T> beanClass, Map<String, Object> paramsMap) Retrieve parameter as bean value from JSON.Methods inherited from class com.almis.awe.config.ServiceConfig
containsBean, getApplicationContext, getBean, getBean, getElements, getLocale, getLocale, getProperty, getProperty, getRequest, getSession, setApplicationContext
-
Constructor Details
-
DataListService
@Autowired public DataListService(org.springframework.core.convert.ConversionService conversionService)
-
-
Method Details
-
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
- datalistbeanClass
- bean class- Returns:
- bean list
- Throws:
AWException
- AWE exception
-
getParameterBeanValue
public <T> T getParameterBeanValue(Class<T> beanClass, Map<String, Object> paramsMap) throws AWExceptionRetrieve parameter as bean value from JSON. You can use Spring Formatter SPI with annotations- Type Parameters:
T
- Bean type- Parameters:
beanClass
- Bean classparamsMap
- Parameter map- Returns:
- Bean value
- Throws:
AWException
- AWE Exception
-
getParameterBeanListValue
public <T> List<T> getParameterBeanListValue(Class<T> beanClass, Map<String, Object> paramsMap) throws AWExceptionRetrieve parameter as bean list value. You can use Spring Formatter SPI with annotations.- Parameters:
beanClass
- Bean classparamsMap
- Parameter map- Returns:
- Bean list
- Throws:
AWException
- AWE exception
-