Examples of Product


Examples of com.vaadin.tests.util.Product

                formItemDataSourceCommand);

    }

    private BeanItem<Product> createProductItem() {
        return new BeanItem<Product>(new Product("Computer Monitor", 399.99f,
                "A monitor that can display both color and black and white."));
    }
View Full Code Here

Examples of com.vtence.tape.testmodel.Product

    public static Table<Product> products() {
        return new ProductRecord().products;
    }

    public Product hydrate(ResultSet rs) throws SQLException {
        Product product = new Product(number.get(rs), name.get(rs), description.get(rs));
        idOf(product).set(id.get(rs));
        return product;
    }
View Full Code Here

Examples of cz.cvut.fel.wa2.interior.entity.Product

    @Override
    public Product findByComplexId(Class clazz, Long productId, Class parentClazz, Long eshopId) {
        PersistenceManager pm = createPersistenceManager();
        Key key = KeyFactory.createKey(KeyFactory.createKey(parentClazz.getSimpleName(), eshopId), clazz.getSimpleName(), productId);
        Product product = null;
        try {
            product = (Product) pm.getObjectById(clazz, key);

            // must touch lazily-loaded fields because joins aren't supported
            product.getEshop().getName();
            product.getCategory();

            Set<Product> similarProducts = new HashSet<>();
            for (Key similarProductKey : product.getSimilarProductKeys()) {
                similarProducts.add((Product) pm.getObjectById(clazz, similarProductKey));
            }
            product.setSimilarProducts(similarProducts);
        } catch (JDOObjectNotFoundException e) {
            return null;
        } finally {
            pm.close();
        }
View Full Code Here

Examples of de.ailis.xadrian.data.Product

                final Element productElement = element.element("product");
                final Ware productWare = wareFactory.getWare(productElement
                    .attributeValue("ware"));
                final int productQuantity = Integer.parseInt(productElement
                    .attributeValue("quantity"));
                final Product product = new Product(productWare,
                    productQuantity);

                final List<?> resItems = element.elements("resource");
                final Product[] resources = new Product[resItems.size()];
                final Capacity[] storage = new Capacity[resItems.size() + 1];
                storage[0] = new Capacity(product.getWare(), Integer
                    .parseInt(productElement.attributeValue("storage")));
                int i = 0;
                for (final Object resItem : resItems)
                {
                    final Element resElement = (Element) resItem;
                    final Ware resWare = wareFactory.getWare(resElement
                        .attributeValue("ware"));
                    final int resQuantity = Integer.parseInt(resElement
                        .attributeValue("quantity"));
                    final int resStorage = Integer.parseInt(resElement
                        .attributeValue("storage"));
                    resources[i] = new Product(resWare, resQuantity);
                    storage[i + 1] = new Capacity(resWare, resStorage);
                    i++;
                }

                final List<?> manuItems = element.elements("manufacturer");
View Full Code Here

Examples of design_patterns.strategy.Product

            authors_node = null;
            reservations_node = null;


            for (int i = 0; i < this.window_login.getProducts().size();i++){
                Product temp = (Product)this.window_login.getProducts().get(i);
                if(temp!=null){
                    if (this.jTextField.getText().toLowerCase().contains(temp.getName().toLowerCase())){
                        products_node = new DefaultMutableTreeNode("Products");
                        products_node.add(new javax.swing.tree.DefaultMutableTreeNode(temp.getName()));
                        break;
                    }
                }
            }

            //***************************************************************************************
            for (int i = 0; i < this.window_login.getAuthors().size();i++){
                Author temp = (Author)this.window_login.getAuthors().get(i);
                if (temp!=null){
                    if (this.jTextField.getText().toLowerCase().contains(temp.getName().toLowerCase())){
                        authors_node = new DefaultMutableTreeNode("Authors");
                        authors_node.add(new javax.swing.tree.DefaultMutableTreeNode(temp.getName()));
                        break;
                    }
                }
            }
            for (int i = 0; i< this.window_login.getReservations().size();i++){
                Reservation temp = (Reservation)this.window_login.getReservations().get(i);
                if (temp!=null){
                    if (temp.getProduct()!=null){
                        if (this.jTextField.getText().toLowerCase().contains(temp.getProduct().getName().toLowerCase())){
                            reservations_node = new DefaultMutableTreeNode("Reservations");
                            reservations_node.add(new javax.swing.tree.DefaultMutableTreeNode(temp.getProduct().getName()));
                            break;
                        }
                    }
                }
            }
View Full Code Here

Examples of domain.jpetstore.Product

    assertNull(richWithNull.getValue("richType.richProperty"));
  }

  @Test
  public void shouldVerifyHasReadablePropertiesReturnedByGetReadablePropertyNames() {
    MetaObject object = MetaObject.forObject(new Product());
    for (String readable : object.getGetterNames()) {
      assertTrue(object.hasGetter(readable));
    }
  }
View Full Code Here

Examples of ducttape.entities.Product

    EntityManager em;

    @PostConstruct
    public void insert() {
        for(int i =1; i <= 5; i++) {
            em.persist(new Product(i + " product", new BigDecimal(10 * i)));
        }
    }
View Full Code Here

Examples of entity.Product

        double amount = 0;

        for (ShoppingCartItem scItem : items) {

            Product product = (Product) scItem.getProduct();
            amount += (scItem.getQuantity() * product.getPrice().doubleValue());
        }

        return amount;
    }
View Full Code Here

Examples of formation.jee6.model.Product

    public List<Product> getProducts() {
        return em.createQuery("select p from Product p").getResultList();
    }
   
    public void createProductInDB() {
        em.persist(new Product("car","Une voiture",25));
    }
View Full Code Here

Examples of id.web.knt.po.entity.Product

  public void save(Product p) {
    em.merge(p);
  }
 
  public void delete(Product p) {
    Product px = em.find(Product.class, p.getId());
    em.remove(px);
  }
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.