1   /**
2    * Logback: the reliable, generic, fast and flexible logging framework.
3    * Copyright (C) 1999-2022, QOS.ch. All rights reserved.
4    *
5    * This program and the accompanying materials are dual-licensed under
6    * either the terms of the Eclipse Public License v1.0 as published by
7    * the Eclipse Foundation
8    *
9    *   or (per the licensee's choosing)
10   *
11   * under the terms of the GNU Lesser General Public License version 2.1
12   * as published by the Free Software Foundation.
13   */
14  package ch.qos.logback.access.common.model;
15  
16  import java.util.Objects;
17  
18  import ch.qos.logback.core.model.Model;
19  
20  public class ConfigurationModel extends Model {
21      
22      private static final long serialVersionUID = 5447825021342728679L;
23  
24      public static final String INTERNAL_DEBUG_ATTR = "debug";
25  
26      String debug;
27  
28      @Override
29      protected ConfigurationModel makeNewInstance() {
30          return new ConfigurationModel();
31      }
32      
33      @Override
34      protected void mirror(Model that) {
35          ConfigurationModel actual = (ConfigurationModel) that;
36          super.mirror(actual);
37          this.debug = actual.debug;
38      }
39      
40      
41      public String getDebug() {
42          return debug;
43      }
44  
45      public void setDebug(String debug) {
46          this.debug = debug;
47      }
48  
49      @Override
50      public int hashCode() {
51          final int prime = 31;
52          int result = super.hashCode();
53          result = prime * result + Objects.hash(debug);
54          return result;
55      }
56  
57      @Override
58      public boolean equals(Object obj) {
59          if (this == obj)
60              return true;
61          if (!super.equals(obj))
62              return false;
63          if (getClass() != obj.getClass())
64              return false;
65          ConfigurationModel other = (ConfigurationModel) obj;
66          return Objects.equals(debug, other.debug);
67      }
68  
69  }