Examples of EqualPredicate


Examples of com.hazelcast.query.Predicates.EqualPredicate

        map.addIndex("name", false);
        String name = randomString();
        map.put("key", new Value(name));

        final ShouldExecuteOncePredicate indexAwareNotIndexedPredicate = new ShouldExecuteOncePredicate();
        final EqualPredicate equalPredicate = new EqualPredicate("name", name);
        final AndPredicate andPredicate = new AndPredicate(indexAwareNotIndexedPredicate, equalPredicate);
        map.values(andPredicate);
    }
View Full Code Here

Examples of com.hazelcast.query.Predicates.EqualPredicate

        assertEquals(0, dIndex.getSubRecordsBetween(-1d, -1001d).size());
        assertEquals(400, dIndex.getSubRecords(ComparisonType.GREATER, 600d).size());
        assertEquals(401, dIndex.getSubRecords(ComparisonType.GREATER_EQUAL, 600d).size());
        assertEquals(9, dIndex.getSubRecords(ComparisonType.LESSER, 10d).size());
        assertEquals(10, dIndex.getSubRecords(ComparisonType.LESSER_EQUAL, 10d).size());
        assertEquals(1, is.query(new AndPredicate(new EqualPredicate("d", 1d), new EqualPredicate("bool", "false"))).size());
        assertEquals(1, is.query(new AndPredicate(new EqualPredicate("d", 1), new EqualPredicate("bool", Boolean.FALSE))).size());
        assertEquals(1, is.query(new AndPredicate(new EqualPredicate("d", "1"), new EqualPredicate("bool", false))).size());
    }
View Full Code Here

Examples of org.apache.commons.collections.functors.EqualPredicate

        super(name);
    }

    public void testEqual() {
        BeanPredicate predicate =
            new BeanPredicate("stringProperty",new EqualPredicate("foo"));
        assertTrue(predicate.evaluate(new TestBean("foo")));
        assertTrue(!predicate.evaluate(new TestBean("bar")));
    }
View Full Code Here

Examples of org.apache.commons.collections.functors.EqualPredicate

        assertTrue(!predicate.evaluate(new TestBean("bar")));
    }

    public void testNotEqual() {
        BeanPredicate predicate =
            new BeanPredicate("stringProperty",new NotPredicate( new EqualPredicate("foo")));
        assertTrue(!predicate.evaluate(new TestBean("foo")));
        assertTrue(predicate.evaluate(new TestBean("bar")));
    }
View Full Code Here

Examples of org.apache.commons.collections.functors.EqualPredicate

        super(name);
    }

    public void testEqual() {
        BeanPredicate predicate =
            new BeanPredicate("stringProperty",new EqualPredicate("foo"));
        assertTrue(predicate.evaluate(new TestBean("foo")));
        assertTrue(!predicate.evaluate(new TestBean("bar")));
    }
View Full Code Here

Examples of org.apache.commons.collections.functors.EqualPredicate

        assertTrue(!predicate.evaluate(new TestBean("bar")));
    }

    public void testNotEqual() {
        BeanPredicate predicate =
            new BeanPredicate("stringProperty",new NotPredicate( new EqualPredicate("foo")));
        assertTrue(!predicate.evaluate(new TestBean("foo")));
        assertTrue(predicate.evaluate(new TestBean("bar")));
    }
View Full Code Here

Examples of org.apache.commons.collections.functors.EqualPredicate

        if(portletDefinition != null &&  StringUtils.isNotBlank(portletDefinition.getFName())) {
            String functionalName = portletDefinition.getFName();
            List<IUserLayoutNodeDescription> favoritePortlets = FavoritesUtils.getFavoritePortlets(ulm.getUserLayout());
           
            //search for the favorite to delete
            EqualPredicate nameEqlPredicate = new EqualPredicate(functionalName);
            Object result = CollectionUtils.find(favoritePortlets, new BeanPredicate("functionalName",nameEqlPredicate));
           
            if(result != null && result instanceof UserLayoutChannelDescription) {
                UserLayoutChannelDescription channelDescription = (UserLayoutChannelDescription)result;
                try {
View Full Code Here

Examples of org.apache.commons.collections.functors.EqualPredicate

        int result = JOptionPane.showOptionDialog(getTable(),"Remove target of probe as well?","Remove probe",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE,null,null,null); //$NON-NLS-1$ //$NON-NLS-2$
        switch (result) {
          case JOptionPane.CANCEL_OPTION:           
            break;
          case JOptionPane.YES_OPTION:
            probemaker.removeTargetsForProbes(new EqualPredicate(s));
            probemaker.removeProbes(new EqualPredicate(s));
            break;
          case JOptionPane.NO_OPTION:
            probemaker.removeProbes(new EqualPredicate(s));
            break;
        }       
      }   
    });   
 
View Full Code Here

Examples of org.apache.commons.collections.functors.EqualPredicate

        super(name);
    }

    public void testEqual() {
        BeanPredicate predicate =
            new BeanPredicate("stringProperty",new EqualPredicate("foo"));
        assertTrue(predicate.evaluate(new TestBean("foo")));
        assertTrue(!predicate.evaluate(new TestBean("bar")));
    }
View Full Code Here

Examples of org.apache.commons.collections.functors.EqualPredicate

        assertTrue(!predicate.evaluate(new TestBean("bar")));
    }

    public void testNotEqual() {
        BeanPredicate predicate =
            new BeanPredicate("stringProperty",new NotPredicate( new EqualPredicate("foo")));
        assertTrue(!predicate.evaluate(new TestBean("foo")));
        assertTrue(predicate.evaluate(new TestBean("bar")));
    }
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.