Examples of IQuery


Examples of com.google.enterprise.connector.dctm.dfcwrap.IQuery

      dql.append("',");
    }
    dql.setCharAt(dql.length() - 1, ')');
    dql.append(" ENABLE (row_based)");

    IQuery query = traversalManager.getClientX().getQuery();
    query.setDQL(dql.toString());
    try {
      ICollection collec = query.execute(session, IQuery.READ_QUERY);
      try {
        while (collec.next()) {
          values.add(
              Value.getStringValue(collec.getString("r_folder_path")));
        }
View Full Code Here

Examples of com.google.enterprise.connector.dctm.dfcwrap.IQuery

    try {
      session = sessionManager.getSession(docbase);

      if (checkpoint.getInsertIndex() == -1) {
        logger.fine("Processing Acls");
        IQuery queryAclToAdd = buildACLQuery(checkpoint);
        collecAclToAdd = queryAclToAdd.execute(session,
            IQuery.EXECUTE_READ_QUERY);
        logger.fine("execution of the query returns a collection of ACLs"
            + " to add");

        IQuery queryAclToModify = buildAclModifyQuery(checkpoint);
        collecAclToModify = queryAclToModify.execute(session,
            IQuery.EXECUTE_READ_QUERY);
        logger.fine("execution of the query returns a collection of ACLs"
            + " to modify");

        if ((collecAclToAdd != null && collecAclToAdd.hasNext())
            || (collecAclToModify != null && collecAclToModify.hasNext())) {
          documentList = new DctmAclList(this, session, collecAclToAdd,
              collecAclToModify, checkpoint);
        }
      } else {
        logger.fine("Processing Documents");
        IQuery query = buildAddQuery(checkpoint);
        collecToAdd = query.execute(session, IQuery.EXECUTE_READ_QUERY);
        logger.fine("execution of the query returns a collection of documents"
            + " to add");

        // Only execute the delete query with one of the add queries.
        // TODO: We could treat the delete query as a peer of the others,
        // and include it in the sequence.
        if (checkpoint.getInsertIndex() == 0) {
          IQuery queryDocToDel = buildDelQuery(checkpoint);
          collecToDel = queryDocToDel.execute(session,
              IQuery.EXECUTE_READ_QUERY);
          logger.fine("execution of the query returns a collection of " +
              "documents to delete");
        }
View Full Code Here

Examples of com.google.enterprise.connector.dctm.dfcwrap.IQuery

    checkpoint.setAclModifyCheckpoint(new Date(), null);
    return checkpoint;
  }

  protected IQuery makeQuery(String queryStr) {
    IQuery query = clientX.getQuery();
    query.setDQL(queryStr);
    return query;
  }
View Full Code Here

Examples of com.google.enterprise.connector.dctm.dfcwrap.IQuery

      IClientX cl, ISession sess, ConnectorFactory connectorFactory)
      throws RepositoryException {
    String whereClause = DqlUtils.stripLeadingAnd(configData.get(WHERECLAUSE));
    String rootType = configData.get(ROOT_OBJECT_TYPE);
    String includedTypes = configData.get(INCLUDED_OBJECT_TYPE);
    IQuery query = cl.getQuery();

    DctmConnector connector =
        (DctmConnector) connectorFactory.makeConnector(configData);
    List<String> whereClauses = connector.getWhereClause();
    boolean isFound = (whereClause == null || whereClause.length() == 0);
View Full Code Here

Examples of com.google.enterprise.connector.dctm.dfcwrap.IQuery

      assertTrue(false);
    }
  }

  public void testGetValue() throws RepositoryException {
    IQuery query = null;
    query = localClient.getQuery();
    query.setDQL(DmInitialize.DM_QUERY_STRING_ENABLE);
    ICollection collec = query.execute(sess7, IQuery.READ_QUERY);
    if (collec.next()) {
      IValue val = collec.getValue("r_object_id");
      Assert.assertTrue(val instanceof MockDmValue);
    }
  }
View Full Code Here

Examples of com.google.enterprise.connector.dctm.dfcwrap.IQuery

      Assert.assertTrue(val instanceof MockDmValue);
    }
  }

  public void testGetString() throws RepositoryException {
    IQuery query = localClient.getQuery();
    query.setDQL(DmInitialize.DM_QUERY_STRING_ENABLE);
    ICollection collec = query.execute(sess7, IQuery.READ_QUERY);
    if (collec.next()) {
      String rep = collec.getString("jcr:uuid");
      Assert.assertEquals(rep, DmInitialize.DM_ID1);
    }
  }
View Full Code Here

Examples of com.google.enterprise.connector.dctm.dfcwrap.IQuery

    Assert.assertEquals("max", loginInfo.getUser());
    Assert.assertEquals("foo", loginInfo.getPassword());
  }

  public void testGetQuery() {
    IQuery query = dctmClientX.getQuery();
    assertNotNull(query);
    Assert.assertTrue(query instanceof MockDmQuery);
  }
View Full Code Here

Examples of com.google.enterprise.connector.dctm.dfcwrap.IQuery

    }
  }

  public void testGetQuery() {
    IClient localClient;
    IQuery query;
    try {
      localClient = dctmClientX.getLocalClient();
      query = localClient.getQuery();
      assertNotNull(query);
      Assert.assertTrue(query instanceof MockDmQuery);
View Full Code Here

Examples of com.pv.mf.db.mock.lang.IQuery

     
      builder.columns(user.getId(), user.getUserName());
     
      builder.and(user.getId(),new Long(1L));
     
      IQuery statment = builder.build();
      Assert.assertEquals(
            "SELECT user.id,user.userName FROM user_mx_14.user WHERE user.id = ?",
            statment.getSql());
      Assert.assertArrayEquals(new Object[] {1L}, statment.getParameterValues());
     
   }
View Full Code Here

Examples of com.pv.mf.db.mock.lang.IQuery

     
      builder.columns(user.getId(), user.getUserName());
     
      builder.andNotEqual(user.getId(), 1L);
     
      IQuery statment = builder.build();
      Assert.assertEquals(
            "SELECT user.id,user.userName FROM user_mx_14.user WHERE user.id != ?",
            statment.getSql());
      Assert.assertArrayEquals(new Object[] {1L}, statment.getParameterValues());
     
   }
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.