Package org.jabusuite.article

Examples of org.jabusuite.article.Article


    /* (non-Javadoc)
     * @see org.jabusuite.article.session.ArticlesRemote#findDataset(long)
     */
    public Article findDataset(long id, boolean withAdditionalData) {
        logger.debug("Looking for article " + id);
        Article article = (Article) manager.find(Article.class, (long) id);
        if ((withAdditionalData) && (article != null)) {
            //Retrieve the prices and groups
            if (article.getPrices() == null) {
                article.setPrices(new LinkedHashSet<ArticlePrice>());
            }
            logger.debug("Prices: " + article.getPrices().size());
            if (article.getArticleGroups() == null) {
                article.setArticleGroups(new LinkedHashSet<ArticleGroup>());
            }
            logger.debug("Groups: " + article.getArticleGroups());
        }
        return article;
    }
View Full Code Here


        return (int)this.getJbsObjects().size();
        }
         */
        public Object getValueAt(int column, int row) {
            if (row < getJbsObjects().size()) {
                Article article = (Article) getJbsObjects().get(row);
               
                ArticlePrice price = null;
                if ((column==3) || (column==4))
                    price = article.getPrice(Calendar.getInstance());
               
                //logger.debug(article.getUserNo());
                switch (column) {
                    case 0:
                        String userNo = "";
                        if (article.getUserNo() != null) {
                            userNo = article.getUserNo();
                        }
                        return userNo;
                    case 1:
                        String articleName = article.getShortText(ClientGlobals.getMainDbLanguage());
                        if (articleName == null) {
                            //TODO change!!
                            //articleName = "";
                            articleName = String.valueOf(row);
                           
                        }
                        return articleName;
                    case 2:
                        String matchCode = "";
                        if (article.getMatchCode() != null) {
                            matchCode = article.getMatchCode();
                        }
                        return matchCode;
                    case 3:
                        String sCostPrice = "";
                        if (price!=null)
View Full Code Here

  /* (non-Javadoc)
   * @see org.jabusuite.webclient.dataediting.FmEditJbsBaseObject#createJbsBaseObject()
   */
  @Override
  public void createJbsBaseObject() {
    this.setJbsBaseObject(new Article());
  }
View Full Code Here

     * Creates the panel in insert-mode. A new instance of Address will be used.
     *
     */
    public PnArticleEdit() {
        super(DlgState.dsInsert);
        this.setArticle(new Article());
    }
View Full Code Here

        return (Article) this.getJbsBaseObject();
    }

    @Override
    public void setJbsBaseObject(JbsBaseObject jbsBaseObject) {
        Article article = (Article)jbsBaseObject;
        if ((article!=null) && (this.getDlgState() == DlgState.dsEdit)) {
            logger.debug("Retrieving prices and groups for article "+article.getId());
            try {
                ArticlesRemote articles = (ArticlesRemote) ClientTools.getRemoteBean(ArticlesRemote.class);
                Article existingArticle = articles.findDataset(article.getId(), true);
                article = existingArticle;
            } catch (NamingException e) {
                logger.error("Error retrieving offer.", e);
            }
        }
View Full Code Here

                    TrPosition parentPosition = null;
                    if ((parentNode != null) && (parentNode instanceof TrPositionTreeNode)) {
                        parentPosition = ((TrPositionTreeNode) parentNode).getPosition();
                    }

                    Article selectedArticle = (Article) fmArticleList.getSelectedJbsObject();

                    if (selectedArticle != null) {
                        if (logger.isDebugEnabled()) {
                            logger.debug("Article selected: " + selectedArticle.getId());
                        }

                        addArticlePosition(selectedArticle, parentPosition, parentNode);

                    /*
 
View Full Code Here

TOP

Related Classes of org.jabusuite.article.Article

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.