當前位置: 首頁>>代碼示例>>Java>>正文


Java RuleAttribute.getName方法代碼示例

本文整理匯總了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();

}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:22,代碼來源:RuleAttributeDAOJpa.java

示例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();

}
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:17,代碼來源:RuleAttributeDAOJpaImpl.java

示例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);
    }
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:29,代碼來源:RuleAttributeServiceImpl.java

示例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));

}
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:15,代碼來源:RuleAttributeDAOOjbImpl.java


注:本文中的org.kuali.rice.kew.rule.bo.RuleAttribute.getName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。