Package oracle.adf.view.rich.model

Examples of oracle.adf.view.rich.model.AttributeCriterion


    public final void addCriterion(final Criterion criterion) {
        if (!(criterion instanceof AttributeCriterion)) {
            throw new UnsupportedOperationException("ConjunctionCriterionImpl.addCriterion can only add an AttributeCriterion.");
        }
        final AttributeCriterion attrCrit = (AttributeCriterion) criterion;
        boolean found = false;
        for (int i = 0; i < criteria.size(); i++) {
            final Criterion iterCrit = criteria.get(i);
            if (!(iterCrit instanceof AttributeCriterion)) {
                continue;
            }
            final AttributeCriterion iterAttrCrit = (AttributeCriterion) iterCrit;
            if (found && !iterAttrCrit.getAttribute().equals(attrCrit.getAttribute())) {
                // First criterion found for other attribute than the to add attr.
                criteria.add(i, criterion);
                return;
            } else {
                found = found || iterAttrCrit.getAttribute().equals(attrCrit.getAttribute());
            }
        }
        // No next criterion found, so add at the end of the List.
        criteria.add(criterion);
    }
View Full Code Here


        conjunction = ConjunctionCriterion.Conjunction.OR;
        final Iterator<Criterion> iterator = criteria.iterator();
        while (iterator.hasNext()) {
            final Criterion crit = iterator.next();
            if (crit instanceof AttributeCriterion) {
                final AttributeCriterion ac = (AttributeCriterion) crit;
                if (ac.isRemovable()) {
                    iterator.remove();
                } else {
                    final List values = ac.getValues();
                    for (int i = 0; i < values.size(); i++) {
                        values.set(i, null);
                    }
                }
            }
View Full Code Here

    @Override
    public List<Object> autoCompleteValue(final Object value) {
        logger.fine("autoComplete for {0}", value);
        // markeer dit request als autoComplete request
        ADFContext.getCurrent().getRequestScope().put(KEY_AUTO_COMPLETE, Boolean.TRUE);
        final AttributeCriterion autoCrit = queryDescriptor.getAutoCompleteCriterion();
        if (autoCrit == null) { // geen autocomplete-attribuut dus gewone LOV laten tonen
            return Collections.emptyList();
        }
        final List critVals = autoCrit.getValues();
        if (autoCrit.getOperator().getOperandCount() != 1) {
            throw new IllegalArgumentException("autoComplete needs an attribuut with as default operator a single-value.");
        }
        critVals.set(0, value);
        performQuery(queryDescriptor);
        final ViewObject vo = tableModel.getViewOject();
View Full Code Here

TOP

Related Classes of oracle.adf.view.rich.model.AttributeCriterion

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.