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


Java IAConstraintVO.getSortAsc方法代码示例

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


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

示例1: validateConstraints

import org.easyrec.model.core.transfer.IAConstraintVO; //导入方法依赖的package包/类
private void validateConstraints(IAConstraintVO<Integer, Integer> constraints) {
    if (constraints == null) {
        throw new IllegalArgumentException("missing Constraint 'constraints'");
    }
    if ((constraints.getSortAsc() != null) && (constraints.getSortField() == null)) {
        throw new IllegalArgumentException("wrong Constraint - if sortAsc is specified, a valid sortField needs to be specified as well");
    }
    if ((constraints.getSortAsc() != null) && (constraints.getSortField() != null)) {
        if (!constraints.getSortField().equals(ItemAssocDAO.DEFAULT_ASSOC_VALUE_COLUMN_NAME) &&
            !constraints.getSortField().equals(ItemAssocDAO.DEFAULT_CHANGE_DATE_COLUMN_NAME) &&
            !constraints.getSortField().equals(ItemAssocDAO.DEFAULT_ACTIVE_COLUMN_NAME) &&
            !constraints.getSortField().equals(ItemAssocDAO.DEFAULT_ASSOC_TYPE_COLUMN_NAME) &&
            !constraints.getSortField().equals(ItemAssocDAO.DEFAULT_ID_COLUMN_NAME) &&
            !constraints.getSortField().equals(ItemAssocDAO.DEFAULT_ITEM_FROM_COLUMN_NAME) &&
            !constraints.getSortField().equals(ItemAssocDAO.DEFAULT_ITEM_FROM_TYPE_COLUMN_NAME) &&
            !constraints.getSortField().equals(ItemAssocDAO.DEFAULT_ITEM_TO_COLUMN_NAME) &&
            !constraints.getSortField().equals(ItemAssocDAO.DEFAULT_ITEM_TO_TYPE_COLUMN_NAME) &&
            !constraints.getSortField().equals(ItemAssocDAO.DEFAULT_SOURCE_TYPE_COLUMN_NAME) &&
            !constraints.getSortField().equals(ItemAssocDAO.DEFAULT_TENANT_COLUMN_NAME) &&
            !constraints.getSortField().equals(ItemAssocDAO.DEFAULT_VIEW_TYPE_COLUMN_NAME)) {
            throw new IllegalArgumentException("wrong Constraint - unknown sortField");
        }
    }
}
 
开发者ID:major2015,项目名称:easyrec_major,代码行数:25,代码来源:ItemAssocDAOMysqlImpl.java

示例2: convertIAConstraintVO

import org.easyrec.model.core.transfer.IAConstraintVO; //导入方法依赖的package包/类
@Override
public IAConstraintVO<Integer, String> convertIAConstraintVO(Integer tenantId,
                                                                     IAConstraintVO<Integer, Integer> constraint) {
    if (constraint == null) {
        return null;
    }

    return new IAConstraintVO<>(
            constraint.getNumberOfResults(), viewTypeDAO.getTypeById(tenantId, constraint.getViewType()),
            sourceTypeDAO.getTypeById(tenantId, constraint.getSourceType()), constraint.getSourceInfo(),
            constraint.getTenant(), constraint.isActive(), constraint.getSortAsc());
}
 
开发者ID:major2015,项目名称:easyrec_major,代码行数:13,代码来源:TypeMappingServiceImpl.java

示例3: convertTypedIAConstraintVO

import org.easyrec.model.core.transfer.IAConstraintVO; //导入方法依赖的package包/类
@Override
public IAConstraintVO<Integer, Integer> convertTypedIAConstraintVO(Integer tenantId,
                                                                            IAConstraintVO<Integer, String> typedConstraint) {
    if (typedConstraint == null) {
        return null;
    }

    return new IAConstraintVO<>(
            typedConstraint.getNumberOfResults(), viewTypeDAO.getIdOfType(tenantId, typedConstraint.getViewType()),
            sourceTypeDAO.getIdOfType(tenantId, typedConstraint.getSourceType()), typedConstraint.getSourceInfo(),
            typedConstraint.getTenant(), typedConstraint.isActive(), typedConstraint.getSortAsc());
}
 
开发者ID:major2015,项目名称:easyrec_major,代码行数:13,代码来源:TypeMappingServiceImpl.java

示例4: convertIAConstraintVO

import org.easyrec.model.core.transfer.IAConstraintVO; //导入方法依赖的package包/类
@Override
public IAConstraintVO<Integer, String> convertIAConstraintVO(Integer tenantId,
                                                                     IAConstraintVO<Integer, Integer> constraint) {
    if (constraint == null) {
        return null;
    }

    return new IAConstraintVO<Integer, String>(
            constraint.getNumberOfResults(), viewTypeDAO.getTypeById(tenantId, constraint.getViewType()),
            sourceTypeDAO.getTypeById(tenantId, constraint.getSourceType()), constraint.getSourceInfo(),
            constraint.getTenant(), constraint.isActive(), constraint.getSortAsc());
}
 
开发者ID:customertimes,项目名称:easyrec-PoC,代码行数:13,代码来源:TypeMappingServiceImpl.java

示例5: convertTypedIAConstraintVO

import org.easyrec.model.core.transfer.IAConstraintVO; //导入方法依赖的package包/类
@Override
public IAConstraintVO<Integer, Integer> convertTypedIAConstraintVO(Integer tenantId,
                                                                            IAConstraintVO<Integer, String> typedConstraint) {
    if (typedConstraint == null) {
        return null;
    }

    return new IAConstraintVO<Integer, Integer>(
            typedConstraint.getNumberOfResults(), viewTypeDAO.getIdOfType(tenantId, typedConstraint.getViewType()),
            sourceTypeDAO.getIdOfType(tenantId, typedConstraint.getSourceType()), typedConstraint.getSourceInfo(),
            typedConstraint.getTenant(), typedConstraint.isActive(), typedConstraint.getSortAsc());
}
 
开发者ID:customertimes,项目名称:easyrec-PoC,代码行数:13,代码来源:TypeMappingServiceImpl.java


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