blob: 89a5f88386b01e0c459c96cae3db65e2b235b6ce [file] [log] [blame]
<?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> &gt; <a href="index.source.html" class="el_package">org.apache.juddi.model</a> &gt; <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 &quot;License&quot;);
* 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 &quot;AS IS&quot; 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 = &quot;j3_chg_replconf&quot;)
<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&lt;Operator&gt; operator = new ArrayList&lt;Operator&gt;(0);</span>
private BigInteger maximumTimeToSyncRegistry;
private BigInteger maximumTimeToGetChanges;
<span class="fc" id="L44"> private List&lt;Signature&gt; signatures = new ArrayList&lt;Signature&gt;(0);</span>
private Contact contact;
private List&lt;ReplicationConfigurationNode&gt; node;
private List&lt;ControlMessage&gt; controlledMessage;
private List&lt;Edge&gt; edge;
/**
* Gets the value of the contact property.
*
* @return possible object is {@link Contact }
*
*/
@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = &quot;replicationConfigId&quot;)
//@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, targetEntity = Contact.class, mappedBy = &quot;serialNumber&quot;)
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 = &quot;serno&quot;)
@OrderBy(value = &quot;SerialNumber DESC&quot;)
@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 = &quot;configupdate&quot;)
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&lt;Operator&gt; 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&lt;Operator&gt;();</span>
}
<span class="fc" id="L117"> return this.operator;</span>
}
public void setOperator(List&lt;Operator&gt; 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 = &quot;maxsynctime&quot;)
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 = &quot;maxgettime&quot;)
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 = &quot;replicationConfiguration&quot;)
@OrderBy
public List&lt;Signature&gt; getSignatures() {
<span class="fc" id="L170"> return signatures;</span>
}
public void setSignatures(List&lt;Signature&gt; 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&lt;ReplicationConfigurationNode&gt; getNode() {
<span class="fc bfc" id="L183" title="All 2 branches covered."> if (node == null) {</span>
<span class="fc" id="L184"> node = new ArrayList&lt;ReplicationConfigurationNode&gt;();</span>
}
<span class="fc" id="L186"> return this.node;</span>
}
public void setNode(List&lt;ReplicationConfigurationNode&gt; 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&lt;ControlMessage&gt; 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&lt;ControlMessage&gt;();</span>
}
<span class="fc" id="L200"> return this.controlledMessage;</span>
}
public void setControlMessage(List&lt;ControlMessage&gt; controlledMessages) {
<span class="fc" id="L205"> this.controlledMessage = controlledMessages;</span>
<span class="fc" id="L206"> }</span>
// @OneToMany( fetch = FetchType.LAZY,targetEntity = Edge.class, mappedBy = &quot;Edge&quot;)
@OneToMany(targetEntity = Edge.class,
fetch = FetchType.LAZY, cascade = CascadeType.ALL
//mappedBy = &quot;j3_edge&quot;
)
public List&lt;Edge&gt; getEdge() {
<span class="fc" id="L214"> return this.edge;</span>
}
public void setEdge(List&lt;Edge&gt; 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>