View Javadoc

1   /*
2    * Copyright 2007-2008 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.kew.removereplace;
17  
18  import javax.persistence.CascadeType;
19  import javax.persistence.Column;
20  import javax.persistence.Entity;
21  import javax.persistence.FetchType;
22  import javax.persistence.Id;
23  import javax.persistence.IdClass;
24  import javax.persistence.JoinColumn;
25  import javax.persistence.ManyToOne;
26  import javax.persistence.Table;
27  
28  /**
29   * This is a description of what this class does - ewestfal don't forget to fill this in.
30   *
31   * @author Kuali Rice Team (rice.collab@kuali.org)
32   *
33   */
34  @IdClass(org.kuali.rice.kew.removereplace.RuleTargetId.class)
35  @Entity
36  @Table(name="KREW_RMV_RPLC_RULE_T")
37  public class RuleTarget {
38  
39      @Id
40  	@Column(name="DOC_HDR_ID")
41  	private Long documentId;
42      @Id
43  	@Column(name="RULE_ID")
44  	private Long ruleId;
45      
46      // Added for JPA uni-directional one-to-many (not yet supported by JPA)
47      @ManyToOne(fetch=FetchType.EAGER, cascade={CascadeType.PERSIST, CascadeType.REMOVE})
48      @JoinColumn(name="DOC_HDR_ID")
49      private RemoveReplaceDocument removeReplaceDocument;
50  
51      public Long getDocumentId() {
52          return this.documentId;
53      }
54  
55      public void setDocumentId(Long documentId) {
56          this.documentId = documentId;
57      }
58  
59      public Long getRuleId() {
60          return this.ruleId;
61      }
62  
63      public void setRuleId(Long id) {
64          this.ruleId = id;
65      }
66  
67  }
68