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.workgroup;
A GroupId which identifies the name of a Workgroup.

Author(s):
Kuali Rice Team (rice.collab@kuali.org)
See also:
Workgroup
public final class GroupNameId implements GroupId {
	private static final long serialVersionUID = -4625193242111678434L;
	private String nameId;
    public GroupNameId(String nameId) {
        this. = nameId;
        this. = Utilities.parseGroupNamespaceCode(nameId);
        this. = Utilities.parseGroupName(nameId);
    }
    public GroupNameId(String namespaceString nameId) {
    	this. = namespace;
    	this. = nameId;
    }
    public String getNameId() {
        return ;
    }
    public String getNamespace() {
    	return ;
    }
    public boolean isEmpty() {
      return ( == null) || (.trim().length() == 0);
  }

    
If you make this class non-final, you must rewrite equals to work for subclasses.
    public boolean equals(Object obj) {
        boolean isEqual = false;
        if (obj != null && (obj instanceof GroupNameId)) {
            GroupNameId w = (GroupNameIdobj;
            if (w.getNameId() != null && getNameId() != null) {
                return w.getNameId().equals(getNameId()) && w.getNamespace().equals(getNamespace());
            } else {
                return false;
            }
        }
        return isEqual;
    }
    public int hashCode() {
        if ( == null) {
            return 0;
        }
        return .hashCode();
    }
    public String toString() {
        if ( != null) {
            return ;
        }
        return "null";
    }
New to GrepCode? Check out our FAQ X