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.doctype;
Composite identifier object for an ApplicationDocumentStatusCategory. The elements that uniquely identify a category are the document type id and the category name.
 public class ApplicationDocumentStatusCategoryId implements Serializable {
     private String documentTypeId;
     private String categoryName;

Get the document type id

the document type id
     public String getDocumentTypeId() { return ; }

Set the document type id

documentTypeId the document type id to set
     public void setDocumentTypeId(String documentTypeId) { this. = documentTypeId; }

Get the category name

the category name
     public String getCategoryName() { return ; }

Set the category name

categoryName the category name to set
     public void setCategoryName(String categoryName) { this. = categoryName; }

calculates a hashcode based on the documentTypeId and categoryName

 	public int hashCode() {
 		final int prime = 31;
 		int result = 1;
 		result = prime
 				* result
 				+ ((this. == null) ? 0 : this.
 		result = prime * result
 				+ ((this. == null) ? 0 : this..hashCode());
 		return result;

determines equality based on the class, documentTypeId and categoryName

 	public boolean equals(Object obj) {
 		if (this == obj)
 			return true;
 		if (obj == null)
 			return false;
 		if (getClass() != obj.getClass())
 			return false;
 		if (this. == null) {
 			if (other.documentTypeId != null)
 				return false;
 		} else if (!this..equals(other.documentTypeId))
 			return false;
 		if (this. == null) {
 			if (other.categoryName != null)
 				return false;
 		} else if (!this..equals(other.categoryName))
 			return false;
		return true;
New to GrepCode? Check out our FAQ X