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


Java ExpressionList.add方法代码示例

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


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

示例1: getPEPlanAllocatedActorAsExprByActorAndActive

import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
/**
 * Get all allocation of an actor for not archived portfolio entries as an
 * expression list.
 *
 * @param actorId
 *            the actor id
 * @param activeOnly
 *            if true, it returns only the allocation for which the end date
 *            is in the future
 */
public static ExpressionList<PortfolioEntryResourcePlanAllocatedActor> getPEPlanAllocatedActorAsExprByActorAndActive(Long actorId, boolean activeOnly, boolean withArchived) {

    ExpressionList<PortfolioEntryResourcePlanAllocatedActor> expr = PortfolioEntryResourcePlanDAO.findPEResourcePlanAllocatedActor.orderBy("endDate")
            .where().eq("deleted", false).eq("actor.id", actorId).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.deleted", false);

    if (!withArchived) {
        expr = expr.add(Expr.eq("portfolioEntryResourcePlan.lifeCycleInstancePlannings.lifeCycleInstance.portfolioEntry.archived", false));
    }

    if (activeOnly) {
        expr = expr.add(Expr.or(Expr.isNull("endDate"), Expr.gt("endDate", new Date())));
    }

    return expr;
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:31,代码来源:PortfolioEntryResourcePlanDAO.java

示例2: getPEPlanAllocatedActorAsExprByOrgUnitAndActive

import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
/**
 * Get all allocation of the actors of an org unit for not archived
 * portfolio entries as an expression list.
 *
 * @param orgUnitId
 *            the org unit id
 * @param activeOnly
 *            if true, it returns only the allocation for which the end date
 *            is in the future
 */
public static ExpressionList<PortfolioEntryResourcePlanAllocatedActor> getPEPlanAllocatedActorAsExprByOrgUnitAndActive(Long orgUnitId,
        boolean activeOnly, boolean draftExcluded) {

    ExpressionList<PortfolioEntryResourcePlanAllocatedActor> expr = PortfolioEntryResourcePlanDAO.findPEResourcePlanAllocatedActor.where()
            .eq("deleted", false).eq("actor.isActive", true).eq("actor.deleted", false).eq("actor.orgUnit.id", orgUnitId)
            .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.deleted", false)
            .eq("portfolioEntryResourcePlan.lifeCycleInstancePlannings.lifeCycleInstance.portfolioEntry.archived", false);

    if (activeOnly) {
        expr = expr.add(Expr.or(Expr.isNull("endDate"), Expr.gt("endDate", new Date())));
    }

    if (draftExcluded) {
        expr = expr.not(Expr.eq("portfolioEntryResourcePlanAllocationStatusType", PortfolioEntryResourcePlanDAO.getAllocationStatusByType(PortfolioEntryResourcePlanAllocationStatusType.AllocationStatus.DRAFT)));
    }

    return expr;
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:33,代码来源:PortfolioEntryResourcePlanDAO.java

示例3: getPEPlanAllocatedActorAsExprByManager

import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
/**
 * Get all allocation of the actors from the given manager for not archived
 * portfolio entries, as an expression list.
 *
 * @param actorId
 *            the manager id
 * @param activeOnly
 *            if true, it returns only the allocation for which the end date
 *            is in the future
 */
public static ExpressionList<PortfolioEntryResourcePlanAllocatedActor> getPEPlanAllocatedActorAsExprByManager(Long actorId, boolean activeOnly) {

    ExpressionList<PortfolioEntryResourcePlanAllocatedActor> expr = PortfolioEntryResourcePlanDAO.findPEResourcePlanAllocatedActor.where()
            .eq("deleted", false).eq("actor.isActive", true).eq("actor.deleted", false).eq("actor.manager.id", actorId)
            .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.deleted", false)
            .eq("portfolioEntryResourcePlan.lifeCycleInstancePlannings.lifeCycleInstance.portfolioEntry.archived", false);

    if (activeOnly) {
        expr = expr.add(Expr.or(Expr.isNull("endDate"), Expr.gt("endDate", new Date())));
    }

    return expr;
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:28,代码来源:PortfolioEntryResourcePlanDAO.java

示例4: getPEResourcePlanAllocatedOrgUnitAsExprByOrgUnit

import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
/**
 * Get all allocation of an org unit for not archived portfolio entries as
 * an expression list.
 *
 * @param orgUnitId
 *            the org unit id
 * @param activeOnly
 *            if true, it returns only the allocation for which the end date
 *            is in the future
 */
public static ExpressionList<PortfolioEntryResourcePlanAllocatedOrgUnit> getPEResourcePlanAllocatedOrgUnitAsExprByOrgUnit(Long orgUnitId,
        boolean activeOnly, boolean draftExcluded) {

    ExpressionList<PortfolioEntryResourcePlanAllocatedOrgUnit> expr = PortfolioEntryResourcePlanDAO.findPEResourcePlanAllocatedOrgUnit.orderBy("endDate")
            .where().eq("deleted", false).eq("orgUnit.id", orgUnitId).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.deleted", false)
            .eq("portfolioEntryResourcePlan.lifeCycleInstancePlannings.lifeCycleInstance.portfolioEntry.archived", false);

    if (activeOnly) {
        expr = expr.add(Expr.or(Expr.isNull("endDate"), Expr.gt("endDate", new Date())));
    }

    if (draftExcluded) {
        expr = expr.not(Expr.eq("portfolioEntryResourcePlanAllocationStatusType", PortfolioEntryResourcePlanDAO.getAllocationStatusByType(PortfolioEntryResourcePlanAllocationStatusType.AllocationStatus.DRAFT)));
    }

    return expr;
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:33,代码来源:PortfolioEntryResourcePlanDAO.java

示例5: getTimesheetActivityAllocatedActorAsExprByActor

import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
/**
 * Get all allocation of an actor as an expression list.
 * 
 * @param actorId
 *            the actor id
 * @param activeOnly
 *            if true, it returns only the allocation for which the end date
 *            is in the future
 */
public static ExpressionList<TimesheetActivityAllocatedActor> getTimesheetActivityAllocatedActorAsExprByActor(Long actorId, boolean activeOnly) {

    ExpressionList<TimesheetActivityAllocatedActor> expr = findTimesheetActivityAllocatedActor.orderBy("endDate").where().eq("deleted", false)
            .eq("actor.id", actorId).eq("timesheetActivity.deleted", false);

    if (activeOnly) {
        expr = expr.add(Expr.or(Expr.isNull("endDate"), Expr.gt("endDate", new Date())));
    }

    return expr;
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:21,代码来源:TimesheetDao.java

示例6: getTimesheetActivityAllocatedActorAsExprByOrgUnit

import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
/**
 * Get all allocations of the actors of an org unit as an expression list.
 * 
 * @param orgUnitId
 *            the org unit id
 * @param activeOnly
 *            if true, it returns only the allocation for which the end date
 *            is in the future
 */
public static ExpressionList<TimesheetActivityAllocatedActor> getTimesheetActivityAllocatedActorAsExprByOrgUnit(Long orgUnitId, boolean activeOnly) {

    ExpressionList<TimesheetActivityAllocatedActor> expr = findTimesheetActivityAllocatedActor.where().eq("deleted", false).eq("actor.isActive", true)
            .eq("actor.deleted", false).eq("actor.orgUnit.id", orgUnitId).eq("timesheetActivity.deleted", false);

    if (activeOnly) {
        expr = expr.add(Expr.or(Expr.isNull("endDate"), Expr.gt("endDate", new Date())));
    }

    return expr;
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:21,代码来源:TimesheetDao.java

示例7: getTimesheetActivityAllocatedActorAsExprByManager

import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
/**
 * Get all allocations of the active subordinates of an actor as an
 * expression list.
 * 
 * @param actorId
 *            id the actor id
 * @param activeOnly
 *            if true, it returns only the allocation for which the end date
 *            is in the future
 */
public static ExpressionList<TimesheetActivityAllocatedActor> getTimesheetActivityAllocatedActorAsExprByManager(Long actorId, boolean activeOnly) {

    ExpressionList<TimesheetActivityAllocatedActor> expr = findTimesheetActivityAllocatedActor.where().eq("deleted", false).eq("actor.isActive", true)
            .eq("actor.deleted", false).eq("actor.manager.id", actorId).eq("timesheetActivity.deleted", false);

    if (activeOnly) {
        expr = expr.add(Expr.or(Expr.isNull("endDate"), Expr.gt("endDate", new Date())));
    }

    return expr;
}
 
开发者ID:theAgileFactory,项目名称:maf-desktop-app,代码行数:22,代码来源:TimesheetDao.java

示例8: updateWithSearchExpression

import com.avaje.ebean.ExpressionList; //导入方法依赖的package包/类
/**
 * Update the expression with the right SQL instructions.
 * 
 * @param <K>
 *            the corresponding model object
 * @param expression
 *            an SQL expression
 */
public synchronized <K> ExpressionList<K> updateWithSearchExpression(ExpressionList<K> expression) {
    for (String columnId : getUserColumnConfigurations().keySet()) {
        UserColumnConfiguration userColumnConfiguration = getUserColumnConfigurations().get(columnId);
        SelectableColumn selectableColumn = getSelectableColumns().get(columnId);
        if (userColumnConfiguration.isFiltered()) {
            String fieldName = selectableColumn.getFieldName();
            Expression temp = selectableColumn.getFilterComponent().getEBeanSearchExpression(userColumnConfiguration.getFilterValue(), fieldName);
            if (temp != null) {
                expression.add(temp);
            }
        }
    }
    return expression;
}
 
开发者ID:theAgileFactory,项目名称:app-framework,代码行数:23,代码来源:FilterConfig.java


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