Package no.ugland.utransprod.gui.model

Examples of no.ugland.utransprod.gui.model.OrderLineAttributeCriteria


                    break;
                }

                Integer counter = 1;
                Set<OrderLineAttribute> orderLineAttributes;
                OrderLineAttributeCriteria attCriteria;
                OperandEnum operandEnum = querySettings.getOperandEnum();
                for (OrderLine orderLine : criterias) {

                    orderLineAttributes = orderLine.getOrderLineAttributes();
                    for (OrderLineAttribute attribute : orderLineAttributes) {
                        if (counter == 1) {
                            operandEnum = OperandEnum.AND;

                        } else {
                            operandEnum = querySettings.getOperandEnum();

                        }

                        buffer.append(operandEnum.getOperandString());
                        if (counter == 1) {
                            buffer.append("(");
                        }

                        attCriteria = (OrderLineAttributeCriteria) attribute;

                        if (attCriteria.isYesNo()) {
                            buffer = buildYesNoSqlArticle(buffer, attCriteria, orderLine, operandEnum);
                        } else if (attCriteria.getChoices() != null && attCriteria.getChoices().size() != 0) {
                            buffer = buildLikeSqlArticle(buffer, attCriteria, orderLine, operandEnum);
                        } else {
                            if (attCriteria.getAttributeValueFrom() != null
                                    && attCriteria.getAttributeValueFrom().length() != 0) {
                                if (attCriteria.getAttributeValueTo() != null
                                        && attCriteria.getAttributeValueTo().length() != 0) {
                                    buffer = buildBewteenSqlArticle(buffer, attCriteria, orderLine,
                                            operandEnum);
                                } else {
                                    buffer = buildEqGtSqlArticle(buffer, attCriteria, orderLine, operandEnum);
                                }
View Full Code Here


            ArticleTypeTreeNode selectedNode = (ArticleTypeTreeNode) path
                    .getLastPathComponent();
            if (selectedNode.isLeaf()) {
                ArticleTypeAttribute attribute = (ArticleTypeAttribute) selectedNode
                        .getObject();
                OrderLineAttributeCriteria orderLineAttribute = new OrderLineAttributeCriteria();
                List<OrderLine> orderLines1 = new ArrayList<OrderLine>();

                Object object = treeTableModelChosen.getRoot();

                if (object != null
                        && ((OrderLineTreeNode) object).getObject() != null) {
                    OrderWrapper<Order, OrderModel> orderWrapper = (OrderWrapper<Order, OrderModel>) ((OrderLineTreeNode) object)
                            .getObject();
                    orderLines1 = orderWrapper.getOrderLines();
                }

                OrderLine orderLine = getOrderLine(selectedNode, orderLines1,
                        null);

                if (criterias.contains(orderLine)) {
                    orderLine = criterias.get(criterias.indexOf(orderLine));

                } else {
                    criterias.add(orderLine);
                }

                Set<OrderLineAttribute> orderLineAttributes;
                if (orderLine.getOrderLineAttributes() != null) {
                    orderLineAttributes = orderLine.getOrderLineAttributes();
                } else {
                    orderLineAttributes = new HashSet<OrderLineAttribute>();
                    orderLine.setOrderLineAttributes(orderLineAttributes);
                }

                orderLineAttribute.setArticleTypeAttribute(attribute);

                if (orderLine.getOrderLineAttributes().contains(
                        orderLineAttribute)) {
                    List<OrderLineAttribute> atts = new ArrayList<OrderLineAttribute>(
                            orderLine.getOrderLineAttributes());
View Full Code Here

TOP

Related Classes of no.ugland.utransprod.gui.model.OrderLineAttributeCriteria

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.