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 http://www.opensource.org/licenses/ecl2.php 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.engine.node;
A KeyValuePair that adds an id fields that makes it sufficient for storing in a database.

Author(s):
Kuali Rice Team (rice.collab@kuali.org)
//@Sequence(name="KREW_RTE_NODE_S", property="stateId")
public abstract class State extends PersistableBusinessObjectBase implements KeyValue {
    @Id
    @GeneratedValue(generator="KREW_RTE_NODE_S")
	@GenericGenerator(name="KREW_RTE_NODE_S",strategy="org.hibernate.id.enhanced.SequenceStyleGenerator",parameters={
			@Parameter(name="sequence_name",value="KREW_RTE_NODE_S"),
			@Parameter(name="value_column",value="id")
	})
	protected String stateId;
	private String key;
    private String value;
    public State() {}
    
    public State(String keyString value) {
    	this. = key;
    	this. = value;
    }
    @PrePersist
    public void customPrePersist(){
        OrmUtils.populateAutoIncValue(this, KEWServiceLocator.getEntityManagerFactory().createEntityManager());
    }
    public String getStateId() {
        return ;
    }
    public void setStateId(String stateId) {
        this. = stateId;
    }
    
    @Override
    public String getKey() {
    	return ;
    }
    
    @Override
    public String getValue() {
    	return ;
    }
    
    public void setKey(String key) {
		this. = key;
	}
	public void setValue(String value) {
		this. = value;
	}
		final LinkedHashMap<StringObjectmap = new LinkedHashMap<StringObject>();
		map.put("stateId");
		map.put("key");
		map.put("value");
		return map;
	}
New to GrepCode? Check out our FAQ X