Package org.apache.syncope.core.persistence.dao.search

Examples of org.apache.syncope.core.persistence.dao.search.SubjectCond


        assertTrue(found);
    }

    @Test
    public void issue242() {
        SubjectCond cond = new SubjectCond(AttributeCond.Type.LIKE);
        cond.setSchema("id");
        cond.setExpression("test%");

        SearchCond searchCondition = SearchCond.getLeafCond(cond);
        assertTrue(searchCondition.isValid());

        List<SyncopeUser> users = searchDAO.search(EntitlementUtil.getRoleIds(entitlementDAO.findAll()),
View Full Code Here


        assertTrue(users.isEmpty());
    }

    @Test
    public void issueSYNCOPE46() {
        SubjectCond cond = new SubjectCond(AttributeCond.Type.LIKE);
        cond.setSchema("username");
        cond.setExpression("%ossin%");

        SearchCond searchCondition = SearchCond.getLeafCond(cond);
        assertTrue(searchCondition.isValid());

        List<SyncopeUser> users = searchDAO.search(EntitlementUtil.getRoleIds(entitlementDAO.findAll()),
View Full Code Here

    @Test
    public void issueSYNCOPE433() {
        AttributeCond isNullCond = new AttributeCond(AttributeCond.Type.ISNULL);
        isNullCond.setSchema("loginDate");

        SubjectCond likeCond = new SubjectCond(AttributeCond.Type.LIKE);
        likeCond.setSchema("username");
        likeCond.setExpression("%ossin%");

        SearchCond searchCond = SearchCond.getOrCond(
                SearchCond.getLeafCond(isNullCond), SearchCond.getLeafCond(likeCond));

        Integer count = searchDAO.count(EntitlementUtil.getRoleIds(entitlementDAO.findAll()), searchCond,
View Full Code Here

        super(fieldMap);
    }

    private AttributeCond createAttributeCond(final String schema) {
        AttributeCond attributeCond = ATTRIBUTABLE_FIELDS.contains(schema)
                ? new SubjectCond()
                : new AttributeCond();
        attributeCond.setSchema(schema);
        return attributeCond;
    }
View Full Code Here

TOP

Related Classes of org.apache.syncope.core.persistence.dao.search.SubjectCond

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.