001/**
002 * Copyright 2005-2016 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 */
016package org.kuali.rice.kim.impl.membership;
017
018import org.kuali.rice.core.api.membership.MemberType;
019import org.kuali.rice.kim.impl.common.active.ActiveFromToBo;
020
021import javax.persistence.Column;
022import javax.persistence.MappedSuperclass;
023
024@MappedSuperclass
025public abstract class AbstractMemberBo extends ActiveFromToBo {
026    private static final long serialVersionUID = 1L;
027    
028    @Column(name = "MBR_ID")
029    private String memberId;
030    @Column(name = "MBR_TYP_CD")
031    private String typeCode;
032
033    public String getMemberId() {
034        return this.memberId;
035    }
036
037    public void setMemberId(String memberId) {
038        this.memberId = memberId;
039    }
040
041    public void setTypeCode(String typeCode) {
042        this.typeCode = typeCode;
043    }
044
045    public void setType(MemberType type) {
046        typeCode = type.getCode();
047    }
048
049    public MemberType getType() {
050        return MemberType.fromCode(typeCode);
051    }
052
053
054}