Examples of Product


Examples of org.objectweb.speedo.pobjects.sequence.id.Product

    PersistenceManager pm = pmf.getPersistenceManager();
    pm.getObjectIdClass(Product.class);
    //get the sequence
    Sequence s = pm.getSequence(PRODUCT_SEQ);
    assertNotNull("Sequence " + PRODUCT_SEQ + " should not be null.", s);
    Product p1 = new Product();
    p1.setName("product 1");
    Product p2 = new Product();
    p2.setName("product 2");
    //make persistent
    pm.currentTransaction().begin();
    pm.makePersistent(p1);
    pm.makePersistent(p2);
    pm.currentTransaction().commit();
    assertTrue(p1.getReference() < p2.getReference());
        pm.close();
  }
View Full Code Here

Examples of org.openbravo.model.common.plm.Product

        // Document name
        iOrder.setDocumentTypeName(extPos.getDocumentType().getName());

        // Product
        final Product pro = (Product) OBDal.getInstance().get("Product",
                line_product);
        iOrder.setProduct(pro);

        // Taxes
        final TaxRate tax = (TaxRate) OBDal.getInstance().get(
View Full Code Here

Examples of org.ow2.easybeans.tests.common.ejbs.entity.customer.Product

    private List<Product> createProducts(final int quantity, final int initialIdNumber) {
        String[] strDescriptionValues = DESCRIPTION_VALUES;
        List<Product> lstProducts = new ArrayList<Product>();
        // creates the product.
        for (int i = 0; i < quantity; i++) {
            Product product = new Product();
            product.setId(i + initialIdNumber);
            product.setDescription(strDescriptionValues[i]);
            product.setPrice(i);
            // sets the category for a value between the intial category id = 0
            // and the maximum= 4
            product.setCategory(entityManager.getReference(Category.class, new Long(i
                    % (strDescriptionValues.length / 2))));
            entityManager.persist(product);
            entityManager.flush();
            lstProducts.add(product);
        }
View Full Code Here

Examples of org.restlet.client.data.Product

    public static String write(List<Product> products) {
        StringBuilder builder = new StringBuilder();

        for (Iterator<Product> iterator = products.iterator(); iterator
                .hasNext();) {
            Product product = iterator.next();

            if ((product.getName() == null)
                    || (product.getName().length() == 0)) {
                throw new IllegalArgumentException(
                        "Product name cannot be null.");
            }

            builder.append(product.getName());

            if (product.getVersion() != null) {
                builder.append("/").append(product.getVersion());
            }

            if (product.getComment() != null) {
                builder.append(" (").append(product.getComment()).append(")");
            }

            if (iterator.hasNext()) {
                builder.append(" ");
            }
View Full Code Here

Examples of org.restlet.data.Product

        final String userAgent10 = "Wget/1.9";
        final String userAgent11 = "Noelios-Restlet-Engine/1.9-SNAPSHOT";

        ClientInfo clientInfo = new ClientInfo();
        clientInfo.setAgent(userAgent1);
        Product product = clientInfo.getMainAgentProduct();
        assertEquals("MSIE", product.getName());
        assertEquals("6.0", product.getVersion());

        clientInfo = new ClientInfo();
        clientInfo.setAgent(userAgent2);
        product = clientInfo.getMainAgentProduct();
        assertEquals("Camino", product.getName());
        assertEquals("1.0b1", product.getVersion());

        clientInfo = new ClientInfo();
        clientInfo.setAgent(userAgent3);
        product = clientInfo.getMainAgentProduct();
        assertEquals("Netscape6", product.getName());
        assertEquals("6.1", product.getVersion());

        clientInfo = new ClientInfo();
        clientInfo.setAgent(userAgent4);
        product = clientInfo.getMainAgentProduct();
        assertEquals("Iceweasel", product.getName());
        assertEquals("2.0", product.getVersion());
        assertEquals("Debian-2.0+dfsg-1", product.getComment());

        clientInfo = new ClientInfo();
        clientInfo.setAgent(userAgent5);
        product = clientInfo.getMainAgentProduct();
        assertEquals("Konqueror", product.getName());
        assertEquals("3.5.4", product.getVersion());

        clientInfo = new ClientInfo();
        clientInfo.setAgent(userAgent6);
        product = clientInfo.getMainAgentProduct();
        assertEquals("MSIE", product.getName());
        assertEquals("5.5", product.getVersion());

        clientInfo = new ClientInfo();
        clientInfo.setAgent(userAgent7);
        product = clientInfo.getMainAgentProduct();
        assertEquals("MSIE", product.getName());
        assertEquals("6.0", product.getVersion());

        clientInfo = new ClientInfo();
        clientInfo.setAgent(userAgent8);
        product = clientInfo.getMainAgentProduct();
        assertEquals("Safari", product.getName());
        assertEquals("521.24", product.getVersion());

        clientInfo = new ClientInfo();
        clientInfo.setAgent(userAgent9);
        product = clientInfo.getMainAgentProduct();
        assertEquals("Opera", product.getName());
        assertEquals("9.00", product.getVersion());

        clientInfo = new ClientInfo();
        clientInfo.setAgent(userAgent10);
        product = clientInfo.getMainAgentProduct();
        assertEquals("Wget", product.getName());
        assertEquals("1.9", product.getVersion());

        clientInfo = new ClientInfo();
        clientInfo.setAgent(userAgent11);
        product = clientInfo.getMainAgentProduct();
        assertEquals("Noelios-Restlet-Engine", product.getName());
        assertEquals("1.9-SNAPSHOT", product.getVersion());

        clientInfo = new ClientInfo();
        clientInfo.setAgent(userAgent7);
        final Map<String, String> map = clientInfo.getAgentAttributes();
        for (String key : map.keySet()) {
View Full Code Here

Examples of org.sab.invsys.persistence.model.product.Product

  private ProductMapper mapper = new ProductMapper();

  @Transactional
  public ProductUI create(ProductUI uiBean) {

    Product newProduct = mapper.toPersistenceBean(uiBean);
   
    if(uiBean.getProductGroup() != null)
    {
      ProductGroup group = groupRepository.findByGroupName(uiBean.getProductGroup());
      newProduct.setGroup(group);
    }
   
    Product saved = repository.save(newProduct);
    logger.debug("Created Account : " + saved);

    return mapper.toUIBean(saved);
  }
View Full Code Here

Examples of org.simplecart.shopcart.catalog.Product

                (HttpServletRequest) pageContext.getRequest();
        StringBuffer url = new StringBuffer(request.getContextPath());
        url.append(config.getPrefix());
        url.append(page);
        url.append(".do");
        Product product = null;
        try {
            product = (Product) pageContext.findAttribute(name);
        } catch (ClassCastException e) {
            product = null;
        }
        if (product == null && !this.activity.equals("enter"))
            throw new JspException
                    (messages.getMessage("error.generalMessage", name));
        if (page.indexOf("?") < 0)
            url.append("?");
        else
            url.append("&");
        url.append("activity=");
        url.append(this.activity);
        if (!this.activity.equals("enter")) {
            url.append("&productId=");
            url.append(TagUtils.getInstance().filter(product.getId().toString()));
        }
       
        // Generate the hyperlink start element
        HttpServletResponse response =
                (HttpServletResponse) pageContext.getResponse();
View Full Code Here

Examples of org.springframework.batch.admin.sample.lead.Product

public class LeadFieldSetMapper implements FieldSetMapper<Lead> {

  public Lead mapFieldSet(FieldSet fieldSet) {
    Lead lead = new Lead(fieldSet.readLong("id"), new Client(fieldSet.readString("client.name"), fieldSet
        .readString("client.country")), new Product(fieldSet.readString("product.name")));
    lead.setAmount(fieldSet.readDouble("amount"));
    lead.setQuery(fieldSet.readString("query"));
    return lead;
  }
View Full Code Here

Examples of org.springframework.data.elasticsearch.entities.Product

  @Test
  public void testCdiRepository() {
    assertNotNull(repository);

    Product bean = new Product();
    bean.setId("id-1");
    bean.setName("cidContainerTest-1");

    repository.save(bean);

    assertTrue(repository.exists(bean.getId()));

    Product retrieved = repository.findOne(bean.getId());
    assertNotNull(retrieved);
    assertEquals(bean.getId(), retrieved.getId());
    assertEquals(bean.getName(), retrieved.getName());

    assertEquals(1, repository.count());

    assertTrue(repository.exists(bean.getId()));
View Full Code Here

Examples of org.springframework.data.hadoop.example.domain.Product

* @author templth
*
*/
public class ProductFieldSetMapper implements FieldSetMapper<Product> {
  public Product mapFieldSet(FieldSet fieldSet) {
    Product product = new Product();
    product.setId(fieldSet.readString("id"));
    product.setName(fieldSet.readString("name"));
    product.setDescription(fieldSet.readString("description"));
    product.setPrice(fieldSet.readBigDecimal("price"));
    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.