Package easyJ.database.session

Examples of easyJ.database.session.Session.query()


        Filter filter = DAOFactory.getFilter("scenarioVersionId",
                SQLOperator.EQUAL, scenarioversionId);
       
        scmd.setFilter(filter);
        Session session = SessionFactory.openSession();
        ArrayList scenarioVersions = session.query(scmd);
        if (scenarioVersions.size() > 0) {
            scenarioversion = (ScenarioVersion) scenarioVersions.get(0);
        }
        // 将参与者取出
        object = BeanUtil
View Full Code Here


        String[] participants = new String[10];
        participants = scenarioversion.getParticipants().split("\\,");
        Filter filter_participants = DAOFactory.getFilter("roleId",
                SQLOperator.IN, participants);
        scmd.setFilter(filter_participants);
        ArrayList participantList = session.query(scmd);
        String participantcontent = "";
        for (int j = 0; j < participantList.size(); j++) {
            participant = (Role) participantList.get(j);
            participantcontent = participantcontent + participant.getRoleName();
        }
View Full Code Here

        String[] communicators = new String[10];
        communicators = scenarioversion.getCommunicators().split("\\,");
        Filter filter_communicators = DAOFactory.getFilter("roleId",
                SQLOperator.IN, communicators);
        scmd.setFilter(filter_communicators);
        ArrayList communicatorList = session.query(scmd);
        String communicatorcontent = "";
        for (int j = 0; j < communicatorList.size(); j++) {
            communicator = (Role) communicatorList.get(j);
            communicatorcontent = communicatorcontent
                    + communicator.getRoleName();
View Full Code Here

        String[] observers = new String[10];
        observers = scenarioversion.getObservers().split("\\,");
        Filter filter_observers = DAOFactory.getFilter("roleId",
                SQLOperator.IN, observers);
        scmd.setFilter(filter_observers);
        ArrayList observerList = session.query(scmd);
        String observercontent = "";
        for (int j = 0; j < observerList.size(); j++) {
            observer = (Role) observerList.get(j);
            observercontent = observercontent + observer.getRoleName();
        }
View Full Code Here

        String[] datas = new String[10];
        datas = scenarioversion.getDatas().split("\\,");
        Filter filter_datas = DAOFactory.getFilter("dataId", SQLOperator.IN,
                datas);
        scmd.setFilter(filter_datas);
        ArrayList dataList = session.query(scmd);
        String datacontent = "";
        for (int j = 0; j < dataList.size(); j++) {
            data = (Data) dataList.get(j);
            datacontent = datacontent + data.getDataName();
        }
View Full Code Here

            clazz = object.getClass();
            scmd = DAOFactory.getSelectCommand(clazz);
            Filter filter_participant = DAOFactory.getFilter("roleId",
                    SQLOperator.EQUAL, parti[i]);
            scmd.setFilter(filter_participant);
            ArrayList participantsList = session.query(scmd);
            if (participantsList.size() > 0) {
                participant = (Role) participantsList.get(0);
            }
            content = content
                    + "<tr  class=\"trContent\" ><th class=\"trContent\" width=\"80px\">"
View Full Code Here

                    SQLOperator.EQUAL, parti[i]);
            Filter filterdescription1 = DAOFactory.getFilter();
            filterdescription1.addFilter(filterdescription3);
            filterdescription1.addFilter(filterdescription2, LogicOperator.AND);
            scmd.setFilter(filterdescription1);
            ArrayList descriptionsList = session.query(scmd);
            if (descriptionsList.size() > 0) {
                description = (DescriptionVersion) descriptionsList.get(0);

                content = content
                        + "<td colspan=\"3\" class=\"tr\"><div class=\"trContent\">"
View Full Code Here

            clazz = object.getClass();
            scmd = DAOFactory.getSelectCommand(clazz);
            Filter filterremark = DAOFactory.getFilter("roleId",
                    SQLOperator.EQUAL, parti[i]);
            scmd.setFilter(filterremark);
            ArrayList remarkList = session.query(scmd);
            content = content + "<div class=\"trtitle\">评论</div>";
            if (remarkList.size() > 0) {
                for (int j = 0; j < remarkList.size(); j++) {
                    remark = (Remark) remarkList.get(j);
                    content = content + "<div class=\"trContent\">"
View Full Code Here

                .getClass("cn.edu.pku.dr.requirement.elicitation.data.Role");
        SelectCommand scmd = DAOFactory.getSelectCommand(clazz);
        Filter filter1 = DAOFactory.getFilter("roleId", SQLOperator.EQUAL,
                creatorId);
        scmd.setFilter(filter1);
        ArrayList creators = session.query(scmd);
        String creatorName = "";
        if (creators.size() > 0) {
            Role creator = (Role) creators.get(0);
            creatorName = creator.getRoleName();
        }
View Full Code Here

                creatorId);
        scmdDescriptionVersion.setFilter(filter);
        scmdDescriptionVersion.addOrderRule(new OrderRule(
                "descriptionVersionId", OrderDirection.DESC));
        Session session = SessionFactory.openSession();
        ArrayList tempdescriptionVersions = session
                .query(scmdDescriptionVersion);
        ArrayList descriptionVersions = new ArrayList();
        if (tempdescriptionVersions.size() > 8) {
            for (int size = 0; size < 8; size++) {
                descriptionVersions
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.