Examples of Product


Examples of com.alibaba.sample.petstore.dal.dataobject.Product

                          "K9-RT-01", "K9-RT-02", "K9-CW-01");
    }

    @Test
    public void getProductById() {
        Product prod = productDao.getProductById("FI-SW-01");

        assertEquals("FI-SW-01", prod.getProductId());
        assertEquals("FISH", prod.getCategoryId());
        assertEquals("Angelfish", prod.getName());
        assertEquals("fish1.jpg", prod.getLogo());
        assertEquals("Salt Water fish from Australia", prod.getDescription());

        assertNull(prod.getCategory());
    }
View Full Code Here

Examples of com.apress.prospring.ch17.domain.Product

   * @param name The name
   * @param expirationDate The expiration Date
   * @return Product object with all properties set
   */
  private Product createProduct(int productId, String name, Date expirationDate) {
    Product product = new Product();
    product.setProductId(productId);
    product.setName(name);
    product.setExpirationDate(expirationDate);
   
    return product;
  }
View Full Code Here

Examples of com.apress.prospring.ch18.domain.Product

    Document document = new Document();
    Element rootElement = new Element(root);
    document.setRootElement(rootElement);
   
    for (Iterator i = products.iterator(); i.hasNext();) {
      Product product = (Product)i.next();
      Element pe = new Element("product");
      pe.setAttribute("productId", Integer.toString(product.getProductId()));
      pe.setAttribute("expirationDate", product.getExpirationDate().toString());
      pe.setText(product.getName());
     
      rootElement.addContent(pe);
    }
   
    return new DOMOutputter().output(document);
View Full Code Here

Examples of com.apress.prospring.ch19.domain.Product

   * @param name The name
   * @param description The description
   * @return Product instance
   */
  private Product createProduct(int productId, String name, String description) {
    Product product = new Product();
    product.setProductId(productId);
    product.setName(name);
    product.setDescription(description);
   
    return product;
  }
View Full Code Here

Examples of com.ateam.webstore.model.Product

  }
 
  private Collection<Product> getDummyProductList() {
    Collection<Product> products = new ArrayList<Product>();
   
    products.add(new Product("TV", 699.99, "A television"));
    products.add(new Product("Tablet", 299.99, "A tablet"));
    products.add(new Product("Laptop", 999.99, "A laptop"));
    products.add(new Product("Blu-ray player", 99.99, "A blue-ray player"));
    products.add(new Product("Stereo", 199.99, "A stero"));
    products.add(new Product("PS3", 299.99, "A playstation"));
   
    return products;
  }
View Full Code Here

Examples of com.avaje.tests.model.basic.Product

  public void test() {
   
    ResetBasicData.reset();
   
    EbeanServer server = Ebean.getServer(null);
    Product prod1 = createProduct(100,"apples");
    server.insert(prod1);
    Product prod2 = createProduct(101, "bananas");
    server.insert(prod2);
   
    server.beginTransaction();
    // effectively load these into the persistence context
    server.find(Product.class, prod1.getId());
    server.find(Product.class, prod2.getId());
   
    server.delete(Product.class, Arrays.asList(prod1.getId(), prod2.getId()));
   
    // are these found in the persistence context?
    Product shadow1 = server.find(Product.class, prod1.getId());
    Product shadow2 = server.find(Product.class, prod2.getId());
   
    Assert.assertNull(shadow1);
    Assert.assertNull(shadow2);
   
    server.endTransaction();
View Full Code Here

Examples of com.casamind.adware.server.domain.Product

        ArrayList<Long> products = new ArrayList<Long>();
        ArrayList<Long> slots = new ArrayList<Long>();
        publisherDAO.put(publisher);
        publisher.setCompanyId(company.getId());
        for (int k = 0; k < 5; k++) {
          Product product = new Product();
          product.setName("Product" + k + "-" + j + "-" + i);
          product.setSlogan("Slogan");
          product.setText("Text");
          product.setLink("Link");
          productDAO.put(product);
          product.setPublisherId(publisher.getId());
          products.add(product.getId());
          for (int n = 0; n < 10; n++) {
            Resource resource = new Resource();
            resource.setFilename("resource" + n + ".jpeg");
            resource.setImageURL("https://lh3.googleusercontent.com/-hQtlZHxpmA0/SMv3w4UUqcI/AAAAAAAACAQ/nPEx0-f9L6Y/s912/DSC02207.JPG");
            resource.setUUID((UUID.randomUUID().toString()));
            resource.setProductId(product.getId());
            resourceDAO.put(resource);
          }
          productDAO.put(product);
        }
        for (int n = 0; n < 5; n++) {
View Full Code Here

Examples of com.changestuffs.server.persistence.beans.Product

    log.info("Adding " + arg0);
    ArticlesAddResult result = null;
    UserService userService = UserServiceFactory.getUserService();
    User user = userService.getCurrentUser();
    ArticlesOAM oam = provider.get();
    Product product = null;
    if (arg0.getKeyHash() == null) {
      product = oam.insertArticle(arg0, user.getEmail());
    } else {
      product = oam.updateArticle(arg0, user.getEmail());
    }
    result = new ArticlesAddResult(KeyFactory.keyToString(product.getKey()), Tags.valueOf(product.getTag().getTagId()));
    return result;
  }
View Full Code Here

Examples of com.charitas.model.Product

        PreparedStatement statement = connection.prepareStatement(sql);
        statement.setInt(1, i);
        ResultSet resultSet = statement.executeQuery();
        //List<Product> list = new ArrayList<>();
       
        Product prod = null;
        if (resultSet.next()){
           
            Category cat  = new Category();
            cat.setId(resultSet.getInt("category_id"));
            cat.setName(resultSet.getString("category_name"));
           
            prod = new Product();
            prod.setCategory(cat);
            prod.setDescription(resultSet.getString("description"));
            prod.setExpiredDate(resultSet.getDate("expireddate"));
            prod.setId(resultSet.getInt("product_id"));
            prod.setName(resultSet.getString("name"));
            prod.setPrice(resultSet.getDouble("price"));
           
            //list.add(prod);
        }
        return prod;
    }
View Full Code Here

Examples of com.dietsodasoftware.yail.xmlrpc.model.Product

    private static void exerciseAddProductService(YailClient client) throws InfusionsoftXmlRpcException, InfusionsoftParameterValidationException {
        final Map<String, Object> productData = new HashMap<String, Object>();
        productData.put(Product.Field.ProductName.name(), "TestProduct1");
        productData.put(Product.Field.ProductPrice.name(), "2.99");

        final Product product = new Product(productData);
        final DataServiceAddOperation<Product> add = new DataServiceAddOperation<Product>(Product.class)
                .useModelPrototype(product);

        final Integer newId = client.call(add);
        System.out.println("The new Product's ID: " + newId);
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.