Examples of ProductGroup


Examples of org.apache.ojb.odmg.shared.ProductGroup

    protected void setUp() throws Exception
    {
        super.setUp();
        Transaction tx = odmg.newTransaction();
        tx.begin();
        testProductGroup = new ProductGroup();
        testProductGroup.setGroupName("NamedRootsTest_" + System.currentTimeMillis());
        database.makePersistent(testProductGroup);
        tx.commit();
    }
View Full Code Here

Examples of org.apache.ojb.odmg.shared.ProductGroup

        //perform transaction
        try
        {
            tx.begin();

            ProductGroup pg = new ProductGroup();
            pg.setName("PG A");
            Article example = new Article();
            example.setProductGroup(pg);
            pg.addArticle(example);
            db.makePersistent(pg);

            // modify Object after persist call is allowed
            example.setStock(333);
            example.addToStock(47);
View Full Code Here

Examples of org.apache.ojb.odmg.shared.ProductGroup

        query.create("select aPG from " + ProductGroup.class.getName() + " where groupName like \"Fruit*\"");
        List check = (List) query.execute();
        if (check.size() < 1)
            fail("Could not found ProductGroup's for: " +
                    "select aPG from " + ProductGroup.class.getName() + " where groupName like \"Fruit*\"");
        ProductGroup pg = (ProductGroup) check.get(0);

        assertEquals(pg.getAllArticlesInGroup().size(), results.size());
        assertTrue((results.size() > 0));

        tx.commit();


View Full Code Here

Examples of org.apache.ojb.odmg.shared.ProductGroup

    protected void setUp() throws Exception
    {
        super.setUp();
        Transaction tx = odmg.newTransaction();
        tx.begin();
        testProductGroup = new ProductGroup();
        testProductGroup.setGroupName("NamedRootsTest_" + System.currentTimeMillis());
        database.makePersistent(testProductGroup);
        tx.commit();
    }
View Full Code Here

Examples of org.apache.ojb.odmg.shared.ProductGroup

        //perform transaction
        try
        {
            tx.begin();

            ProductGroup pg = new ProductGroup();
            pg.setName("PG A");
            Article example = new Article();
            example.setProductGroup(pg);
            pg.addArticle(example);
            db.makePersistent(pg);

            // modify Object after persist call is allowed
            example.setStock(333);
            example.addToStock(47);
View Full Code Here

Examples of org.apache.ojb.odmg.shared.ProductGroup

        query.create("select aPG from " + ProductGroup.class.getName() + " where groupName like \"Fruit*\"");
        List check = (List) query.execute();
        if (check.size() < 1)
            fail("Could not found ProductGroup's for: " +
                    "select aPG from " + ProductGroup.class.getName() + " where groupName like \"Fruit*\"");
        ProductGroup pg = (ProductGroup) check.get(0);

        assertEquals(pg.getAllArticlesInGroup().size(), results.size());
        assertTrue((results.size() > 0));

        tx.commit();


View Full Code Here

Examples of org.apache.ojb.odmg.shared.ProductGroup

        // if(ojbSkipKnownIssueProblem()) return;

        Transaction tx = odmg.newTransaction();
        tx.begin();

        ProductGroup pg1 = new ProductGroup();
        pg1.setName("BatchModeTest ProductGroup #1");
        database.makePersistent(pg1);

        tx.checkpoint();

        Article a1 = Article.createInstance();
        a1.setArticleName("BatchModeTest Article #1");
        a1.setProductGroup(pg1);
        pg1.addArticle(a1);
        database.makePersistent(a1);

        ProductGroup pg2 = new ProductGroup();
        pg2.setName("BatchModeTest ProductGroup #2");
        database.makePersistent(pg2);

        Article a2 = Article.createInstance();
        a2.setArticleName("BatchModeTest Article #2");
        a2.setProductGroup(pg2);
        pg2.addArticle(a2);

        tx.checkpoint();

        database.deletePersistent(a1);
View Full Code Here

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

    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);
View Full Code Here

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

      return null;
    }
   
    if (! existing.getGroup().getGroupName().equals(uiBean.getProductGroup()))
    {
      ProductGroup group = groupRepository.findByGroupName(uiBean.getProductGroup()) ;
      existing.setGroup(group);
    }

    existing.setDescription(uiBean.getDescription());
    existing.setPrice(uiBean.getPrice());
View Full Code Here

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

  private ProductGroupMapper mapper = new ProductGroupMapper();

  public ProductGroupUI create(ProductGroupUI uiBean) {

    ProductGroup newGroup = mapper.toPersistenceBean(uiBean);
    ProductGroup saved = repository.save(newGroup);
    logger.debug("Created Product Group : " + saved);

    return mapper.toUIBean(saved);
  }
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.