Package com.cordys.cpc.bsf.busobject

Examples of com.cordys.cpc.bsf.busobject.QueryObject


    {
      String orgDN = BSF.getOrganization();
      String orgUserDN = "cn="+UserName+",cn=organizational users,"+orgDN;

      String queryText = "SELECT  CALLID,SOLUTIONID  FROM CALLSOLUTIONS WHERE TENANTID=:TENANTID AND CALLID IN (SELECT CALLID FROM CALLS WHERE CONTACT=:CONTACT AND TENANTID=:TENANTID)";
      QueryObject query = new QueryObject(queryText);

      query.addParameter("TENANTID", "CALLSOLUTIONS.TENANTID",QueryObject.PARAM_STRING, orgDN);
      query.addParameter("CONTACT", "CALLS.CONTACT",QueryObject.PARAM_STRING, orgUserDN);

      query.setResultClass(CALLSOLUTIONS.class);

      BusObjectIterator<BusObject> busObjectIterator = query.getObjects();

      deleteIterator(busObjectIterator);


      queryText = "SELECT CALLID FROM CALLS WHERE CONTACT=:CONTACT AND TENANTID=:TENANTID";
      query = new QueryObject(queryText);

      query.addParameter("TENANTID", "CALLS.TENANTID",QueryObject.PARAM_STRING, orgDN);
      query.addParameter("CONTACT", "CALLS.CONTACT",QueryObject.PARAM_STRING, orgUserDN);

      query.setResultClass(CALLS.class);
      busObjectIterator = query.getObjects();

      deleteIterator(busObjectIterator);
    }
View Full Code Here


        return (SOLUTIONS)getSingleRelationObject(REL_SOLUTIONIDObject);
    }
    public SOLUTIONS loadSOLUTIONIDObject()
    {
        String queryText = "select * from \"SOLUTIONS\" where \"SOLUTIONID\" = :SOLUTIONID";
        QueryObject query = new QueryObject(queryText);
        query.addParameter("SOLUTIONID", "SOLUTIONS.SOLUTIONID", QueryObject.PARAM_INT, new Integer(getSOLUTIONID()));
        query.setResultClass(SOLUTIONS.class);
        return (SOLUTIONS)query.getObject();
    }
View Full Code Here

        }
    }
    public static com.cordys.demo.servicedesk.dao.CALLSOLUTIONS getCallsolutionsObject(int SOLUTIONID, int CALLID)
    {
        String queryText = "select * from \"CALLSOLUTIONS\" where \"SOLUTIONID\" = :SOLUTIONID and \"CALLID\" = :CALLID";
        QueryObject query = new QueryObject(queryText);
        query.addParameter("SOLUTIONID", "CALLSOLUTIONS.SOLUTIONID", QueryObject.PARAM_INT, new Integer(SOLUTIONID));
        query.addParameter("CALLID", "CALLSOLUTIONS.CALLID", QueryObject.PARAM_INT, new Integer(CALLID));
        query.setResultClass(CALLSOLUTIONS.class);
        return (CALLSOLUTIONS)query.getObject();
    }
View Full Code Here

    }

    public static BusObjectIterator<com.cordys.demo.servicedesk.dao.CALLSOLUTIONS> getCallsolutionsObjects(int fromSOLUTIONID, int toSOLUTIONID, int fromCALLID, int toCALLID, com.cordys.cpc.bsf.query.Cursor cursor)
    {
        String queryText = "select * from \"CALLSOLUTIONS\" where \"SOLUTIONID\" between :fromSOLUTIONID and :toSOLUTIONID and \"CALLID\" between :fromCALLID and :toCALLID";
        QueryObject query = new QueryObject(queryText);
        query.addParameter("fromSOLUTIONID", "CALLSOLUTIONS.SOLUTIONID", QueryObject.PARAM_INT, new Integer(fromSOLUTIONID));
        query.addParameter("toSOLUTIONID", "CALLSOLUTIONS.SOLUTIONID", QueryObject.PARAM_INT, new Integer(toSOLUTIONID));
        query.addParameter("fromCALLID", "CALLSOLUTIONS.CALLID", QueryObject.PARAM_INT, new Integer(fromCALLID));
        query.addParameter("toCALLID", "CALLSOLUTIONS.CALLID", QueryObject.PARAM_INT, new Integer(toCALLID));
        query.setResultClass(CALLSOLUTIONS.class);
        query.setCursor(cursor);
        return query.getObjects();
    }
