Examples of Product


Examples of item.product

  @Override
  public String addProduct(String id, double price, String description,
      String location) {
    try {
      product p=new product(id, price, description,
          location);
       items.addProduct(p);
       return p.id;
    } catch (Exception e) {
      e.printStackTrace(System.err);
View Full Code Here

Examples of jscicalc.expression.Product

      } else if( x instanceof Product ){
    Sum s = new Sum( (Variable)this );
    return s.add( (Product)x );
      } else if( x instanceof Expression ){
    Sum s = new Sum( (Variable)this );
    return s.add( new Product( (Expression)x, false ) );
      }
  } else if( this instanceof Sum ){
      if( x instanceof Complex ){
    return ((Sum)this).add( (Complex)x );
      } else if( x instanceof Variable ){
    Product s = new Product( (Variable)x, false );
    return ((Sum)this).add( s );
      } else if( x instanceof Product ){
    return ((Sum)this).add( (Product)x );
      } else if( x instanceof Sum ){
    return ((Sum)this).add( (Sum)x );
      } else if( x instanceof Expression ){
    return ((Sum)this).add( new Product( (Expression)x, false ) );
      }
  } else if( this instanceof Product ){
      if( x instanceof Complex ){
    Sum s = new Sum( (Product)this );
    return s.add( (Complex)x );
      } else if( x instanceof Variable ){
    Sum s = new Sum( (Product)this );
    Product p = new Product( (Variable)x, false );
    return s.add( p );
      } else if( x instanceof Sum ){
    Sum s = new Sum( (Product)this );
    return s.add( (Sum)x );
      } else if( x instanceof Product ){
    Sum s = new Sum( (Product)this );
    return s.add( (Product)x );
      } else if( x instanceof Expression ){
    Sum s = new Sum( (Product)this );
    return s.add( new Product( (Expression)x, false ) );
      }
  } else if( this instanceof Expression ){
      Sum s = new Sum( new Product( (Expression)this, false ) );
      if( x instanceof Complex ){
    return s.add( (Complex)x );
      } else if( x instanceof Sum ){
    return s.add( (Sum)x );
      } else if( x instanceof Product ){
    return s.add( (Product)x );
      } else if( x instanceof Expression ){
    return s.add( new Product( (Expression)x, false ) );
      }
  }
  // default
  return new Error( "OObject add( x ) error" );
    }
View Full Code Here

Examples of mytld.mycompany.myapp.mysubsystem.domain.Product

  @RequestMapping(method = RequestMethod.GET)
  public Product setupForm(@RequestParam(required=false) Long productId) {
    if (productId != null) {
      return productService.findProduct(productId);
    } else {
      return new Product();
    }
  }
View Full Code Here

Examples of net.virtuemart.www.VM_Order.Product

                    for (int j = 0; j < ticket.getLines().size(); j++) {
                        TicketLineInfo line = ticket.getLines().get(j);
                        // String pDesc = line.getProductName();
                        String pDesc = "";
                        products[j] = new Product();

                        System.out.println("> " + line.getProductName());

                        try {
                            if (line.getProductID().equals("0")) {
View Full Code Here

Examples of net.virtuemart.www.externalsales.Product

    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof Product)) {
            return false;
        }
        Product other = (Product) obj;
        if (obj == null) {
            return false;
        }
        if (this == obj) {
            return true;
        }
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true &&
                ((this.category == null && other.getCategory() == null) ||
                (this.category != null &&
                this.category.equals(other.getCategory()))) &&
                ((this.description == null && other.getDescription() == null) ||
                (this.description != null &&
                this.description.equals(other.getDescription()))) &&
                ((this.ean == null && other.getEan() == null) ||
                (this.ean != null &&
                this.ean.equals(other.getEan()))) &&
                ((this.id == null && other.getId() == null) ||
                (this.id != null &&
                this.id.equals(other.getId()))) &&
                ((this.imageUrl == null && other.getImageUrl() == null) ||
                (this.imageUrl != null &&
                this.imageUrl.equals(other.getImageUrl()))) &&
                this.listPrice == other.getListPrice() &&
                ((this.name == null && other.getName() == null) ||
                (this.name != null &&
                this.name.equals(other.getName()))) &&
                ((this.number == null && other.getNumber() == null) ||
                (this.number != null &&
                this.number.equals(other.getNumber()))) &&
                this.purchasePrice == other.getPurchasePrice() &&
                ((this.tax == null && other.getTax() == null) ||
                (this.tax != null &&
                this.tax.equals(other.getTax())));
        __equalsCalc = null;
        return _equals;
    }
View Full Code Here

Examples of nl.nuggit.swaf.application.model.Product

public class ProductServiceImpl implements ProductService {

    public List<Product> listAll() {
        List<Product> products = new ArrayList<Product>();
        products.add(new Product(1L, "Juicy apple", 0.40));
        products.add(new Product(2L, "Fresh orange", 0.30));
        products.add(new Product(3L, "Yellow banana", 0.55));
        products.add(new Product(4L, "Delicious grapes", 0.50));
        products.add(new Product(5L, "Pink Peach", 0.45));
        return products;
    }
View Full Code Here

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

        // Finds all the objects
        int initialNumber = catalogService.findAllProducts().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);

        // Persists the object
        product = catalogService.createProduct(product);
        Long id = product.getId();

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

        // Finds the object by primary key
        product = catalogService.findProduct(id);
        assertEquals("Angelfish", product.getName());

        // Updates the object
        product.setName("Big Angelfish");
        catalogService.updateProduct(product);

        // Finds the object by primary key
        product = catalogService.findProduct(id);
        assertEquals("Big Angelfish", product.getName());

        // Deletes the object
        catalogService.removeProduct(product);

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

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

    _catalogDao.updateItemQuantity(item.getItemId(), item.getQty());
    }

    public Product getProduct(String key) throws InvalidIdentifierException
    {
    Product prod = new Product();
    prod = _catalogDao.getProduct(key);
    if (prod == null)
      throw new InvalidIdentifierException("Product: " + key + " not found!");
    return prod;
    }
View Full Code Here

Examples of org.apache.imperius.spl.parser.expressions.impl.Product

    case SPLTreeParserTokenTypes.DIV:
      returnExpr = new Division(exprList, validateExpr);
      break;

    case SPLTreeParserTokenTypes.STAR:
      returnExpr = new Product(exprList, validateExpr);
      break;

    }

    logger.exiting(sourceClass, Thread.currentThread().getName() + " "
View Full Code Here

Examples of org.apache.isis.core.integtestsupport.legacy.sample.domain.Product

     *
     * @return
     */
    @Hidden
    public Product newProduct(final String code, final String description, final int priceInPence) {
        final Product product = newTransientInstance(Product.class);
        product.setCode(code);
        product.setDescription(description);
        product.setPrice(new Double(priceInPence / 100));
        persist(product);
        return product;
    }
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.