Examples of Order


Examples of org.apache.openjpa.persistence.xmlmapping.entities.Order

            "select o from Order o order by o.oid")
            .getResultList();
       
        assertEquals(2, orders.size());
       
        Order orderFromDb = orders.get(0);
        Address addressFromDb = orderFromDb.getShipAddress();
        Address address = createUSAAddress("Harry's Auto");
        assertEquals(address.toString(), addressFromDb.toString());
       
        orderFromDb = orders.get(1);
        addressFromDb = orderFromDb.getShipAddress();
        address = createCANAddress("A&J Auto");
        assertEquals(address.toString(), addressFromDb.toString());
       
        em.close();
    }
View Full Code Here

Examples of org.apache.sirona.javaagent.spi.Order

            // no-op
        }

        @Override
        public int compare(final InvocationListener o1, final InvocationListener o2) {
            final Order order1 = o1.getClass().getAnnotation(Order.class);
            final Order order2 = o2.getClass().getAnnotation(Order.class);
            if (order2 == null) {
                return -1;
            }
            if (order1 == null) {
                return 1;
            }
            return order1.value() - order2.value();
        }
View Full Code Here

Examples of org.apache.sirona.spi.Order

            // no-op
        }

        @Override
        public int compare(final InvocationListener o1, final InvocationListener o2) {
            final Order order1 = o1.getClass().getAnnotation(Order.class);
            final Order order2 = o2.getClass().getAnnotation(Order.class);
            if (order2 == null) {
                return -1;
            }
            if (order1 == null) {
                return 1;
            }
            return order1.value() - order2.value();
        }
View Full Code Here

Examples of org.apache.solr.client.solrj.SolrQuery.ORDER

            SortOrder sortOrder = sort.getSortOrder();

            if (sortByResolved != null && sortOrder != null)
            {
                ORDER solrSortOrder = null;
                switch (sortOrder)
                {
                case ASCENDING:
                    solrSortOrder = ORDER.asc;
                    break;
View Full Code Here

Examples of org.apache.tapestry.beaneditor.Order

    @Test
    public void default_order_with_annotation()
    {
        PropertyConduit conduit = mockPropertyConduit();
        Order order = newMock(Order.class);

        train_getAnnotation(conduit, Order.class, order);

        expect(order.value()).andReturn(99);

        replay();

        assertEquals(TapestryInternalUtils.defaultOrder(conduit), 99);
View Full Code Here

Examples of org.apache.tapestry.ioc.annotations.Order

        }

        // TODO: Check that at least one parameter is type java.lang.Object,
        // since that's how the delegate is passed in.

        Order orderAnnotation = method.getAnnotation(Order.class);
        Match match = method.getAnnotation(Match.class);

        String[] constraints = orderAnnotation != null ? orderAnnotation.value() : null;

        // TODO: Validate constraints here?

        String[] patterns = match == null ? new String[]
        { decoratorId } : match.value();
View Full Code Here

Examples of org.apache.tapestry5.ioc.annotations.Order

        return match.value();
    }

    private String[] extractConstraints(Method method)
    {
        Order order = method.getAnnotation(Order.class);

        if (order == null)
            return null;

        return order.value();
    }
View Full Code Here

Examples of org.apdplat.platform.criteria.Order

        }
        OrderCriteria result = new OrderCriteria();
        String[] orders = orderCriteria.split(",");
        for (String order : orders) {
            String[] orderInfo = order.split(":");
            result.addOrder(new Order(orderInfo[0], orderInfo[1]));
        }

        return result;
    }
View Full Code Here

Examples of org.archfirst.bfcommon.jsontrading.Order

        // Create 2011-01-01T09:00:00.000-04:00
        DateTime orderDate = new DateTime(
                2011, 1, 1, 9, 0, 0, 0, DateTimeZone.forOffsetHours(-4));
       
        // Create a JsonMessage with NewOrderSingle
        Order order = new Order(
                fmt.print(orderDate),
                "JVEE-1",
                OrderSide.Buy,
                "AAPL",
                100,
                OrderType.Limit,
                new Money("100.00", "USD"),
                OrderTerm.GoodForTheDay,
                false,
                OrderStatus.PendingNew);
        NewOrderSingle newOrderSingle = new NewOrderSingle(order);

        // Write out the JsonMessage as a string
        String jsonMessageString = JsonMessageMapper.toFormattedString(newOrderSingle);
       
        // Read the JsonMessage back
        JsonMessage jsonMessageRead = JsonMessageMapper.fromString(jsonMessageString);
       
        // Make sure that the message type has been retrieved properly
        Assert.assertTrue(
                jsonMessageRead.getClass().equals(NewOrderSingle.class));
       
        // Make sure that the order has been retrieved properly
        Order orderRead =
            ((NewOrderSingle)jsonMessageRead).getOrder();

        // Can't compare the two DateTime objects with equals
        // because deserialization loses the time zone
        Assert.assertTrue(
                (fmt.parseDateTime(orderRead.getCreationTime()))
                .isEqual(orderDate));
       
        Assert.assertEquals(orderRead.getClientOrderId(), order.getClientOrderId());
        Assert.assertEquals(orderRead.getSide(), order.getSide());
        Assert.assertEquals(orderRead.getSymbol(), order.getSymbol());
        Assert.assertEquals(orderRead.getQuantity(), order.getQuantity());
        Assert.assertEquals(orderRead.getType(), order.getType());

        // Can't compare the two BigDecimal objects with equals
        // because precision may be different (e.g. 100.0 and 100.00)
        Assert.assertEquals(orderRead.getLimitPrice().getAmount().compareTo(order.getLimitPrice().getAmount()), 0);

        Assert.assertEquals(orderRead.getLimitPrice().getCurrency(), order.getLimitPrice().getCurrency());
        Assert.assertEquals(orderRead.getTerm(), order.getTerm());
        Assert.assertEquals(orderRead.isAllOrNone(), order.isAllOrNone());
        Assert.assertEquals(orderRead.getStatus(), order.getStatus());
    }
View Full Code Here

Examples of org.archfirst.bfexch.domain.trading.order.Order

        // Extract allOrNone
        boolean allOrNone = message.isSetField(ExecInst.FIELD) &&
            message.getExecInst().getValue().indexOf(ExecInst.ALL_OR_NONE) >= 0;

        // Create Order
        Order order = new Order(
                new DateTime(message.getTransactTime().getValue()),
                message.getClOrdID().getValue(),
                OrderSideConverter.toDomain(message.getSide()),
                symbol,
                OrderQuantityConverter.toDomain(message.getOrderQtyData()),
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.