View Full Code Here

    }

    public static BusObjectIterator<com.cordys.demo.servicedesk.dao.CALLSOLUTIONS> getCallsolutionsObjects(int fromSOLUTIONID, int toSOLUTIONID, int fromCALLID, int toCALLID)
    {
        String queryText = "select * from \"CALLSOLUTIONS\" where \"SOLUTIONID\" between :fromSOLUTIONID and :toSOLUTIONID and \"CALLID\" between :fromCALLID and :toCALLID";
        QueryObject query = new QueryObject(queryText);
        query.addParameter("fromSOLUTIONID", "CALLSOLUTIONS.SOLUTIONID", QueryObject.PARAM_INT, new Integer(fromSOLUTIONID));
        query.addParameter("toSOLUTIONID", "CALLSOLUTIONS.SOLUTIONID", QueryObject.PARAM_INT, new Integer(toSOLUTIONID));
        query.addParameter("fromCALLID", "CALLSOLUTIONS.CALLID", QueryObject.PARAM_INT, new Integer(fromCALLID));
        query.addParameter("toCALLID", "CALLSOLUTIONS.CALLID", QueryObject.PARAM_INT, new Integer(toCALLID));
        query.setResultClass(CALLSOLUTIONS.class);
        return query.getObjects();
    }
View Full Code Here

    }

    public static BusObjectIterator<com.cordys.demo.servicedesk.dao.CALLSOLUTIONS> getCallsolutionsObjectsForCallid(int CALLID)
    {
        String queryText = "select * from \"CALLSOLUTIONS\" where \"CALLID\" = :CALLID";
        QueryObject query = new QueryObject(queryText);
        query.addParameter("CALLID", "CALLSOLUTIONS.CALLID", QueryObject.PARAM_INT, new Integer(CALLID));
        query.setResultClass(CALLSOLUTIONS.class);
        return query.getObjects();
    }
View Full Code Here

    }

    public static BusObjectIterator<com.cordys.demo.servicedesk.dao.CALLSOLUTIONS> getCallsolutionsObjectsForSolutionid(int SOLUTIONID)
    {
        String queryText = "select * from \"CALLSOLUTIONS\" where \"SOLUTIONID\" = :SOLUTIONID";
        QueryObject query = new QueryObject(queryText);
        query.addParameter("SOLUTIONID", "CALLSOLUTIONS.SOLUTIONID", QueryObject.PARAM_INT, new Integer(SOLUTIONID));
        query.setResultClass(CALLSOLUTIONS.class);
        return query.getObjects();
    }
View Full Code Here

    }

    public static BusObjectIterator<com.cordys.demo.servicedesk.dao.CALLSOLUTIONS> getNextCallsolutionsObjects(int SOLUTIONID, int CALLID, com.cordys.cpc.bsf.query.Cursor cursor)
    {
        String queryText = "select * from \"CALLSOLUTIONS\" where (\"SOLUTIONID\" > :SOLUTIONID) or (\"SOLUTIONID\" = :SOLUTIONID and \"CALLID\" > :CALLID) order by \"SOLUTIONID\" asc, \"CALLID\" asc";
        QueryObject query = new QueryObject(queryText);
        query.addParameter("SOLUTIONID", "CALLSOLUTIONS.SOLUTIONID", QueryObject.PARAM_INT, new Integer(SOLUTIONID));
        query.addParameter("CALLID", "CALLSOLUTIONS.CALLID", QueryObject.PARAM_INT, new Integer(CALLID));
        query.setResultClass(CALLSOLUTIONS.class);
        query.setCursor(cursor);
        return query.getObjects();
    }
View Full Code Here

    }

    public static BusObjectIterator<com.cordys.demo.servicedesk.dao.CALLSOLUTIONS> getPreviousCallsolutionsObjects(int SOLUTIONID, int CALLID, com.cordys.cpc.bsf.query.Cursor cursor)
    {
        String queryText = "select * from \"CALLSOLUTIONS\" where (\"SOLUTIONID\" < :SOLUTIONID) or (\"SOLUTIONID\" = :SOLUTIONID and \"CALLID\" < :CALLID) order by \"SOLUTIONID\" desc, \"CALLID\" desc";
        QueryObject query = new QueryObject(queryText);
        query.addParameter("SOLUTIONID", "CALLSOLUTIONS.SOLUTIONID", QueryObject.PARAM_INT, new Integer(SOLUTIONID));
        query.addParameter("CALLID", "CALLSOLUTIONS.CALLID", QueryObject.PARAM_INT, new Integer(CALLID));
        query.setResultClass(CALLSOLUTIONS.class);
        query.setCursor(cursor);
        return query.getObjects();
    }
View Full Code Here

  }
 
   public static com.cordys.demo.servicedesk.dao.CALLS getCallsObject(int CALLID)
    {
        String queryText = "select * from \"CALLS\" where \"TENANTID\"= :TENANTID and  \"CALLID\" = :CALLID";
        QueryObject query = new QueryObject(queryText);
        query.addParameter("TENANTID", "CALLS.TENANTID", QueryObject.PARAM_STRING,BSF.getOrganization());   /* fill tenent! */
        query.addParameter("CALLID", "CALLS.CALLID", QueryObject.PARAM_INT, new Integer(CALLID));
        query.setResultClass(CALLS.class);
        return (CALLS)query.getObject();
    }
View Full Code Here

TOP

Related Classes of com.cordys.cpc.bsf.busobject.QueryObject

Copyright © 2018 www.massapicom. 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.