package com.sa.ibiz.demo.demoapp.controller;

import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.sa.ibiz.demo.ibizutil.domain.ActionResult;
import com.sa.ibiz.demo.ibizutil.domain.CodeList;
import com.sa.ibiz.demo.ibizutil.errors.BadRequestAlertException;
import org.springframework.validation.annotation.Validated;
import org.springframework.http.ResponseEntity;

@RestController
@RequestMapping("/demoapp/app/codelist")
public class DemoAppCodeListController{

	@Resource(name="ionicdemo_SysOperatorCodeList")
	private com.sa.ibiz.demo.demo.codelist.SysOperatorCodeList ionicdemo_SysOperatorCodeList;


	@Resource(name="ionicdemo_YesNoCodeList")
	private com.sa.ibiz.demo.demo.codelist.YesNoCodeList ionicdemo_YesNoCodeList;


	@Resource(name="ionicdemo_CodeList56CodeList")
	private com.sa.ibiz.demo.demo.codelist.CodeList56CodeList ionicdemo_CodeList56CodeList;


	@Resource(name="ionicdemo_URDSecDRCodeList")
	private com.sa.ibiz.demo.demo.codelist.URDSecDRCodeList ionicdemo_URDSecDRCodeList;


	@Resource(name="ionicdemo_URDOrgDRCodeList")
	private com.sa.ibiz.demo.demo.codelist.URDOrgDRCodeList ionicdemo_URDOrgDRCodeList;


	@Resource(name="ionicdemo_URDUserDRCodeList")
	private com.sa.ibiz.demo.demo.codelist.URDUserDRCodeList ionicdemo_URDUserDRCodeList;


	@Resource(name="ionicdemo_URDBCDRCodeList")
	private com.sa.ibiz.demo.demo.codelist.URDBCDRCodeList ionicdemo_URDBCDRCodeList;


	@Resource(name="ionicdemo_CodeList58CodeList")
	private com.sa.ibiz.demo.demo.codelist.CodeList58CodeList ionicdemo_CodeList58CodeList;


	@Resource(name="ionicdemo_UserRoleTypeCodeList")
	private com.sa.ibiz.demo.demo.codelist.UserRoleTypeCodeList ionicdemo_UserRoleTypeCodeList;


	@Resource(name="ionicdemo_CodeList16CodeList")
	private com.sa.ibiz.demo.demo.codelist.CodeList16CodeList ionicdemo_CodeList16CodeList;


	@Resource(name="ionicdemo_CodeList59CodeList")
	private com.sa.ibiz.demo.demo.codelist.CodeList59CodeList ionicdemo_CodeList59CodeList;


	@Resource(name="ionicdemo_CodeList5CodeList")
	private com.sa.ibiz.demo.demo.codelist.CodeList5CodeList ionicdemo_CodeList5CodeList;



	@RequestMapping("ionicdemo/sysoperator")
    public ResponseEntity<CodeList> getionicdemo_SysOperatorCodeList(){
    	return ResponseEntity.ok().body(ionicdemo_SysOperatorCodeList.getCodeList());
	}
	@RequestMapping("ionicdemo/yesno")
    public ResponseEntity<CodeList> getionicdemo_YesNoCodeList(){
    	return ResponseEntity.ok().body(ionicdemo_YesNoCodeList.getCodeList());
	}
	@RequestMapping("ionicdemo/codelist56")
    public ResponseEntity<CodeList> getionicdemo_CodeList56CodeList(){
    	return ResponseEntity.ok().body(ionicdemo_CodeList56CodeList.getCodeList());
	}
	@RequestMapping("ionicdemo/urdsecdr")
    public ResponseEntity<CodeList> getionicdemo_URDSecDRCodeList(){
    	return ResponseEntity.ok().body(ionicdemo_URDSecDRCodeList.getCodeList());
	}
	@RequestMapping("ionicdemo/urdorgdr")
    public ResponseEntity<CodeList> getionicdemo_URDOrgDRCodeList(){
    	return ResponseEntity.ok().body(ionicdemo_URDOrgDRCodeList.getCodeList());
	}
	@RequestMapping("ionicdemo/urduserdr")
    public ResponseEntity<CodeList> getionicdemo_URDUserDRCodeList(){
    	return ResponseEntity.ok().body(ionicdemo_URDUserDRCodeList.getCodeList());
	}
	@RequestMapping("ionicdemo/urdbcdr")
    public ResponseEntity<CodeList> getionicdemo_URDBCDRCodeList(){
    	return ResponseEntity.ok().body(ionicdemo_URDBCDRCodeList.getCodeList());
	}
	@RequestMapping("ionicdemo/codelist58")
    public ResponseEntity<CodeList> getionicdemo_CodeList58CodeList(){
    	return ResponseEntity.ok().body(ionicdemo_CodeList58CodeList.getCodeList());
	}
	@RequestMapping("ionicdemo/userroletype")
    public ResponseEntity<CodeList> getionicdemo_UserRoleTypeCodeList(){
    	return ResponseEntity.ok().body(ionicdemo_UserRoleTypeCodeList.getCodeList());
	}
	@RequestMapping("ionicdemo/codelist16")
    public ResponseEntity<CodeList> getionicdemo_CodeList16CodeList(){
    	return ResponseEntity.ok().body(ionicdemo_CodeList16CodeList.getCodeList());
	}
	@RequestMapping("ionicdemo/codelist59")
    public ResponseEntity<CodeList> getionicdemo_CodeList59CodeList(){
    	return ResponseEntity.ok().body(ionicdemo_CodeList59CodeList.getCodeList());
	}
	@RequestMapping("ionicdemo/codelist5")
    public ResponseEntity<CodeList> getionicdemo_CodeList5CodeList(){
    	return ResponseEntity.ok().body(ionicdemo_CodeList5CodeList.getCodeList());
	}

	@RequestMapping("getall")
    public ResponseEntity<List<CodeList>> getAll(){
     List<CodeList> list = new ArrayList<CodeList>();
    list.add(ionicdemo_SysOperatorCodeList.getCodeList());
    list.add(ionicdemo_YesNoCodeList.getCodeList());
    list.add(ionicdemo_CodeList56CodeList.getCodeList());
    list.add(ionicdemo_URDSecDRCodeList.getCodeList());
    list.add(ionicdemo_URDOrgDRCodeList.getCodeList());
    list.add(ionicdemo_URDUserDRCodeList.getCodeList());
    list.add(ionicdemo_URDBCDRCodeList.getCodeList());
    list.add(ionicdemo_CodeList58CodeList.getCodeList());
    list.add(ionicdemo_UserRoleTypeCodeList.getCodeList());
    list.add(ionicdemo_CodeList16CodeList.getCodeList());
    list.add(ionicdemo_CodeList59CodeList.getCodeList());
    list.add(ionicdemo_CodeList5CodeList.getCodeList());
    	return ResponseEntity.ok().body(list);
	}
}