Package com.salas.bb.domain.query

Examples of com.salas.bb.domain.query.IComparisonOperation


    }

    private String serializeToString(ICriteria aCriteria)
    {
        IProperty property = aCriteria.getProperty();
        IComparisonOperation operation = aCriteria.getComparisonOperation();
        String value = aCriteria.getValue();

        StringBuffer buf = new StringBuffer();

        buf.append(property.getDescriptor()).append(':');
        buf.append(operation.getDescriptor()).append(':');
        buf.append(escapeValue(value));

        return buf.toString();
    }
View Full Code Here


        String operationDescriptor, String value)
    {
        IProperty property = aQuery.getPropertyByDescriptor(propertyDescriptor);
        if (property != null)
        {
            IComparisonOperation operation =
                property.getComparsonOperationByDescriptor(operationDescriptor);

            if (operation != null)
            {
                ICriteria criteria = aQuery.addCriteria();
View Full Code Here

    private void setCriteria(ICriteria aCriteria)
    {
        criteria = aCriteria;

        IProperty property = criteria.getProperty();
        IComparisonOperation operation = criteria.getComparisonOperation();

        if (property != null)
        {
            if (!getSelectedProperty().equals(property))
            {
View Full Code Here

     */
    void addEmptyCriteria()
    {
        // We want Article Text to be the first because it is the most obvious and helps the user understand the dialog box.
        IProperty firstProperty = ArticleTextProperty.INSTANCE;
        IComparisonOperation firstOperation =
            (IComparisonOperation)firstProperty.getComparsonOperations().iterator().next();
        String defaultValue = firstProperty.getDefaultValue();

        ICriteria criteria = query.addCriteria();
        criteria.setProperty(firstProperty);
View Full Code Here

        ICriteria criteria = query.addCriteria();

        assertNotNull("Criteria is bad.", SmartFeedDialog.validateSearchFeedData(query, true, 1));

        IProperty someProperty = (IProperty)query.getAvailableProperties().toArray()[0];
        IComparisonOperation someOperation = (IComparisonOperation)someProperty.getComparsonOperations().toArray()[0];
        criteria.setProperty(someProperty);
        criteria.setComparisonOperation(someOperation);
        criteria.setValue("1");

        assertEquals("Query is ok.", null, SmartFeedDialog.validateSearchFeedData(query, true, 1));
View Full Code Here

    {
        // Create Query
        Query q = new Query();
        Collection props = q.getAvailableProperties();
        IProperty p = (IProperty)props.iterator().next();
        IComparisonOperation op = (IComparisonOperation)p.getComparsonOperations().iterator().next();
        ICriteria c = q.addCriteria();
        c.setProperty(p);
        c.setComparisonOperation(op);
        c.setValue(Integer.toString(n));
View Full Code Here

TOP

Related Classes of com.salas.bb.domain.query.IComparisonOperation

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.