View Javadoc

1   /*
2    * Copyright 2004 Carlos Sanchez.
3    * 
4    * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0
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 net.sf.oness.party.model.contact.bo;
17  
18  import java.util.Collection;
19  
20  import net.sf.oness.common.model.bo.AbstractBusinessObject;
21  import net.sf.oness.party.model.party.bo.Party;
22  
23  /***
24   * Contact information
25   * 
26   * @hibernate.class table="contactinfo"
27   * @hibernate.discriminator column="type"
28   * 
29   * @author Carlos Sanchez
30   * @version $Revision: 1.4 $
31   */
32  public abstract class ContactInfo extends AbstractBusinessObject {
33  
34      private Collection purposes;
35  
36      private Party party;
37      
38      public void setPurposes(Collection purposes) {
39          this.purposes = purposes;
40      }
41  
42      /***
43       * @hibernate.bag
44       * @hibernate.collection-key column="parentId"
45       * @hibernate.collection-element column="purpose" type="java.lang.String"
46       * 
47       * @return <code>Collection</code> of <code>String</code> objects
48       */
49      public Collection getPurposes() {
50          return purposes;
51      }
52  
53      /***
54       * @param party
55       *            The party to set.
56       */
57      public void setParty(Party party) {
58          this.party = party;
59      }
60  
61      /***
62       * @hibernate.many-to-one not-null="true"
63       * 
64       * @return Returns the party.
65       */
66      public Party getParty() {
67          return party;
68      }
69  
70  }