001    /*
002     * Copyright 2007-2008 The Kuali Foundation
003     *
004     * Licensed under the Educational Community License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     *
008     * http://www.opensource.org/licenses/ecl2.php
009     *
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */
016    package org.kuali.rice.kim.bo.group.dto;
017    
018    import java.io.Serializable;
019    
020    import javax.xml.bind.annotation.XmlAccessType;
021    import javax.xml.bind.annotation.XmlAccessorType;
022    import javax.xml.bind.annotation.XmlRootElement;
023    import javax.xml.bind.annotation.XmlType;
024    import javax.xml.bind.annotation.XmlElement;
025    
026    import org.apache.commons.lang.builder.EqualsBuilder;
027    import org.apache.commons.lang.builder.HashCodeBuilder;
028    import org.kuali.rice.kim.bo.Group;
029    import org.kuali.rice.kim.bo.types.dto.AttributeSet;
030    
031    
032    /**
033     * This is a description of what this class does - sgibson don't forget to fill this in. 
034     * 
035     * @author Kuali Rice Team (rice.collab@kuali.org)
036     *
037     */
038    
039    @XmlRootElement(name = "group", namespace = "http://rice.kuali.org/xsd/kim/group")
040    @XmlAccessorType(XmlAccessType.FIELD)
041    @XmlType(name = "Group", namespace = "http://rice.kuali.org/xsd/kim/group", propOrder = {
042        "groupId", "groupName", "groupDescription", "active", "kimTypeId", "namespaceCode", "attributes"
043    })
044    
045    public class GroupInfo implements Group, Serializable {
046            
047            private static final long serialVersionUID = 1L;
048    
049            @XmlElement(name = "groupId", namespace = "http://rice.kuali.org/xsd/kim/group")        
050            protected String groupId;
051    
052            @XmlElement(name = "groupName", namespace = "http://rice.kuali.org/xsd/kim/group")      
053            protected String groupName;
054    
055            @XmlElement(name = "groupDescription", namespace = "http://rice.kuali.org/xsd/kim/group")       
056            protected String groupDescription;
057    
058            @XmlElement(name = "active", namespace = "http://rice.kuali.org/xsd/kim/group") 
059            protected boolean active;
060    
061            @XmlElement(name = "kimTypeId", namespace = "http://rice.kuali.org/xsd/kim/group")      
062            protected String kimTypeId;
063    
064            @XmlElement(name = "namespaceCode", namespace = "http://rice.kuali.org/xsd/kim/group")  
065            protected String namespaceCode;
066    
067            @XmlElement(name = "attributes", namespace = "http://rice.kuali.org/xsd/kim/group")     
068            protected AttributeSet attributes;
069            
070            
071            public String getGroupDescription() {
072                    return this.groupDescription;
073            }
074    
075            public String getGroupId() {
076                    return this.groupId;
077            }
078    
079            public String getGroupName() {
080                    return this.groupName;
081            }
082    
083            public String getKimTypeId() {
084                    return this.kimTypeId;
085            }
086    
087            public String getNamespaceCode() {
088                    return this.namespaceCode;
089            }
090    
091            public AttributeSet getAttributes() {
092                    return this.attributes;
093            }
094            
095            public void setGroupDescription(String groupDescription) {
096                    this.groupDescription = groupDescription;
097            }
098    
099            public void setGroupId(String groupId) {
100                    this.groupId = groupId;
101            }
102    
103            public void setGroupName(String groupName) {
104                    this.groupName = groupName;
105            }
106    
107            public void setKimTypeId(String kimTypeId) {
108                    this.kimTypeId = kimTypeId;
109            }
110    
111            public void setNamespaceCode(String namespaceCode) {
112                    this.namespaceCode = namespaceCode;
113            }
114    
115            public void setAttributes(AttributeSet attributes) {
116                    this.attributes = attributes;
117            }
118            
119            public boolean isActive() {
120                    return this.active;
121            }
122    
123            public void setActive(boolean active) {
124                    this.active = active;
125            }
126    
127        public void refresh(){
128            
129        }
130        
131        public void prepareForWorkflow(){
132            
133        }
134    
135            public boolean equals(Object object) {
136                    if (object == null) { return false; }
137                    if (object == this) { return true; }
138                    if (object.getClass() != getClass()) {
139                            return false;
140                    }
141                    GroupInfo rhs = (GroupInfo)object;
142                    EqualsBuilder eb = new EqualsBuilder()
143                            .append( this.groupId, rhs.getGroupId() );
144                    return eb.isEquals();
145            }
146    
147            public int hashCode() {
148                    return new HashCodeBuilder( -462347871, 744315189 )
149                            .append( this.groupId )
150                            .toHashCode();
151            }
152        
153    }