View Javadoc
1   /**
2    * Copyright 2005-2014 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.krad.test.document.bo;
17  
18  import org.kuali.rice.krad.bo.DataObjectBase;
19  import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator;
20  
21  import javax.persistence.CascadeType;
22  import javax.persistence.Column;
23  import javax.persistence.Entity;
24  import javax.persistence.FetchType;
25  import javax.persistence.GeneratedValue;
26  import javax.persistence.Id;
27  import javax.persistence.JoinColumn;
28  import javax.persistence.ManyToOne;
29  import javax.persistence.Table;
30  import javax.persistence.Transient;
31  
32  /**
33   * Duplicate of {@link Account} which overrides {@link #getExtension()} to avoid
34   * automatic extension creation
35   */
36  @Entity
37  @Table(name="TRV_ACCT")
38  public class SimpleAccount extends DataObjectBase {
39  
40      @Id
41      @GeneratedValue(generator="TRVL_ID_SEQ")
42      @PortableSequenceGenerator(name="TRVL_ID_SEQ")
43      @Column(name="ACCT_NUM")
44      private String number;
45  
46      @Column(name="ACCT_NAME")
47      private String name;
48  
49      @Column(name="ACCT_FO_ID")
50      private Long amId;
51  
52      @Transient
53      private Object extension;
54  
55      public String getName() {
56          return name;
57      }
58  
59      public void setName(String name) {
60          this.name = name;
61      }
62  
63      public String getNumber() {
64          return number;
65      }
66  
67      public void setNumber(String number) {
68          this.number = number;
69      }
70  
71      public Long getAmId() {
72          return this.amId;
73      }
74  
75      public void setAmId(Long id) {
76          System.err.println("Setting AmId from " + this.amId + " to " + id);
77          this.amId = id;
78      }
79  
80      public Object getExtension() {
81          return extension;
82      }
83  
84      public void setExtension(Object extension) {
85          this.extension = extension;
86      }
87  }