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.data.jpa.PortableSequenceGenerator; 020 021import javax.persistence.CascadeType; 022import javax.persistence.Column; 023import javax.persistence.Entity; 024import javax.persistence.GeneratedValue; 025import javax.persistence.Id; 026import javax.persistence.OneToMany; 027import javax.persistence.Table; 028import java.util.List; 029 030/** 031 * FiscalOfficer 032 */ 033@Entity 034@Table(name = "TRV_ACCT_FO") 035public class AccountManagerGeneratedPK extends DataObjectBase { 036 private static final long serialVersionUID = 1555425302284842267L; 037 038 @Id 039 @GeneratedValue(generator = "TRV_FO_ID_S") 040 @PortableSequenceGenerator(name = "TRV_FO_ID_S") 041 @Column(name = "ACCT_FO_ID") 042 private Long id; 043 044 @Column(name="ACCT_FO_USER_NAME") 045 private String userName; 046 047 @OneToMany(cascade = CascadeType.ALL, mappedBy = "accountManager") 048 private List<AccountNonUpdatableFK> accounts; 049 050 public Long getId() { 051 return id; 052 } 053 054 public void setId(Long id) { 055 this.id = id; 056 } 057 058 public String getUserName() { 059 return userName; 060 } 061 062 public void setUserName(String userName) { 063 this.userName = userName; 064 } 065 066 public List<AccountNonUpdatableFK> getAccounts() { 067 return accounts; 068 } 069 070 public void setAccounts(List<AccountNonUpdatableFK> accounts) { 071 this.accounts = accounts; 072 } 073}