Search in sources :

Example 21 with AppService

use of org.cerberus.crud.entity.AppService in project cerberus-source by cerberustesting.

the class AppServiceService method readByKeyWithDependency.

@Override
public AnswerItem readByKeyWithDependency(String key, String activedetail) {
    AnswerItem answerAppService = this.readByKey(key);
    AppService appService = (AppService) answerAppService.getItem();
    try {
        AnswerList content = appServiceContentService.readByVarious(key, activedetail);
        appService.setContentList((List<AppServiceContent>) content.getDataList());
        AnswerList header = appServiceHeaderService.readByVarious(key, activedetail);
        appService.setHeaderList((List<AppServiceHeader>) header.getDataList());
        answerAppService.setItem(appService);
    } catch (Exception e) {
        LOG.error(e);
    }
    return answerAppService;
}
Also used : AppService(org.cerberus.crud.entity.AppService) AnswerList(org.cerberus.util.answer.AnswerList) AppServiceContent(org.cerberus.crud.entity.AppServiceContent) AppServiceHeader(org.cerberus.crud.entity.AppServiceHeader) AnswerItem(org.cerberus.util.answer.AnswerItem) CerberusException(org.cerberus.exception.CerberusException)

Aggregations

AppService (org.cerberus.crud.entity.AppService)21 AnswerItem (org.cerberus.util.answer.AnswerItem)13 MessageEvent (org.cerberus.engine.entity.MessageEvent)12 IFactoryAppService (org.cerberus.crud.factory.IFactoryAppService)11 ArrayList (java.util.ArrayList)9 AppServiceHeader (org.cerberus.crud.entity.AppServiceHeader)7 IAppServiceService (org.cerberus.crud.service.IAppServiceService)7 CerberusException (org.cerberus.exception.CerberusException)7 JSONObject (org.json.JSONObject)7 AppServiceContent (org.cerberus.crud.entity.AppServiceContent)6 AnswerList (org.cerberus.util.answer.AnswerList)6 Connection (java.sql.Connection)4 PreparedStatement (java.sql.PreparedStatement)4 ResultSet (java.sql.ResultSet)4 SQLException (java.sql.SQLException)4 IFactoryAppServiceHeader (org.cerberus.crud.factory.IFactoryAppServiceHeader)4 JSONArray (org.json.JSONArray)4 ApplicationContext (org.springframework.context.ApplicationContext)4 IOException (java.io.IOException)3 List (java.util.List)3