| <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>Contact.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">jUDDI Core Services</a> > <a href="index.source.html" class="el_package">org.apache.juddi.model</a> > <span class="el_source">Contact.java</span></div><h1>Contact.java</h1><pre class="source lang-java linenums">package org.apache.juddi.model; |
| /* |
| * Copyright 2001-2008 The Apache Software Foundation. |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| import java.util.ArrayList; |
| import java.util.List; |
| |
| import javax.persistence.CascadeType; |
| import javax.persistence.Column; |
| import javax.persistence.Entity; |
| import javax.persistence.FetchType; |
| import javax.persistence.GeneratedValue; |
| import javax.persistence.GenerationType; |
| import javax.persistence.Id; |
| import javax.persistence.JoinColumn; |
| import javax.persistence.ManyToOne; |
| import javax.persistence.OneToMany; |
| import javax.persistence.OneToOne; |
| import javax.persistence.OrderBy; |
| import javax.persistence.Table; |
| |
| /** |
| * @author <a href="mailto:kurt@apache.org">Kurt T Stam</a> |
| * @author <a href="mailto:jfaath@apache.org">Jeff Faath</a> |
| */ |
| @Entity |
| @Table(name = "j3_contact") |
| public class Contact implements java.io.Serializable { |
| |
| private static final long serialVersionUID = 3350341195850056589L; |
| private Long id; |
| private BusinessEntity businessEntity; |
| private ReplicationConfiguration replicationConfigSerial; |
| private String useType; |
| <span class="pc" id="L48"> private List<PersonName> personNames = new ArrayList<PersonName>(0);</span> |
| <span class="pc" id="L49"> private List<ContactDescr> contactDescrs = new ArrayList<ContactDescr>(0);</span> |
| <span class="pc" id="L50"> private List<Email> emails = new ArrayList<Email>(0);</span> |
| <span class="pc" id="L51"> private List<Phone> phones = new ArrayList<Phone>(0);</span> |
| <span class="pc" id="L52"> private List<Address> addresses = new ArrayList<Address>(0);</span> |
| |
| <span class="fc" id="L54"> public Contact() {</span> |
| <span class="fc" id="L55"> }</span> |
| |
| <span class="fc" id="L57"> public Contact(BusinessEntity businessEntity) {</span> |
| <span class="fc" id="L58"> this.businessEntity = businessEntity;</span> |
| <span class="fc" id="L59"> }</span> |
| public Contact(BusinessEntity businessEntity, String useType, |
| List<PersonName> personNames, List<ContactDescr> contactDescrs, |
| <span class="nc" id="L62"> List<Email> emails, List<Phone> phones, List<Address> addresses) {</span> |
| <span class="nc" id="L63"> this.businessEntity = businessEntity;</span> |
| <span class="nc" id="L64"> this.useType = useType;</span> |
| <span class="nc" id="L65"> this.personNames = personNames;</span> |
| <span class="nc" id="L66"> this.contactDescrs = contactDescrs;</span> |
| <span class="nc" id="L67"> this.emails = emails;</span> |
| <span class="nc" id="L68"> this.phones = phones;</span> |
| <span class="nc" id="L69"> this.addresses = addresses;</span> |
| <span class="nc" id="L70"> }</span> |
| |
| @OneToOne(fetch = FetchType.LAZY) |
| @JoinColumn(name = "replicationCfgId", nullable = true) |
| public ReplicationConfiguration getReplicationConfigId() { |
| <span class="fc" id="L75"> return this.replicationConfigSerial;</span> |
| } |
| public void setReplicationConfigId(ReplicationConfiguration id) { |
| <span class="fc" id="L78"> this.replicationConfigSerial = id;</span> |
| <span class="fc" id="L79"> }</span> |
| |
| @Id |
| @GeneratedValue(strategy=GenerationType.AUTO) |
| public Long getId() { |
| <span class="fc" id="L84"> return this.id;</span> |
| } |
| public void setId(Long id) { |
| <span class="fc" id="L87"> this.id = id;</span> |
| <span class="fc" id="L88"> }</span> |
| |
| @ManyToOne(fetch = FetchType.LAZY) |
| @JoinColumn(name = "entity_key", nullable = true) |
| public BusinessEntity getBusinessEntity() { |
| <span class="fc" id="L93"> return this.businessEntity;</span> |
| } |
| public void setBusinessEntity(BusinessEntity businessEntity) { |
| <span class="fc" id="L96"> this.businessEntity = businessEntity;</span> |
| <span class="fc" id="L97"> }</span> |
| |
| @Column(name = "use_type") |
| public String getUseType() { |
| <span class="fc" id="L101"> return this.useType;</span> |
| } |
| public void setUseType(String useType) { |
| <span class="fc" id="L104"> this.useType = useType;</span> |
| <span class="fc" id="L105"> }</span> |
| |
| @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "contact") |
| @OrderBy |
| public List<PersonName> getPersonNames() { |
| <span class="fc" id="L110"> return this.personNames;</span> |
| } |
| public void setPersonNames(List<PersonName> personNames) { |
| <span class="fc" id="L113"> this.personNames = personNames;</span> |
| <span class="fc" id="L114"> }</span> |
| |
| @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "contact") |
| @OrderBy |
| public List<ContactDescr> getContactDescrs() { |
| <span class="fc" id="L119"> return this.contactDescrs;</span> |
| } |
| public void setContactDescrs(List<ContactDescr> contactDescrs) { |
| <span class="fc" id="L122"> this.contactDescrs = contactDescrs;</span> |
| <span class="fc" id="L123"> }</span> |
| |
| @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "contact") |
| @OrderBy |
| public List<Email> getEmails() { |
| <span class="fc" id="L128"> return this.emails;</span> |
| } |
| public void setEmails(List<Email> emails) { |
| <span class="fc" id="L131"> this.emails = emails;</span> |
| <span class="fc" id="L132"> }</span> |
| |
| @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "contact") |
| @OrderBy |
| public List<Phone> getPhones() { |
| <span class="fc" id="L137"> return this.phones;</span> |
| } |
| public void setPhones(List<Phone> phones) { |
| <span class="fc" id="L140"> this.phones = phones;</span> |
| <span class="fc" id="L141"> }</span> |
| |
| @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "contact") |
| @OrderBy |
| public List<Address> getAddresses() { |
| <span class="fc" id="L146"> return this.addresses;</span> |
| } |
| public void setAddresses(List<Address> addresses) { |
| <span class="fc" id="L149"> this.addresses = addresses;</span> |
| <span class="fc" id="L150"> }</span> |
| |
| } |
| </pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.7.9.201702052155</span></div></body></html> |