Examples of SqlSession


Examples of org.apache.ibatis.session.SqlSession

        //initFlagList();
    }

    private void initServiceList() {
        SqlSession sess = IBatisFactory.getInstance().getSqlSession();
        ServiceList = sess.selectList("Service.getServices");
        sess = null;

        // show the service
        Combobox serviceCB = (Combobox) getFellow("service");
        for (int index = 0; index < ServiceList.size(); index++) {
View Full Code Here

Examples of org.apache.ibatis.session.SqlSession

        }

    }

    private void initFlagList() {
        SqlSession sess = IBatisFactory.getInstance().getSqlSession();
        activeFlagList = sess.selectList("Fun.getActiveFlag");
        bootFlagList = sess.selectList("Fun.getBootFlag");
        sess = null;

        Combobox activeFlagCb = (Combobox) getFellow("ActiveFlag");
        Iterator activeFlagIt = activeFlagList.iterator();
        while (activeFlagIt.hasNext()) {
View Full Code Here

Examples of org.apache.ibatis.session.SqlSession

            bootFlagItem.setParent(bootFlagCb);
        }
    }

    private void initFunFormList() {
        SqlSession sess = IBatisFactory.getInstance().getSqlSession();
        funList = sess.selectList("Fun.getAll");
        sess = null;

        // show the function
        Tree objTree = (Tree) getFellow("objTree");
View Full Code Here

Examples of org.apache.ibatis.session.SqlSession

        refreshObjEntities();
    }

    private Fun getById(int funId) {
        SqlSession sess = IBatisFactory.getInstance().getSqlSession();
        Fun fun = (Fun) sess.selectOne("Fun.getById", funId);
        sess = null;
        return fun;
    }
View Full Code Here

Examples of org.apache.ibatis.session.SqlSession

    // ck
    public void refreshObjEntities() {
        objTree = (Tree) getFellow("objTree");

        SqlSession sess = IBatisFactory.getInstance().getSqlSession();
        objList = sess.selectList("Fun.getAll");
        sess = null;

        treeModel = new SimpleTreeModel(prepareRootNode(objList));

        objTree.setModel(treeModel);
View Full Code Here

Examples of org.apache.ibatis.session.SqlSession

    }

    private void initAuthListbox() {
        Listbox authListbox = (Listbox) getFellow("auth");

        SqlSession sess = IBatisFactory.getInstance().getSqlSession();
        List authList = sess.selectList("Auth.getAll");
        sess = null;

        ListModel authModel = new ListModelList(authList, true);
        authListbox.setModel(authModel);
        authListbox.setItemRenderer(authListRenderer);
View Full Code Here

Examples of org.apache.ibatis.session.SqlSession

        System.out.println("auth type id===============:" + dutyInfo.getTypeId() + " " + dutyInfo.getAuthName());
        orgNameLabel.setValue(userInfo.getOrgName());
        userNameLabel.setValue(userInfo.getUserName());
        roleNameLabel.setValue(dutyInfo.getAuthName());

        SqlSession session = IBatisFactory.getInstance().getSqlSession();

        if (funFormList == null) {
            funFormList = session.selectList("Login.getFunAuth", new Integer(dutyInfo.getTypeId()));
        }

        logger.debug("funFormList size: " + funFormList.size() + " has saved to session");

        // show the function
View Full Code Here

Examples of org.apache.ibatis.session.SqlSession

    }

    public void refreshObjEntities() {
        objTree = (Tree) getFellow("objTree");

        SqlSession sess = IBatisFactory.getInstance().getSqlSession();
        objList = sess.selectList("Org.getAll");
        sess = null;

        logger.debug("record list size:" + objList.size());

        treeModel = new SimpleTreeModel(
View Full Code Here

Examples of org.apache.ibatis.session.SqlSession

        refreshObjEntities();
    }

    private Org getById(Long orgId) {
        SqlSession sess = IBatisFactory.getInstance().getSqlSession();
        Org org = (Org) sess.selectOne("Org.getById", orgId);
        sess = null;
        return org;
    }
View Full Code Here

Examples of org.apache.ibatis.session.SqlSession

        Map para = new HashMap();
        para.put("account", account);
        para.put("password", Utility.getInstance().md5(password));

        //  get Login UserInfo
        SqlSession session = IBatisFactory.getInstance().getSqlSession();
        UserInfo userInfo = (UserInfo) session.selectOne("Login.searchUserInfo", para);

        if (userInfo == null) {
            try {
                Messagebox.show("輸入的使用者帳戶或密碼有錯", "錯誤的資料", Messagebox.RETRY, Messagebox.ERROR);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            return;
        } else {
            logger.debug("User's company org id: " + " (" + userInfo.getOrgId() + ")  and user's id:"+userInfo.getUserId());

            this.getDesktop().getSession().setAttribute("userInfo", userInfo);
        }

        // get User's dutyInfo
        session = IBatisFactory.getInstance().getSqlSession();
        List dutyInfoList = session.selectList("Login.searchDutyInfo", userInfo.getUserId());

        if (dutyInfoList == null || dutyInfoList.size() ==0) {
            logger.info("There is no available dutyInfo ");
            try {
                Messagebox.show("該使用者無可用的 " + "" + " 權限身份", "錯誤的資料", Messagebox.RETRY, Messagebox.ERROR);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.