Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2005-2013 The Kuali Foundation Licensed under the Educational Community License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 package org.kuali.rice.kew.rule.dao.impl;
 import java.util.List;
 public class RuleAttributeDAOJpaImpl implements RuleAttributeDAO {
     private EntityManager entityManager;
     private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(RuleAttributeDAOJpaImpl.class);

the entityManager
 		return this.;

entityManager the entityManager to set
 	public void setEntityManager(EntityManager entityManager) {
 		this. = entityManager;
 	public void save(RuleAttribute ruleAttribute) {
         if (ruleAttribute.getId() == null) {
         } else {
     public void delete(String ruleAttributeId) {
     public RuleAttribute findByRuleAttributeId(String ruleAttributeId) {
         return (RuleAttribute.createNamedQuery("RuleAttribute.FindById").setParameter("ruleAttributeId"ruleAttributeId).getSingleResult();
     public List<RuleAttributefindByRuleAttribute(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(crit).toQuery().getResultList();
     public List<RuleAttributegetAllRuleAttributes() {
         return  .createNamedQuery("RuleAttribute.GetAllRuleAttributes").getResultList();
     public RuleAttribute findByName(String name) {
         .debug("findByName name=" + name);
         return (RuleAttribute.createNamedQuery("RuleAttribute.FindByName").setParameter("name"name).getSingleResult();
     public List<RuleAttributefindByClassName(String classname) {
         .debug("findByClassName classname=" + classname);
         List<RuleAttributeruleAttributes = .createNamedQuery("RuleAttribute.FindByClassName").setParameter("resourceDescriptor"classname).getResultList();
         return ruleAttributes;
New to GrepCode? Check out our FAQ X