Package com.jada.jpa.entity

Examples of com.jada.jpa.entity.Site


                       HttpServletResponse response)
                    throws Throwable {
   
    ItemMaintActionForm form = (ItemMaintActionForm) actionForm;
    AdminBean adminBean = getAdminBean(request);
    Site site = adminBean.getSite();
    initSiteProfiles(form, site);
 
    JSONEscapeObject jsonResult = new JSONEscapeObject();
    jsonResult.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);
       EntityManager em = JpaConnection.getInstance().getCurrentEntityManager();
    Item item = ItemDAO.load(site.getSiteId(), Format.getLong(form.getItemId()));
       String itemChildIds[] = form.getItemChildIds();
       if (itemChildIds != null) {
         for (int i = 0; i < itemChildIds.length; i++) {
        Item itemChild = ItemDAO.load(site.getSiteId(), Format.getLong(itemChildIds[i]));
        item.getChildren().remove(itemChild);
         }
      item.setRecUpdateBy(adminBean.getUser().getUserId());
      item.setRecUpdateDatetime(new Date(System.currentTimeMillis()));
      em.persist(item);
View Full Code Here


        HttpServletRequest request,
        HttpServletResponse response)
    throws Throwable {
    ItemMaintActionForm form = (ItemMaintActionForm) actionForm;
    AdminBean adminBean = getAdminBean(request);
    Site site = adminBean.getSite();
    initSiteProfiles(form, site);
 
    Item item = ItemDAO.load(site.getSiteId(), Format.getLong(form.getItemId()));
    streamWebService(response, createJsonItemsRelated(item, form).toHtmlString());
    return null;
  }
View Full Code Here

                    HttpServletRequest request,
                    HttpServletResponse response)
                throws Throwable {
    ItemMaintActionForm form = (ItemMaintActionForm) actionForm;
    AdminBean adminBean = getAdminBean(request);
    Site site = adminBean.getSite();
    initSiteProfiles(form, site);
   
    Item item = ItemDAO.load(site.getSiteId(), Format.getLong(form.getItemId()));
    Item itemRelated = ItemDAO.load(site.getSiteId(), Format.getLong(form.getItemRelatedId()));
   
      JSONEscapeObject jsonResult = new JSONEscapeObject();
    jsonResult.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);
       EntityManager em = JpaConnection.getInstance().getCurrentEntityManager();
    Iterator<?> iterator = item.getItemsRelated().iterator();
View Full Code Here

                       HttpServletResponse response)
                    throws Throwable {
   
    ItemMaintActionForm form = (ItemMaintActionForm) actionForm;
    AdminBean adminBean = getAdminBean(request);
    Site site = adminBean.getSite();
    initSiteProfiles(form, site);
 
    JSONEscapeObject jsonResult = new JSONEscapeObject();
    jsonResult.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);
       EntityManager em = JpaConnection.getInstance().getCurrentEntityManager();
    Item item = ItemDAO.load(site.getSiteId(), Format.getLong(form.getItemId()));
       String itemRelatedIds[] = form.getItemRelatedIds();
       if (itemRelatedIds != null) {
         for (int i = 0; i < itemRelatedIds.length; i++) {
        Item itemRelated = ItemDAO.load(site.getSiteId(), Format.getLong(itemRelatedIds[i]));
        item.getItemsRelated().remove(itemRelated);
         }
      item.setRecUpdateBy(adminBean.getUser().getUserId());
      item.setRecUpdateDatetime(new Date(System.currentTimeMillis()));
      em.persist(item);
View Full Code Here

        HttpServletRequest request,
        HttpServletResponse response)
    throws Throwable {
    ItemMaintActionForm form = (ItemMaintActionForm) actionForm;
    AdminBean adminBean = getAdminBean(request);
    Site site = adminBean.getSite();
    initSiteProfiles(form, site);
 
    Item item = ItemDAO.load(site.getSiteId(), Format.getLong(form.getItemId()));
    streamWebService(response, createJsonItemsUpSell(item, form).toHtmlString());
    return null;
  }
