Package org.apache.chemistry.opencmis.commons.data

Examples of org.apache.chemistry.opencmis.commons.data.ObjectList


    // Integer tests

    @Test
    public void testIntegerEquals() {
        String statement = "SELECT * FROM " + COMPLEX_TYPE + " WHERE " + PROP_ID_INT + "= 100";
        ObjectList res = doQuery(statement);
        assertEquals(1, res.getObjects().size());
        assertTrue(resultContains("epsilon", res));
    }
View Full Code Here


    }

    @Test
    public void testIntegerNotEquals() {
        String statement = "SELECT * FROM " + COMPLEX_TYPE + " WHERE " + PROP_ID_INT + "<> 100";
        ObjectList res = doQuery(statement);
        assertEquals(4, res.getObjects().size());
        assertTrue(resultContains("alpha", res));
        assertTrue(resultContains("beta", res));
        assertTrue(resultContains("gamma", res));
        assertTrue(resultContains("delta", res));
    }
View Full Code Here

    }

    @Test
    public void testIntegerLess() {
        String statement = "SELECT * FROM " + COMPLEX_TYPE + " WHERE " + PROP_ID_INT + "< 0";
        ObjectList res = doQuery(statement);
        assertEquals(2, res.getObjects().size());
        assertTrue(resultContains("alpha", res));
        assertTrue(resultContains("beta", res));
    }
View Full Code Here

    }

    @Test
    public void testIntegerLessOrEqual() {
        String statement = "SELECT * FROM " + COMPLEX_TYPE + " WHERE " + PROP_ID_INT + "<= 0";
        ObjectList res = doQuery(statement);
        assertEquals(3, res.getObjects().size());
        assertTrue(resultContains("alpha", res));
        assertTrue(resultContains("beta", res));
        assertTrue(resultContains("gamma", res));
    }
View Full Code Here

    }

    @Test
    public void testIntegerGreater() {
        String statement = "SELECT * FROM " + COMPLEX_TYPE + " WHERE " + PROP_ID_INT + "> 0";
        ObjectList res = doQuery(statement);
        assertEquals(2, res.getObjects().size());
        assertTrue(resultContains("delta", res));
        assertTrue(resultContains("epsilon", res));
    }
View Full Code Here

        for (String objectId : ((ObjectStoreImpl) objectStore).getIds()) {
            StoredObject so = objectStore.getObjectById(objectId);
            match(so, user, searchAllVersions == null ? true : searchAllVersions.booleanValue());
        }

        ObjectList objList = buildResultList(tm, user, includeAllowableActions, includeRelationships, renditionFilter,
                maxItems, skipCount);
        LOG.debug("Query result, number of matching objects: " + objList.getNumItems());
        return objList;
    }
View Full Code Here

          if (includeRelationships == IncludeRelationships.TARGET)
            relationshipDirection = RelationshipDirection.TARGET;
          else if (includeRelationships == IncludeRelationships.BOTH)
            relationshipDirection = RelationshipDirection.EITHER;  // either and both!!
         
            ObjectList relationships = spo.getObjectRelationships(false, relationshipDirection,
                null, null, false, MINUS_ONE, MINUS_ONE, null, user);
           return (relationships == null? null : relationships.getObjects());
        }
         return null;
    }
View Full Code Here

        String renditionFilter = getStringParameter(request, PARAM_RENDITION_FILTER);
        BigInteger maxItems = getBigIntegerParameter(request, PARAM_MAX_ITEMS);
        BigInteger skipCount = getBigIntegerParameter(request, PARAM_SKIP_COUNT);

        // execute
        ObjectList checkedout = service.getCheckedOutDocs(repositoryId, folderId, filter, orderBy,
                includeAllowableActions, includeRelationships, renditionFilter, maxItems, skipCount, null);

        if (checkedout == null) {
            throw new CmisRuntimeException("Checked out list is null!");
        }
View Full Code Here

        String renditionFilter = getStringParameter(request, Constants.PARAM_RENDITION_FILTER);
        BigInteger maxItems = getBigIntegerParameter(request, Constants.PARAM_MAX_ITEMS);
        BigInteger skipCount = getBigIntegerParameter(request, Constants.PARAM_SKIP_COUNT);

        // execute
        ObjectList results = service.query(repositoryId, statement, searchAllVersions, includeAllowableActions,
                includeRelationships, renditionFilter, maxItems, skipCount, null);

        if (results == null) {
            throw new CmisRuntimeException("Results are null!");
        }
View Full Code Here

        Boolean includePolicyIds = getBooleanParameter(request, PARAM_POLICY_IDS);
        Boolean includeAcl = getBooleanParameter(request, PARAM_ACL);
        BigInteger maxItems = getBigIntegerParameter(request, Constants.PARAM_MAX_ITEMS);

        Holder<String> changeLogTokenHolder = new Holder<String>(changeLogToken);
        ObjectList changes = service.getContentChanges(repositoryId, changeLogTokenHolder, includeProperties, filter,
                includePolicyIds, includeAcl, maxItems, null);

        JSONObject jsonChanges = new JSONObject();
        jsonChanges.put("changeLogToken", changeLogTokenHolder.getValue());
View Full Code Here

TOP

Related Classes of org.apache.chemistry.opencmis.commons.data.ObjectList

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.