001/* 002 * Copyright 2006-2014 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.krad.test.document.bo; 017 018import org.kuali.rice.krad.bo.DataObjectBase; 019import org.kuali.rice.krad.bo.PersistableBusinessObjectBase; 020import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator; 021 022import javax.persistence.CascadeType; 023import javax.persistence.Column; 024import javax.persistence.Entity; 025import javax.persistence.FetchType; 026import javax.persistence.GeneratedValue; 027import javax.persistence.Id; 028import javax.persistence.JoinColumn; 029import javax.persistence.ManyToOne; 030import javax.persistence.Table; 031 032@Entity 033@Table(name = "TRV_ACCT") 034public class AccountNonUpdatableFK extends DataObjectBase { 035 private static final long serialVersionUID = 1L; 036 037 @Id 038 @GeneratedValue(generator = "KRTST_GENERATED_PK_S") 039 @PortableSequenceGenerator(name = "KRTST_GENERATED_PK_S") 040 @Column(name="acct_num") 041 private String number; 042 043 @Column(name="acct_name") 044 private String name; 045 046 @Column(name="acct_fo_id", insertable = false, updatable = false) 047 private Long accountManagerId; 048 049 @ManyToOne(cascade = CascadeType.ALL) 050 @JoinColumn(name="acct_fo_id") 051 private AccountManagerGeneratedPK accountManager; 052 053 public String getNumber() { 054 return number; 055 } 056 057 public void setNumber(String number) { 058 this.number = number; 059 } 060 061 public String getName() { 062 return name; 063 } 064 065 public void setName(String name) { 066 this.name = name; 067 } 068 069 public Long getAccountManagerId() { 070 return accountManagerId; 071 } 072 073 public void setAccountManagerId(Long accountManagerId) { 074 this.accountManagerId = accountManagerId; 075 } 076 077 public AccountManagerGeneratedPK getAccountManager() { 078 return accountManager; 079 } 080 081 public void setAccountManager(AccountManagerGeneratedPK accountManager) { 082 this.accountManager = accountManager; 083 } 084 085}