本文整理汇总了Java中org.kuali.rice.kew.rule.bo.RuleAttribute.getName方法的典型用法代码示例。如果您正苦于以下问题:Java RuleAttribute.getName方法的具体用法?Java RuleAttribute.getName怎么用?Java RuleAttribute.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.kew.rule.bo.RuleAttribute
的用法示例。
在下文中一共展示了RuleAttribute.getName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findByRuleAttribute
import org.kuali.rice.kew.rule.bo.RuleAttribute; //导入方法依赖的package包/类
public List<RuleAttribute> findByRuleAttribute(RuleAttribute ruleAttribute) {
QueryByCriteria.Builder builder =
QueryByCriteria.Builder.create();
List<Predicate> predicates = new ArrayList<Predicate>();
if (ruleAttribute.getName() != null) {
predicates.add(likeIgnoreCase("name",ruleAttribute.getName()));
}
if (ruleAttribute.getResourceDescriptor() != null) {
predicates.add(likeIgnoreCase("resourceDescriptor",ruleAttribute.getResourceDescriptor()));
}
if (ruleAttribute.getType() != null) {
predicates.add(likeIgnoreCase("type",ruleAttribute.getType()));
}
Predicate[] preds = predicates.toArray(new Predicate[predicates.size()]);
builder.setPredicates(preds);
QueryResults<RuleAttribute> results = getDataObjectService().findMatching(RuleAttribute.class, builder.build());
return results.getResults();
}
示例2: findByRuleAttribute
import org.kuali.rice.kew.rule.bo.RuleAttribute; //导入方法依赖的package包/类
public List<RuleAttribute> findByRuleAttribute(RuleAttribute ruleAttribute) {
Criteria crit = new Criteria("RuleAttribute", "ra");
if (ruleAttribute.getName() != null) {
crit.rawJpql("UPPER(RULE_ATTRIB_NM) like '" + ruleAttribute.getName().toUpperCase() + "'");
}
if (ruleAttribute.getResourceDescriptor() != null) {
crit.rawJpql("UPPER(RULE_ATTRIB_CLS_NM) like '" + ruleAttribute.getResourceDescriptor().toUpperCase() + "'");
}
if (ruleAttribute.getType() != null) {
crit.rawJpql("UPPER(RULE_ATTRIB_TYP) like '" + ruleAttribute.getType().toUpperCase() + "'");
}
return new QueryByCriteria(entityManager, crit).toQuery().getResultList();
}
示例3: validate
import org.kuali.rice.kew.rule.bo.RuleAttribute; //导入方法依赖的package包/类
private void validate(RuleAttribute ruleAttribute) {
LOG.debug("validating ruleAttribute");
Collection errors = new ArrayList();
if (ruleAttribute.getName() == null || ruleAttribute.getName().trim().equals("")) {
errors.add(new WorkflowServiceErrorImpl("Please enter a rule attribute name.", RULE_ATTRIBUTE_NAME_REQUIRED));
LOG.error("Rule attribute name is missing");
} else {
ruleAttribute.setName(ruleAttribute.getName().trim());
if (ruleAttribute.getId() == null) {
RuleAttribute nameInUse = findByName(ruleAttribute.getName());
if (nameInUse != null) {
errors.add(new WorkflowServiceErrorImpl("Rule attribute name already in use", "routetemplate.ruleattribute.name.duplicate"));
LOG.error("Rule attribute name already in use");
}
}
}
if (ruleAttribute.getResourceDescriptor() == null || ruleAttribute.getResourceDescriptor().trim().equals("")) {
errors.add(new WorkflowServiceErrorImpl("Please enter a rule attribute class name.", RULE_ATTRIBUTE_CLASS_REQUIRED));
LOG.error("Rule attribute class name is missing");
} else {
ruleAttribute.setResourceDescriptor(ruleAttribute.getResourceDescriptor().trim());
}
LOG.debug("end validating ruleAttribute");
if (!errors.isEmpty()) {
throw new WorkflowServiceErrorException("RuleAttribute Validation Error", errors);
}
}
示例4: findByRuleAttribute
import org.kuali.rice.kew.rule.bo.RuleAttribute; //导入方法依赖的package包/类
public List<RuleAttribute> findByRuleAttribute(RuleAttribute ruleAttribute) {
Criteria crit = new Criteria();
if (ruleAttribute.getName() != null) {
crit.addSql("UPPER(RULE_ATTRIB_NM) like '" + ruleAttribute.getName().toUpperCase() + "'");
}
if (ruleAttribute.getResourceDescriptor() != null) {
crit.addSql("UPPER(RULE_ATTRIB_CLS_NM) like '" + ruleAttribute.getResourceDescriptor().toUpperCase() + "'");
}
if (ruleAttribute.getType() != null) {
crit.addSql("UPPER(RULE_ATTRIB_TYP) like '" + ruleAttribute.getType().toUpperCase() + "'");
}
return (List<RuleAttribute>) this.getPersistenceBrokerTemplate().getCollectionByQuery(new QueryByCriteria(RuleAttribute.class, crit));
}