| <?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>Subscription.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">Subscription.java</span></div><h1>Subscription.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.Date; |
| 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.Lob; |
| import javax.persistence.OneToMany; |
| import javax.persistence.Table; |
| import javax.persistence.Temporal; |
| import javax.persistence.TemporalType; |
| |
| /** |
| * @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_subscription") |
| public class Subscription implements java.io.Serializable, Comparable<Subscription> { |
| |
| private static final long serialVersionUID = -2271361594186854662L; |
| private String subscriptionKey; |
| private String authorizedName; |
| private String subscriptionFilter; |
| private String bindingKey; |
| private String notificationInterval; |
| private Integer maxEntities; |
| private Date expiresAfter; |
| private Boolean brief; |
| private Date lastNotified; |
| private Date createDate; |
| <span class="pc" id="L52"> private List<SubscriptionMatch> subscriptionMatches = new ArrayList<SubscriptionMatch>(0);</span> |
| |
| <span class="fc" id="L54"> public Subscription() {</span> |
| <span class="fc" id="L55"> }</span> |
| |
| public Subscription(String subscriptionKey, String bindingKey, |
| <span class="nc" id="L58"> String notificationInterval) {</span> |
| <span class="nc" id="L59"> this.subscriptionKey = subscriptionKey;</span> |
| <span class="nc" id="L60"> this.bindingKey = bindingKey;</span> |
| <span class="nc" id="L61"> this.notificationInterval = notificationInterval;</span> |
| <span class="nc" id="L62"> }</span> |
| |
| @Id |
| @Column(name = "subscription_key", nullable = false, length = 255) |
| public String getSubscriptionKey() { |
| <span class="fc" id="L67"> return this.subscriptionKey;</span> |
| } |
| public void setSubscriptionKey(String subscriptionKey) { |
| <span class="fc" id="L70"> this.subscriptionKey = subscriptionKey;</span> |
| <span class="fc" id="L71"> }</span> |
| |
| @Column(name = "authorized_name", nullable = false, length = 255) |
| public String getAuthorizedName() { |
| <span class="fc" id="L75"> return authorizedName;</span> |
| } |
| public void setAuthorizedName(String authorizedName) { |
| <span class="fc" id="L78"> this.authorizedName = authorizedName;</span> |
| <span class="fc" id="L79"> }</span> |
| |
| @Lob |
| @Column(name = "subscription_filter", nullable = false, length = 65636) |
| public String getSubscriptionFilter() { |
| <span class="fc" id="L84"> return subscriptionFilter;</span> |
| } |
| public void setSubscriptionFilter(String subscriptionFilter) { |
| <span class="fc" id="L87"> this.subscriptionFilter = subscriptionFilter;</span> |
| <span class="fc" id="L88"> }</span> |
| |
| @Column(name = "binding_key", length = 255) |
| public String getBindingKey() { |
| <span class="fc" id="L92"> return this.bindingKey;</span> |
| } |
| public void setBindingKey(String bindingKey) { |
| <span class="fc" id="L95"> this.bindingKey = bindingKey;</span> |
| <span class="fc" id="L96"> }</span> |
| |
| @Column(name = "notification_interval") |
| public String getNotificationInterval() { |
| <span class="fc" id="L100"> return this.notificationInterval;</span> |
| } |
| public void setNotificationInterval(String notificationInterval) { |
| <span class="fc" id="L103"> this.notificationInterval = notificationInterval;</span> |
| <span class="fc" id="L104"> }</span> |
| |
| @Column(name = "max_entities") |
| public Integer getMaxEntities() { |
| <span class="fc" id="L108"> return maxEntities;</span> |
| } |
| public void setMaxEntities(Integer maxEntities) { |
| <span class="fc" id="L111"> this.maxEntities = maxEntities;</span> |
| <span class="fc" id="L112"> }</span> |
| |
| @Temporal(TemporalType.TIMESTAMP) |
| @Column(name = "expires_after", length = 29) |
| public Date getExpiresAfter() { |
| <span class="fc" id="L117"> return expiresAfter;</span> |
| } |
| public void setExpiresAfter(Date expiresAfter) { |
| <span class="fc" id="L120"> this.expiresAfter = expiresAfter;</span> |
| <span class="fc" id="L121"> }</span> |
| |
| @Column(name = "brief") |
| public Boolean isBrief() { |
| <span class="fc" id="L125"> return brief;</span> |
| } |
| public void setBrief(Boolean brief) { |
| <span class="fc" id="L128"> this.brief = brief;</span> |
| <span class="fc" id="L129"> }</span> |
| |
| @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "subscription") |
| public List<SubscriptionMatch> getSubscriptionMatches() { |
| <span class="fc" id="L133"> return subscriptionMatches;</span> |
| } |
| public void setSubscriptionMatches(List<SubscriptionMatch> subscriptionMatches) { |
| <span class="fc" id="L136"> this.subscriptionMatches = subscriptionMatches;</span> |
| <span class="fc" id="L137"> }</span> |
| |
| @Temporal(TemporalType.TIMESTAMP) |
| @Column(name = "last_notified", length = 29) |
| public Date getLastNotified() { |
| <span class="fc" id="L142"> return lastNotified;</span> |
| } |
| |
| public void setLastNotified(Date lastNotified) { |
| <span class="fc" id="L146"> this.lastNotified = lastNotified;</span> |
| <span class="fc" id="L147"> }</span> |
| |
| @Temporal(TemporalType.TIMESTAMP) |
| @Column(name = "create_date", length = 29, nullable = false) |
| public Date getCreateDate() { |
| <span class="fc" id="L152"> return createDate;</span> |
| } |
| |
| public void setCreateDate(Date createDate) { |
| <span class="fc" id="L156"> this.createDate = createDate;</span> |
| <span class="fc" id="L157"> }</span> |
| |
| public int compareTo(Subscription o) { |
| <span class="nc bnc" id="L160" title="All 4 branches missed."> if (o==null || o.getSubscriptionKey()==null) return 0;</span> |
| <span class="nc bnc" id="L161" title="All 2 branches missed."> if (o.getSubscriptionKey().equals(getSubscriptionKey())) return 1;</span> |
| <span class="nc" id="L162"> else return 0;</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> |