Examples of Item


Examples of org.agoncal.application.petstore.domain.Item

        int initialNumber = catalogService.findAllItems().size();

        // Creates an object
        Category category = new Category("Fish", "Any of numerous cold-blooded aquatic vertebrates characteristically having fins, gills, and a streamlined body");
        Product product = new Product("Angelfish", "Saltwater fish from Australia", category);
        Item item = new Item("Large", 10.00f, "fish1.jpg", product, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum velit ante, malesuada porta condimentum eget, tristique id magna. Donec ac justo velit. Suspendisse potenti. Donec vulputate vulputate molestie. Quisque vitae arcu massa, dictum sodales leo. Sed feugiat elit vitae ante auctor ultrices. Duis auctor consectetur arcu id faucibus. Curabitur gravida.");

        // Persists the object
        item = catalogService.createItem(item);
        Long id = item.getId();

        // Finds all the objects and checks there's an extra one
        assertEquals("Should have an extra object", initialNumber + 1, catalogService.findAllItems().size());

        // Finds the object by primary key
        item = catalogService.findItem(id);
        assertEquals("Large", item.getName());

        // Updates the object
        item.setName("Large fish");
        catalogService.updateItem(item);

        // Finds the object by primary key
        item = catalogService.findItem(id);
        assertEquals("Large fish", item.getName());

        // Deletes the object
        catalogService.removeItem(item);

        // Checks the object has been deleted
View Full Code Here

Examples of org.apache.axiom.om.impl.builder.test.xmlbeans.OrderDocument.Order.Item

    @Test
    public void test() throws Exception {
        OrderDocument document = OrderDocument.Factory.newInstance();
        Order order = document.addNewOrder();
        order.setCustomerId("73107481");
        Item item = order.addNewItem();
        item.setPartId("P85-137-19");
        item.setQuantity(2);
        item = order.addNewItem();
        item.setPartId("O85-554-66");
        item.setQuantity(1);
       
        StringWriter out = new StringWriter();
        document.save(out);
        SAXOMBuilder builder = new SAXOMBuilder();
        document.save(builder, builder);
View Full Code Here

Examples of org.apache.beehive.samples.petstore.model.Item

        {
            cart.incrementQuantityByItemId(form.getWorkingItemId());
        }
        else
        {
            Item toAddItem = _catalogControl.getItem(form.getWorkingItemId());
            if (toAddItem != null)
            {
                //toAddItem.setProduct(_currentProduct);
                cart.addItem(toAddItem);
            }
View Full Code Here

Examples of org.apache.camel.cdi.store.Item

    }

    private List<Item> itemsExpected() {
        List<Item> products = new ArrayList<Item>();
        for (int i = 1; i < 10; i++) {
            products.add(new Item("Item-" + i, 1500L * i));
        }
        return products;
    }
View Full Code Here

Examples of org.apache.cocoon.portal.layout.Item

    /* (non-Javadoc)
     * @see org.apache.cocoon.portal.layout.CompositeLayout#createNewItem()
     */
    public Item createNewItem() {
        if ( this.itemClassName == null ) {
            return new Item();
        }
        try {
            return (Item)ClassUtils.newInstance(this.itemClassName);
        } catch (Exception ignore) {
            return new Item();
        }
    }
View Full Code Here

Examples of org.apache.commons.betwixt.examples.rss.Item

        image.setWidth(100);
        image.setHeight(30);
        image.setDescription("Example image");
        channel.setImage(image);

        Item itemOne = new Item();
        itemOne.setTitle("Betwixt now generates w3c schema!");
        itemOne.setLink("http://jakarta.apache.org/commons/betwixt");
        itemOne.setDescription("Example description");
        channel.addItem(itemOne);

        Item itemTwo = new Item();
        itemTwo.setTitle("Another News Item");
        itemTwo.setLink("http://jakarta.apache.org/commons/betwixt");
        itemTwo.setDescription("Blah Blah Blah");
        channel.addItem(itemTwo);       

        TextInput textInput = new TextInput();
        textInput.setTitle("Send");
        textInput.setDescription("Comments about Betwixt news");
View Full Code Here

Examples of org.apache.cxf.systest.aegis.bean.Item

    }
   
    @Test
    public void testGetItemSecure() throws Exception {
        setupForTest(true);
        Item item = client.getItemByKey("   jack&jill   ", "b");
        Assert.assertEquals(33, item.getKey().intValue());
        Assert.assertEquals("   jack&jill   :b", item.getData());
    }
View Full Code Here

Examples of org.apache.etch.compiler.ast.Item

        "Authorize method %s arg %d name not a parameter field or enum (%s) at line %d",
        method.image, argNo+1, arg, lineno() ) );
   
    Enumx e = (Enumx) named;
   
    Item i = e.getItem( path.nextToken() );
    if (i == null)
      throw new ParseException( String.format(
        "Authorize method %s arg %d name not an enum item (%s) at line %d",
        method.image, argNo+1, arg, lineno() ) );
   
View Full Code Here

Examples of org.apache.hadoop.zebra.mapred.TestBasicTableIOFormatLocalFS.FreqWordCache.Item

    void add(BytesWritable word, int cnt) {
      while ((words.size() >= k) && words.peek().count < cnt) {
        words.poll();
      }
      if ((words.size() < k) || words.peek().count == cnt) {
        words.add(new Item(word, cnt));
      }
    }
View Full Code Here

Examples of org.apache.hadoop.zebra.mapreduce.TestBasicTableIOFormatLocalFS.FreqWordCache.Item

    void add(BytesWritable word, int cnt) {
      while ((words.size() >= k) && words.peek().count < cnt) {
        words.poll();
      }
      if ((words.size() < k) || words.peek().count == cnt) {
        words.add(new Item(word, cnt));
      }
    }
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.