Package org.blueoxygen.aconix.entity

Examples of org.blueoxygen.aconix.entity.CollectionSelectedDetail


    if(getVm().equalsIgnoreCase("non-search")){
     
     
    }else if(getVm().equalsIgnoreCase("search")){
      LogInformation logInfo;
      CollectionSelectedDetail SelectedDetail;
      if("".equals(getId())){
       
        setSelectedDetails( getManager().getList("SELECT w FROM "+CollectionSelectedDetail.class.getName()+" w WHERE w.collection.id='"+getCollection().getId()+"'",null, null));
        if(!getSelectedDetails().isEmpty()){
          ranking = getSelectedDetails().size()+1;
        }else{
          ranking = 1;
        }
       
      logInfo = new LogInformation();
      SelectedDetail = new CollectionSelectedDetail();
      logInfo.setCreateBy(sess.getCurrentUser().getId());
      logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
      SelectedDetail.setRank(ranking);
      }
      else{
        SelectedDetail = (CollectionSelectedDetail) getManager().getById(CollectionSelectedDetail.class, getId());
        logInfo = SelectedDetail.getLogInformation();
      }
      logInfo.setActiveFlag(getCollection().getLogInformation().getActiveFlag());
      logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
     
      if(getModuleDescriptorId() != null && !"".equalsIgnoreCase(getModuleDescriptorId())){
        descriptor = (Descriptor) getManager().getById(Descriptor.class, getModuleDescriptorId());
       
      }else {
        descriptor = null;
      }
      if(getCollection().getId() != null && !"".equalsIgnoreCase(getCollection().getId())){
        collection = (ACollection) getManager().getById(ACollection.class, getCollection().getId());
      }else{
        collection = null;
      }
      if(getArticleId() != null && !"".equalsIgnoreCase(getArticleId())){
        article = (Article) getManager().getById(Article.class, getArticleId());
      }else{
        article = null;
      }
     
      SelectedDetail.setDescriptor(descriptor);
      SelectedDetail.setCollection(collection);
      SelectedDetail.setArticleId(getArticleId());
      SelectedDetail.setArticleName(getArticleDescription());
      SelectedDetail.setLogInformation(logInfo);
      getManager().save(SelectedDetail);
      setId("");
      setArticleId("");
      setArticleDescription("");
     
View Full Code Here

TOP

Related Classes of org.blueoxygen.aconix.entity.CollectionSelectedDetail

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.