001 /*
002 * Copyright 2007-2009 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.entity.impl;
017
018 import org.hibernate.annotations.GenericGenerator;
019 import org.hibernate.annotations.Parameter;
020 import org.kuali.rice.kim.bo.entity.KimEntityResidency;
021
022 import javax.persistence.*;
023
024 /**
025 * This class is used to store residency information about an entity.
026 *
027 * @author Kuali Rice Team (kuali-rice@googlegroups.com)
028 *
029 */
030 @Entity
031 @Table(name = "KRIM_ENTITY_RESIDENCY_T")
032 public class KimEntityResidencyImpl extends KimEntityDataBase implements KimEntityResidency {
033
034 private static final long serialVersionUID = 6577601907062646925L;
035
036 @Id
037 @GeneratedValue(generator="KRIM_ENTITY_RESIDENCY_ID_S")
038 @GenericGenerator(name="KRIM_ENTITY_RESIDENCY_ID_S",strategy="org.kuali.rice.core.jpa.spring.RiceNumericStringSequenceStyleGenerator",parameters={
039 @Parameter(name="sequence_name",value="KRIM_ENTITY_RESIDENCY_ID_S"),
040 @Parameter(name="value_column",value="id")
041 })
042 @Column(name = "ID")
043 private String id;
044
045 @Column(name = "ENTITY_ID")
046 private String entityId;
047
048 @Column(name = "DETERMINATION_METHOD")
049 private String determinationMethod;
050
051 @Column(name = "IN_STATE")
052 private String inStateFlag;
053
054 /**
055 * @param inStateFlag the inStateFlag to set
056 */
057 public void setInStateFlag(String inStateFlag) {
058 this.inStateFlag = inStateFlag;
059 }
060
061 /**
062 * @param id the id to set
063 */
064 public void setId(String id) {
065 this.id = id;
066 }
067
068 /**
069 * @param entityId the entityId to set
070 */
071 public void setEntityId(String entityId) {
072 this.entityId = entityId;
073 }
074
075 /**
076 * @param determinationMethod the determinationMethod to set
077 */
078 public void setDeterminationMethod(String determinationMethod) {
079 this.determinationMethod = determinationMethod;
080 }
081
082 /**
083 * @see org.kuali.rice.kim.bo.entity.KimEntityResidency#getDeterminationMethod()
084 */
085 public String getDeterminationMethod() {
086 return determinationMethod;
087 }
088
089 /**
090 * @see org.kuali.rice.kim.bo.entity.KimEntityResidency#getEntityId()
091 */
092 public String getEntityId() {
093 return entityId;
094 }
095
096 /**
097 * @see org.kuali.rice.kim.bo.entity.KimEntityResidency#getId()
098 */
099 public String getId() {
100 return id;
101 }
102
103 /**
104 * @see org.kuali.rice.kim.bo.entity.KimEntityResidency#getInState()
105 */
106 public String getInState() {
107 return inStateFlag;
108 }
109 }