View Javadoc
1   package fr.ifremer.reefdb.dto.configuration.control;
2   
3   /*-
4    * #%L
5    * Reef DB :: Core
6    * $Id:$
7    * $HeadURL:$
8    * %%
9    * Copyright (C) 2014 - 2022 Ifremer
10   * %%
11   * This program is free software: you can redistribute it and/or modify
12   * it under the terms of the GNU Affero General Public License as published by
13   * the Free Software Foundation, either version 3 of the License, or
14   * (at your option) any later version.
15   * 
16   * This program is distributed in the hope that it will be useful,
17   * but WITHOUT ANY WARRANTY; without even the implied warranty of
18   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19   * GNU General Public License for more details.
20   * 
21   * You should have received a copy of the GNU Affero General Public License
22   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
23   * #L%
24   */
25  
26  import fr.ifremer.quadrige3.ui.core.dto.referential.BaseReferentialDTOBean;
27  import javax.annotation.Generated;
28  
29  @Generated(value = "org.nuiton.eugene.java.SimpleJavaBeanTransformer", date = "Mon May 09 09:01:00 CEST 2022")
30  public abstract class AbstractPreconditionRuleDTOBean extends BaseReferentialDTOBean implements PreconditionRuleDTO {
31  
32      private static final long serialVersionUID = 3762022342305789541L;
33  
34      protected boolean active;
35  
36      protected boolean bidirectional;
37  
38      protected ControlRuleDTO rule;
39  
40      protected ControlRuleDTO baseRule;
41  
42      protected ControlRuleDTO usedRule;
43  
44      @Override
45      public boolean isActive() {
46          return active;
47      }
48  
49      @Override
50      public void setActive(boolean active) {
51          boolean oldValue = isActive();
52          this.active = active;
53          firePropertyChange(PROPERTY_ACTIVE, oldValue, active);
54      }
55  
56      @Override
57      public boolean isBidirectional() {
58          return bidirectional;
59      }
60  
61      @Override
62      public void setBidirectional(boolean bidirectional) {
63          boolean oldValue = isBidirectional();
64          this.bidirectional = bidirectional;
65          firePropertyChange(PROPERTY_BIDIRECTIONAL, oldValue, bidirectional);
66      }
67  
68      @Override
69      public ControlRuleDTO getRule() {
70          return rule;
71      }
72  
73      @Override
74      public void setRule(ControlRuleDTO rule) {
75          ControlRuleDTO oldValue = getRule();
76          this.rule = rule;
77          firePropertyChange(PROPERTY_RULE, oldValue, rule);
78      }
79  
80      @Override
81      public ControlRuleDTO getBaseRule() {
82          return baseRule;
83      }
84  
85      @Override
86      public void setBaseRule(ControlRuleDTO baseRule) {
87          ControlRuleDTO oldValue = getBaseRule();
88          this.baseRule = baseRule;
89          firePropertyChange(PROPERTY_BASE_RULE, oldValue, baseRule);
90      }
91  
92      @Override
93      public ControlRuleDTO getUsedRule() {
94          return usedRule;
95      }
96  
97      @Override
98      public void setUsedRule(ControlRuleDTO usedRule) {
99          ControlRuleDTO oldValue = getUsedRule();
100         this.usedRule = usedRule;
101         firePropertyChange(PROPERTY_USED_RULE, oldValue, usedRule);
102     }
103 
104 } //AbstractPreconditionRuleDTOBean