View Full Code Here

                    HttpServletRequest request,
                    HttpServletResponse response)
                throws Throwable {
    ItemMaintActionForm form = (ItemMaintActionForm) actionForm;
    AdminBean adminBean = getAdminBean(request);
    Site site = adminBean.getSite();
    initSiteProfiles(form, site);
   
    Item item = ItemDAO.load(site.getSiteId(), Format.getLong(form.getItemId()));
    Item itemUpSell = ItemDAO.load(site.getSiteId(), Format.getLong(form.getItemUpSellId()));
   
      JSONEscapeObject jsonResult = new JSONEscapeObject();
    jsonResult.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);
       EntityManager em = JpaConnection.getInstance().getCurrentEntityManager();
    Iterator<?> iterator = item.getItemsUpSell().iterator();
View Full Code Here

                       HttpServletResponse response)
                    throws Throwable {
   
    ItemMaintActionForm form = (ItemMaintActionForm) actionForm;
    AdminBean adminBean = getAdminBean(request);
    Site site = adminBean.getSite();
    initSiteProfiles(form, site);
 
    JSONEscapeObject jsonResult = new JSONEscapeObject();
    jsonResult.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);
       EntityManager em = JpaConnection.getInstance().getCurrentEntityManager();
    Item item = ItemDAO.load(site.getSiteId(), Format.getLong(form.getItemId()));
       String itemUpSellIds[] = form.getItemUpSellIds();
       if (itemUpSellIds != null) {
         for (int i = 0; i < itemUpSellIds.length; i++) {
        Item itemUpSell = ItemDAO.load(site.getSiteId(), Format.getLong(itemUpSellIds[i]));
        item.getItemsUpSell().remove(itemUpSell);
         }
      item.setRecUpdateBy(adminBean.getUser().getUserId());
      item.setRecUpdateDatetime(new Date(System.currentTimeMillis()));
      em.persist(item);
View Full Code Here

        HttpServletRequest request,
        HttpServletResponse response)
    throws Throwable {
    ItemMaintActionForm form = (ItemMaintActionForm) actionForm;
    AdminBean adminBean = getAdminBean(request);
    Site site = adminBean.getSite();
    initSiteProfiles(form, site);
 
    Item item = ItemDAO.load(site.getSiteId(), Format.getLong(form.getItemId()));
    streamWebService(response, createJsonItemsCrossSell(item, form).toHtmlString());
    return null;
  }
View Full Code Here

                    HttpServletRequest request,
                    HttpServletResponse response)
                throws Throwable {
    ItemMaintActionForm form = (ItemMaintActionForm) actionForm;
    AdminBean adminBean = getAdminBean(request);
    Site site = adminBean.getSite();
    initSiteProfiles(form, site);
   
    Item item = ItemDAO.load(site.getSiteId(), Format.getLong(form.getItemId()));
    Item itemCrossSell = ItemDAO.load(site.getSiteId(), Format.getLong(form.getItemCrossSellId()));
   
      JSONEscapeObject jsonResult = new JSONEscapeObject();
    jsonResult.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);
       EntityManager em = JpaConnection.getInstance().getCurrentEntityManager();
    Iterator<?> iterator = item.getItemsCrossSell().iterator();
View Full Code Here

                       HttpServletResponse response)
                    throws Throwable {
   
    ItemMaintActionForm form = (ItemMaintActionForm) actionForm;
    AdminBean adminBean = getAdminBean(request);
    Site site = adminBean.getSite();
    initSiteProfiles(form, site);
 
    JSONEscapeObject jsonResult = new JSONEscapeObject();
    jsonResult.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);
       EntityManager em = JpaConnection.getInstance().getCurrentEntityManager();
    Item item = ItemDAO.load(site.getSiteId(), Format.getLong(form.getItemId()));
       String itemCrossSellIds[] = form.getItemCrossSellIds();
       if (itemCrossSellIds != null) {
         for (int i = 0; i < itemCrossSellIds.length; i++) {
        Item itemCrossSell = ItemDAO.load(site.getSiteId(), Format.getLong(itemCrossSellIds[i]));
        item.getItemsCrossSell().remove(itemCrossSell);
         }
      item.setRecUpdateBy(adminBean.getUser().getUserId());
      item.setRecUpdateDatetime(new Date(System.currentTimeMillis()));
      em.persist(item);
View Full Code Here

TOP

Related Classes of com.jada.jpa.entity.Site

Copyright © 2018 www.massapicom. 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.