当前位置: 首页>>代码示例>>Java>>正文


Java ExpressionList.findList方法代码示例

本文整理汇总了Java中com.avaje.ebean.ExpressionList.findList方法的典型用法代码示例。如果您正苦于以下问题:Java ExpressionList.findList方法的具体用法?Java ExpressionList.findList怎么用?Java ExpressionList.findList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.avaje.ebean.ExpressionList的用法示例。


在下文中一共展示了ExpressionList.findList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getPEPlanAllocatedActorAsListByPE

import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
/**
 * Get the actor allocations for a portfolio entry according to some
 * filters.
 *
 * @param portfolioEntryId
 *            the portfolio entry id
 * @param start
 *            the startDate or the endDate should be after this date
 * @param end
 *            the startDate or the endDate should be before this date
 * @param onlyConfirmed
 *            if true, then return only the confirmed allocations
 * @param orgUnitId
 *            the org unit id
 * @param competencyId
 *            the competency id (for the default)
 */
public static List<PortfolioEntryResourcePlanAllocatedActor> getPEPlanAllocatedActorAsListByPE(Long portfolioEntryId, Date start, Date end,
        boolean onlyConfirmed, Long orgUnitId, Long competencyId) {
    ExpressionList<PortfolioEntryResourcePlanAllocatedActor> exprAllocatedActors = PortfolioEntryResourcePlanDAO.findPEResourcePlanAllocatedActor
            .fetch("actor").fetch("actor.orgUnit").where()
            .eq("deleted", false).isNotNull("startDate").isNotNull("endDate").le("startDate", end).ge("endDate", start)
            .eq("portfolioEntryResourcePlan.deleted", false).eq("portfolioEntryResourcePlan.lifeCycleInstancePlannings.deleted", false)
            .eq("portfolioEntryResourcePlan.lifeCycleInstancePlannings.isFrozen", false)
            .eq("portfolioEntryResourcePlan.lifeCycleInstancePlannings.lifeCycleInstance.deleted", false)
            .eq("portfolioEntryResourcePlan.lifeCycleInstancePlannings.lifeCycleInstance.isActive", true)
            .eq("portfolioEntryResourcePlan.lifeCycleInstancePlannings.lifeCycleInstance.portfolioEntry.id", portfolioEntryId);
    if (onlyConfirmed) {
        exprAllocatedActors = exprAllocatedActors.eq("portfolioEntryResourcePlanAllocationStatusType.status", PortfolioEntryResourcePlanAllocationStatusType.AllocationStatus.CONFIRMED);
    }
    if (orgUnitId != null) {
        exprAllocatedActors = exprAllocatedActors.eq("actor.orgUnit.id", orgUnitId);
    }
    if (competencyId != null) {
        exprAllocatedActors = exprAllocatedActors.eq("actor.defaultCompetency.id", competencyId);
    }
    return exprAllocatedActors.findList();
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:39,代码来源:PortfolioEntryResourcePlanDAO.java

示例2: getPEPlanAllocatedCompetencyAsListByPE

import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
/**
 * Get the competencies allocations for a portfolio entry according to some
 * filters.
 *
 * @param portfolioEntryId
 *            the portfolio entry id
 * @param start
 *            the startDate or the endDate should be after this date
 * @param end
 *            the startDate or the endDate should be before this date
 * @param onlyConfirmed
 *            if true, then return only the confirmed allocations
 * @param competencyId
 *            the competency id
 */
public static List<PortfolioEntryResourcePlanAllocatedCompetency> getPEPlanAllocatedCompetencyAsListByPE(Long portfolioEntryId, Date start, Date end,
        boolean onlyConfirmed, Long competencyId) {
    ExpressionList<PortfolioEntryResourcePlanAllocatedCompetency> exprAllocatedCompetencies = PortfolioEntryResourcePlanDAO.findPEResourcePlanAllocatedCompetency
            .where().eq("deleted", false).isNotNull("startDate").isNotNull("endDate").le("startDate", end).ge("endDate", start)
            .eq("portfolioEntryResourcePlan.deleted", false).eq("portfolioEntryResourcePlan.lifeCycleInstancePlannings.deleted", false)
            .eq("portfolioEntryResourcePlan.lifeCycleInstancePlannings.isFrozen", false)
            .eq("portfolioEntryResourcePlan.lifeCycleInstancePlannings.lifeCycleInstance.deleted", false)
            .eq("portfolioEntryResourcePlan.lifeCycleInstancePlannings.lifeCycleInstance.isActive", true)
            .eq("portfolioEntryResourcePlan.lifeCycleInstancePlannings.lifeCycleInstance.portfolioEntry.id", portfolioEntryId);
    if (onlyConfirmed) {
        exprAllocatedCompetencies = exprAllocatedCompetencies.eq("portfolioEntryResourcePlanAllocationStatusType.name", PortfolioEntryResourcePlanAllocationStatusType.AllocationStatus.CONFIRMED);
    }
    if (competencyId != null) {
        exprAllocatedCompetencies = exprAllocatedCompetencies.eq("competency.id", competencyId);
    }
    return exprAllocatedCompetencies.findList();
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:33,代码来源:PortfolioEntryResourcePlanDAO.java

示例3: getPEResourcePlanAllocatedOrgUnitAsListByPE

import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
/**
 * Get the org unit allocations for a portfolio entry according to some
 * filters.
 *
 * @param portfolioEntryId
 *            the portfolio entry id
 * @param start
 *            the startDate or the endDate should be after this date
 * @param end
 *            the startDate or the endDate should be before this date
 * @param onlyConfirmed
 *            if true, then return only the confirmed allocations
 * @param orgUnitId
 *            the org unit id
 */
public static List<PortfolioEntryResourcePlanAllocatedOrgUnit> getPEResourcePlanAllocatedOrgUnitAsListByPE(Long portfolioEntryId, Date start, Date end,
        boolean onlyConfirmed, Long orgUnitId) {
    ExpressionList<PortfolioEntryResourcePlanAllocatedOrgUnit> exprAllocatedOrgUnits = PortfolioEntryResourcePlanDAO.findPEResourcePlanAllocatedOrgUnit
            .fetch("orgUnit").where().eq("deleted", false).isNotNull("startDate").isNotNull("endDate").le("startDate", end).ge("endDate", start)
            .eq("portfolioEntryResourcePlan.deleted", false).eq("portfolioEntryResourcePlan.lifeCycleInstancePlannings.deleted", false)
            .eq("portfolioEntryResourcePlan.lifeCycleInstancePlannings.isFrozen", false)
            .eq("portfolioEntryResourcePlan.lifeCycleInstancePlannings.lifeCycleInstance.deleted", false)
            .eq("portfolioEntryResourcePlan.lifeCycleInstancePlannings.lifeCycleInstance.isActive", true)
            .eq("portfolioEntryResourcePlan.lifeCycleInstancePlannings.lifeCycleInstance.portfolioEntry.id", portfolioEntryId);
    if (onlyConfirmed) {
        exprAllocatedOrgUnits = exprAllocatedOrgUnits.eq("portfolioEntryResourcePlanAllocationStatusType.status", PortfolioEntryResourcePlanAllocationStatusType.AllocationStatus.CONFIRMED);
    }
    if (orgUnitId != null) {
        exprAllocatedOrgUnits = exprAllocatedOrgUnits.eq("orgUnit.id", orgUnitId);
    }
    return exprAllocatedOrgUnits.findList();
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:33,代码来源:PortfolioEntryResourcePlanDAO.java

示例4: getActorAsListByFilter

import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
/**
 * Get the actors list with filters.
 * 
 * @param isActive
 *            true to return only active actors, false only non-active, null
 *            all.
 * @param managerId
 *            if not null then return only actors with the given manager.
 * @param actorTypeId
 *            if not null then return only actors with the given type.
 * @param competencyId
 *            if not null then return only actors with the given competency.
 * @param orgUnitId
 *            if not null then return only actors with the given org unit.
 */
public static List<Actor> getActorAsListByFilter(Boolean isActive, Long managerId, Long actorTypeId, Long competencyId, Long orgUnitId) {
    ExpressionList<Actor> e = findActor.where().eq("deleted", false);
    if (isActive != null) {
        e = e.eq("isActive", isActive);
    }
    if (managerId != null) {
        e = e.eq("manager.id", managerId);
    }
    if (actorTypeId != null) {
        e = e.eq("actorType.id", actorTypeId);
    }
    if (competencyId != null) {
        e = e.eq("competencies.id", competencyId);
    }
    if (orgUnitId != null) {
        e = e.eq("orgUnit.id", orgUnitId);
    }

    return e.findList();
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:36,代码来源:ActorDao.java

示例5: getStakeholderAsListByFilter

import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
/**
 * Get the stakeholders list with filters.
 * 
 * @param actorId
 *            if not null then return only stakeholders associated the given
 *            actor.
 * @param portfolioId
 *            if not null then return only stakeholders associated the given
 *            portfolio.
 * @param portfolioEntryId
 *            if not null then return only stakeholders associated the given
 *            portfolio entry.
 * @param stakeholderTypeId
 *            if not null then return only stakeholders with the given type.
 */
public static List<Stakeholder> getStakeholderAsListByFilter(Long actorId, Long portfolioId, Long portfolioEntryId, Long stakeholderTypeId) {

    ExpressionList<Stakeholder> e = findStakeholder.where().eq("deleted", false);

    if (actorId != null) {
        e = e.eq("actor.id", actorId);
    }
    if (portfolioId != null) {
        e = e.eq("portfolio.id", portfolioId);
    }
    if (portfolioEntryId != null) {
        e = e.eq("portfolioEntry.id", portfolioEntryId);
    }
    if (stakeholderTypeId != null) {
        e = e.eq("stakeholderType.id", stakeholderTypeId);
    }

    return e.findList();
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:35,代码来源:StakeholderDao.java

示例6: getAttachmentsByPE

import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
private List<Attachment> getAttachmentsByPE(Long portfolioEntryId, ExpressionList<Attachment> expressionList)
  {
  	List<PortfolioEntryReport> perList = PortfolioEntryReportDao.getPEReportAsListByPE(portfolioEntryId);
  	List<LifeCycleMilestoneInstance> lcmiList = LifeCycleMilestoneDao.findLifeCycleMilestoneInstance.where()
              .eq("deleted", false)
              .eq("lifeCycleInstance.portfolioEntry.id", portfolioEntryId)
              .eq("lifeCycleInstance.isActive", true)
              .findList();
  	List<PortfolioEntryPlanningPackage> pkgList = PortfolioEntryPlanningPackageDao.getPEPlanningPackageAsListByPE(portfolioEntryId);

  	expressionList.where()
.disjunction()
	.conjunction()
		.eq("object_type","models.pmo.PortfolioEntryReport")
		.in("object_id", perList.stream().map(PortfolioEntryReport::getId).collect(Collectors.toList()))
	.endJunction()  
	.conjunction()
		.eq("object_type","models.pmo.PortfolioEntryPlanningPackage")
		.in("object_id", pkgList.stream().map(PortfolioEntryPlanningPackage::getId).collect(Collectors.toList()))
	.endJunction()
	.conjunction()
		.eq("object_type","models.governance.LifeCycleMilestoneInstance")
		.in("object_id", lcmiList.stream().map(LifeCycleMilestoneInstance::getId).collect(Collectors.toList()))
	.endJunction()    	
	.conjunction()
		.eq("object_type","models.pmo.PortfolioEntry")
		.eq("object_id", portfolioEntryId)
	.endJunction()
.endJunction();
  	
  	return expressionList.findList();
  }
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:33,代码来源:PortfolioEntryStatusReportingController.java

示例7: getPEResourcePlanAllocatedCompetencyAsListByPE

import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
/**
 * Get the allocated competencies of a portfolio entry.
 *
 * @param portfolioEntryId
 *            the portfolio entry id
 **/
public static List<PortfolioEntryResourcePlanAllocatedCompetency> getPEResourcePlanAllocatedCompetencyAsListByPE(Long portfolioEntryId) {
    ExpressionList<PortfolioEntryResourcePlanAllocatedCompetency> exprAllocatedCompetencies = PortfolioEntryResourcePlanDAO.findPEResourcePlanAllocatedCompetency
            .where().eq("deleted", false).eq("portfolioEntryResourcePlan.deleted", false)
            .eq("portfolioEntryResourcePlan.lifeCycleInstancePlannings.deleted", false)
            .eq("portfolioEntryResourcePlan.lifeCycleInstancePlannings.isFrozen", false)
            .eq("portfolioEntryResourcePlan.lifeCycleInstancePlannings.lifeCycleInstance.deleted", false)
            .eq("portfolioEntryResourcePlan.lifeCycleInstancePlannings.lifeCycleInstance.isActive", true)
            .eq("portfolioEntryResourcePlan.lifeCycleInstancePlannings.lifeCycleInstance.portfolioEntry.id", portfolioEntryId);

    return exprAllocatedCompetencies.findList();
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:18,代码来源:PortfolioEntryResourcePlanDAO.java

示例8: getPurchaseOrderAsListByFilter

import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
/**
 * Get the purchase orders list with filter.
 * 
 * @param isCancelled
 *            true to return only cancelled purchase order, false only not
 *            cancelled, null all.
 **/
public static List<PurchaseOrder> getPurchaseOrderAsListByFilter(Boolean isCancelled) {

    ExpressionList<PurchaseOrder> e = PurchaseOrderDAO.findPurchaseOrder.where().eq("deleted", false).ne("refId",
            IMafConstants.PURCHASE_ORDER_REF_ID_FOR_BUDGET_TRACKING);

    if (isCancelled != null) {
        e = e.eq("isCancelled", isCancelled);
    }

    return e.findList();
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:19,代码来源:PurchaseOrderDAO.java

示例9: getCurrencyAsListByActive

import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
/**
 * Get the currencies list with filter.
 * 
 * @param isActive
 *            the flag isActive
 **/
public static List<Currency> getCurrencyAsListByActive(Boolean isActive) {

    ExpressionList<Currency> e = CurrencyDAO.find.where().eq("deleted", false);

    if (isActive != null) {
        e = e.eq("isActive", isActive);
    }

    return e.findList();
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:17,代码来源:CurrencyDAO.java

示例10: getOrgUnitAsListByFilter

import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
/**
 * Get the org units list with filters.
 * 
 * @param isActive
 *            true to return only active org units, false only non-active,
 *            null all.
 * @param managerId
 *            if not null then return only org units with the given manager.
 * @param parentId
 *            if not null then return only org units with the given parent.
 * @param orgUnitTypeId
 *            if not null then return only org units with the given type.
 * @param canSponsor
 *            if not null then return only sponsoring units.
 * @param canDeliver
 *            if not null then return only delivery units.
 **/
public static List<OrgUnit> getOrgUnitAsListByFilter(Boolean isActive, Long managerId, Long parentId, Long orgUnitTypeId, Boolean canSponsor,
        Boolean canDeliver) {

    ExpressionList<OrgUnit> e = findOrgUnit.where().eq("deleted", false);

    if (isActive != null) {
        e = e.eq("isActive", isActive);
    }
    if (managerId != null) {
        e = e.eq("manager.id", managerId);
    }
    if (parentId != null) {
        e = e.eq("parent.id", parentId);
    }
    if (orgUnitTypeId != null) {
        e = e.eq("orgUnitType.id", orgUnitTypeId);
    }
    if (canSponsor != null) {
        e = e.eq("canSponsor", canSponsor);
    }
    if (canDeliver != null) {
        e = e.eq("canDeliver", canDeliver);
    }

    return e.findList();
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:44,代码来源:OrgUnitDao.java

示例11: getPEAsListByFilter

import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
/**
 * Get the portfolio entries list with filter.
 * 
 * @param managerId
 *            if not null then return only portfolio entries for the given
 *            manager.
 * @param sponsoringUnitId
 *            if not null then return only portfolio entries with the given
 *            sponsoring unit.
 * @param deliveryUnitId
 *            if not null then return only portfolio entries with the given
 *            delivery unit.
 * @param portfolioId
 *            if not null then return only portfolio entries belonging to
 *            the given portfolio.
 * @param archived
 *            true to return only archived portfolio entries, false only
 *            active, null all.
 * @param portfolioEntryTypeId
 *            if not null then return only portfolio entries with the given
 *            type.
 * @param isPublic
 *            true to return only public portfolio entries, false only
 *            confidential, null all.
 */
public static List<PortfolioEntry> getPEAsListByFilter(Long managerId, Long sponsoringUnitId, Long deliveryUnitId, Long portfolioId, Boolean archived,
        Long portfolioEntryTypeId, Boolean isPublic) {

    ExpressionList<PortfolioEntry> e = findPortfolioEntry.where().eq("deleted", false);
    if (managerId != null) {
        e = e.eq("manager.id", managerId);
    }
    if (sponsoringUnitId != null) {
        e = e.eq("sponsoringUnit.id", sponsoringUnitId);
    }
    if (deliveryUnitId != null) {
        e = e.eq("deliveryUnits.id", deliveryUnitId);
    }
    if (portfolioId != null) {
        e = e.eq("portfolios.id", portfolioId);
    }
    if (archived != null) {
        e = e.eq("archived", archived);
    }
    if (portfolioEntryTypeId != null) {
        e = e.eq("portfolioEntryType.id", portfolioEntryTypeId);
    }
    if (isPublic != null) {
        e = e.eq("isPublic", isPublic);
    }

    return e.findList();
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:54,代码来源:PortfolioEntryDao.java

示例12: getPETypeAsListByFilter

import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
/**
 * Get the portfolio entry types list with filters.
 * 
 * @param isActive
 *            true to return only active portfolio entry type, false only
 *            non-active, null all.
 * @param isRelease
 *            true to return only release portfolio entry type, false only
 *            initiative, null all.
 */
public static List<PortfolioEntryType> getPETypeAsListByFilter(Boolean isActive, Boolean isRelease) {
    ExpressionList<PortfolioEntryType> e = findPortfolioEntryType.where().eq("deleted", false);
    if (isActive != null) {
        e = e.eq("isActive", isActive);
    }
    if (isRelease != null) {
        e = e.eq("isRelease", isRelease);
    }
    return e.findList();
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:21,代码来源:PortfolioEntryDao.java

示例13: getCompetencyAsListByFilter

import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
/**
 * Get the competencies list with filters.
 * 
 * @param isActive
 *            true to return only active type, false only non-active, null
 *            all.
 * @param actorId
 *            if not null then return only competencies for the given actor.
 */
public static List<Competency> getCompetencyAsListByFilter(Boolean isActive, Long actorId) {

    ExpressionList<Competency> e = findCompetency.where().eq("deleted", false);

    if (isActive != null) {
        e = e.eq("isActive", isActive);
    }
    if (actorId != null) {
        e = e.eq("actors.id", actorId);
    }

    return e.findList();
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:23,代码来源:ActorDao.java

示例14: getAllActorsPortfolioEntryAllocationIds

import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
/**
 * Get all actors portfolio entry allocation ids according to the current
 * filter configuration.
 * 
 * @param id
 *            the org unit id
 */
@Dynamic(IMafConstants.ORG_UNIT_VIEW_DYNAMIC_PERMISSION)
public Result getAllActorsPortfolioEntryAllocationIds(Long id) {

    try {

        // get the uid of the current user
        String uid = getUserSessionManagerPlugin().getUserSessionId(ctx());

        // fill the filter config
        FilterConfig<PortfolioEntryResourcePlanAllocatedActorListView> filterConfig = this.getTableProvider()
                .get().portfolioEntryResourcePlanAllocatedActor.filterConfig.persistCurrentInDefault(uid, request());

        ExpressionList<PortfolioEntryResourcePlanAllocatedActor> expressionList = filterConfig
                .updateWithSearchExpression(PortfolioEntryResourcePlanDAO.getPEPlanAllocatedActorAsExprByOrgUnitAndActive(id, true, true));

        List<String> ids = new ArrayList<>();
        for (PortfolioEntryResourcePlanAllocatedActor allocatedActor : expressionList.findList()) {
            ids.add(String.valueOf(allocatedActor.id));
        }

        ObjectMapper mapper = new ObjectMapper();
        JsonNode node = mapper.valueToTree(ids);

        return ok(node);

    } catch (Exception e) {
        return internalServerError();
    }
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:37,代码来源:OrgUnitController.java

示例15: getTable

import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
/**
   * Get the attachment management table.
   *
   * @param filterConfig the table filter configuration
   */
  private Pair<Table<AttachmentManagementListView>, Pagination<Attachment>> getTable(FilterConfig<AttachmentManagementListView> filterConfig) {
  	ExpressionList<Attachment> expressionList = filterConfig.updateWithSearchExpression(Attachment.getAllBusinessObjectsAttachmentsAsExpression());
  	
  	filterConfig.updateWithSortExpression(expressionList);
  	
  	Pagination<Attachment> pagination =null;
  	List<AttachmentManagementListView> attachmentManagementListViews=null;
  	List<Attachment> foundAttachments=null;
  	
      //Check if the user selected a portfolio_entry filter in the table
      UserColumnConfiguration ucc=filterConfig.getUserColumnConfigurations().get("portfolioEntryId");
      Long selectedPortfolioentry=0l;
      if(ucc.isFiltered() && ucc.isDisplayed() && ucc!=null){
      	Object[] valueStructure=(Object[]) ucc.getFilterValue();
      	selectedPortfolioentry=(Long) valueStructure[0];
      	if(log.isDebugEnabled()){
      		log.debug("Selected portfolio entry "+selectedPortfolioentry);
      	}
      }
  	
//Apply a RAM filter to remove the confidential projects (WARNING: this may have some performance issues)
      //and (if selected) the attachment which do not belong to the selected portfolioentry
  	boolean filterConfidentials=true;
  	try{
  		filterConfidentials=getSecurityService().restrict(IMafConstants.ADMIN_ATTACHMENTS_MANAGEMENT_PERMISSION_NO_CONFIDENTIAL);
  	}catch(AccountManagementException e){
  		log.error("Error while checking the permission ADMIN_ATTACHMENTS_MANAGEMENT_PERMISSION_NO_CONFIDENTIAL",e);
  	}
  	if(filterConfidentials || selectedPortfolioentry>0){
  		foundAttachments=expressionList.findList();
  		List<Attachment> filteredAttachments=new ArrayList<>();
  		if(foundAttachments!=null){
       	for(Attachment attachement : foundAttachments){
       		AttachmentManagementListView view=new AttachmentManagementListView(attachement);
       		if(view.portfolioEntryId!=null && view.portfolioEntryId > 0){
       			boolean keepAttachment=true;
       			if(filterConfidentials){
        			PortfolioEntry pfe=PortfolioEntryDao.getPEAllById(view.portfolioEntryId);
                	if(pfe.isPublic && !pfe.deleted){
                		keepAttachment=true;
                	}else{
                		keepAttachment=false;
                	}
       			}
       			if(selectedPortfolioentry>0 && !view.portfolioEntryId.equals(selectedPortfolioentry)){
                	if(log.isDebugEnabled()){
                		log.debug(">>> Match with "+view.id);
                	}
                	keepAttachment = false;
       			}
               	if(keepAttachment){
               		filteredAttachments.add(attachement);
               	}
       		}else{
       			if(selectedPortfolioentry.longValue()==0){
       				filteredAttachments.add(attachement);
       			}
       		}
       	}
  		}
      	pagination=new Pagination<>(getPreferenceManagerPlugin(),filteredAttachments.size());
      	pagination.setCurrentPage(filterConfig.getCurrentPage());
      	filteredAttachments=pagination.getEntriesForCurrentPage(filteredAttachments);
      	attachmentManagementListViews = filteredAttachments.stream().map(AttachmentManagementListView::new).collect(Collectors.toList());
      }else{
      	pagination = new Pagination<>(getPreferenceManagerPlugin(), expressionList);
          pagination.setCurrentPage(filterConfig.getCurrentPage());
          attachmentManagementListViews = pagination.getListOfObjects().stream().map(AttachmentManagementListView::new).collect(Collectors.toList());
      }
  	
      Table<AttachmentManagementListView> table = getTableProvider().get().attachmentManagement.templateTable.fillForFilterConfig(attachmentManagementListViews, filterConfig.getColumnsToHide());

      return Pair.of(table, pagination);
  }
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:80,代码来源:AttachmentsController.java


注:本文中的com.avaje.ebean.ExpressionList.findList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。