本文整理汇总了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");
}
}
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}