| <?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>ReplicationConfiguration.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">ReplicationConfiguration.java</span></div><h1>ReplicationConfiguration.java</h1><pre class="source lang-java linenums">/* |
| * 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. |
| * |
| */ |
| package org.apache.juddi.model; |
| |
| import java.io.Serializable; |
| import java.math.BigInteger; |
| 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.Id; |
| import javax.persistence.OneToMany; |
| import javax.persistence.OneToOne; |
| import javax.persistence.OrderBy; |
| import javax.persistence.Table; |
| |
| @Entity |
| @Table(name = "j3_chg_replconf") |
| <span class="fc" id="L35">public class ReplicationConfiguration implements Serializable {</span> |
| |
| private static final long serialVersionUID = 1L; |
| |
| private Long serialNumber; |
| private String timeOfConfigurationUpdate; |
| <span class="fc" id="L41"> private List<Operator> operator = new ArrayList<Operator>(0);</span> |
| private BigInteger maximumTimeToSyncRegistry; |
| private BigInteger maximumTimeToGetChanges; |
| <span class="fc" id="L44"> private List<Signature> signatures = new ArrayList<Signature>(0);</span> |
| private Contact contact; |
| private List<ReplicationConfigurationNode> node; |
| private List<ControlMessage> controlledMessage; |
| private List<Edge> edge; |
| |
| /** |
| * Gets the value of the contact property. |
| * |
| * @return possible object is {@link Contact } |
| * |
| */ |
| @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "replicationConfigId") |
| //@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, targetEntity = Contact.class, mappedBy = "serialNumber") |
| public Contact getContact() { |
| <span class="fc" id="L59"> return contact;</span> |
| } |
| |
| /** |
| * Sets the value of the contact property. |
| * |
| * @param value allowed object is {@link Contact } |
| * |
| */ |
| public void setContact(Contact value) { |
| <span class="fc" id="L69"> this.contact = value;</span> |
| <span class="fc" id="L70"> }</span> |
| |
| /** |
| * Gets the value of the serialNumber property. |
| * |
| */ |
| @Column(name = "serno") |
| @OrderBy(value = "SerialNumber DESC") |
| @Id |
| public Long getSerialNumber() { |
| <span class="fc" id="L80"> return serialNumber;</span> |
| } |
| |
| /** |
| * Sets the value of the serialNumber property. |
| * |
| */ |
| public void setSerialNumber(Long value) { |
| <span class="fc" id="L88"> this.serialNumber = value;</span> |
| <span class="fc" id="L89"> }</span> |
| |
| /** |
| * Gets the value of the timeOfConfigurationUpdate property. |
| * |
| * @return possible object is {@link String } |
| * |
| */ |
| @Column(name = "configupdate") |
| public String getTimeOfConfigurationUpdate() { |
| <span class="fc" id="L99"> return timeOfConfigurationUpdate;</span> |
| } |
| |
| /** |
| * Sets the value of the timeOfConfigurationUpdate property. |
| * |
| * @param value allowed object is {@link String } |
| * |
| */ |
| public void setTimeOfConfigurationUpdate(String value) { |
| <span class="fc" id="L109"> this.timeOfConfigurationUpdate = value;</span> |
| <span class="fc" id="L110"> }</span> |
| |
| @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, targetEntity = Operator.class) |
| public List<Operator> getOperator() { |
| <span class="pc bpc" id="L114" title="1 of 2 branches missed."> if (operator == null) {</span> |
| <span class="nc" id="L115"> operator = new ArrayList<Operator>();</span> |
| } |
| <span class="fc" id="L117"> return this.operator;</span> |
| } |
| |
| public void setOperator(List<Operator> v) { |
| |
| <span class="fc" id="L122"> this.operator = v;</span> |
| <span class="fc" id="L123"> }</span> |
| |
| /** |
| * Gets the value of the maximumTimeToSyncRegistry property. |
| * |
| * @return possible object is {@link BigInteger } |
| * |
| */ |
| @Column(name = "maxsynctime") |
| public BigInteger getMaximumTimeToSyncRegistry() { |
| <span class="fc" id="L133"> return maximumTimeToSyncRegistry;</span> |
| } |
| |
| /** |
| * Sets the value of the maximumTimeToSyncRegistry property. |
| * |
| * @param value allowed object is {@link BigInteger } |
| * |
| */ |
| public void setMaximumTimeToSyncRegistry(BigInteger value) { |
| <span class="fc" id="L143"> this.maximumTimeToSyncRegistry = value;</span> |
| <span class="fc" id="L144"> }</span> |
| |
| /** |
| * Gets the value of the maximumTimeToGetChanges property. |
| * |
| * @return possible object is {@link BigInteger } |
| * |
| */ |
| @Column(name = "maxgettime") |
| public BigInteger getMaximumTimeToGetChanges() { |
| <span class="fc" id="L154"> return maximumTimeToGetChanges;</span> |
| } |
| |
| /** |
| * Sets the value of the maximumTimeToGetChanges property. |
| * |
| * @param value allowed object is {@link BigInteger } |
| * |
| */ |
| public void setMaximumTimeToGetChanges(BigInteger value) { |
| <span class="fc" id="L164"> this.maximumTimeToGetChanges = value;</span> |
| <span class="fc" id="L165"> }</span> |
| |
| @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "replicationConfiguration") |
| @OrderBy |
| public List<Signature> getSignatures() { |
| <span class="fc" id="L170"> return signatures;</span> |
| } |
| |
| public void setSignatures(List<Signature> signatures) { |
| <span class="fc" id="L174"> this.signatures = signatures;</span> |
| <span class="fc" id="L175"> }</span> |
| |
| //To use a Node or a String reference... |
| //Node will give us strict ref integ but makes a change history of the replication config impossible |
| //Strig increases code logic for ref integ,but makes chage history possible |
| @OneToMany(targetEntity = ReplicationConfigurationNode.class, fetch = FetchType.LAZY, cascade = CascadeType.ALL) |
| // @OneToMany(cascade = {CascadeType.ALL}) |
| public List<ReplicationConfigurationNode> getNode() { |
| <span class="fc bfc" id="L183" title="All 2 branches covered."> if (node == null) {</span> |
| <span class="fc" id="L184"> node = new ArrayList<ReplicationConfigurationNode>();</span> |
| } |
| <span class="fc" id="L186"> return this.node;</span> |
| } |
| |
| public void setNode(List<ReplicationConfigurationNode> nodes) { |
| |
| <span class="fc" id="L191"> this.node = nodes;</span> |
| <span class="fc" id="L192"> }</span> |
| |
| //@javax.persistence.Transient |
| @OneToMany(targetEntity = ControlMessage.class, fetch = FetchType.LAZY, cascade = CascadeType.ALL) |
| public List<ControlMessage> getControlMessage() { |
| <span class="pc bpc" id="L197" title="1 of 2 branches missed."> if (controlledMessage == null) {</span> |
| <span class="nc" id="L198"> controlledMessage = new ArrayList<ControlMessage>();</span> |
| } |
| <span class="fc" id="L200"> return this.controlledMessage;</span> |
| } |
| |
| public void setControlMessage(List<ControlMessage> controlledMessages) { |
| |
| <span class="fc" id="L205"> this.controlledMessage = controlledMessages;</span> |
| <span class="fc" id="L206"> }</span> |
| |
| // @OneToMany( fetch = FetchType.LAZY,targetEntity = Edge.class, mappedBy = "Edge") |
| @OneToMany(targetEntity = Edge.class, |
| fetch = FetchType.LAZY, cascade = CascadeType.ALL |
| //mappedBy = "j3_edge" |
| ) |
| public List<Edge> getEdge() { |
| <span class="fc" id="L214"> return this.edge;</span> |
| } |
| |
| public void setEdge(List<Edge> edges) { |
| <span class="fc" id="L218"> this.edge = edges;</span> |
| <span class="fc" id="L219"> }</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> |