001/*
002 * Logback: the reliable, generic, fast and flexible logging framework.
003 * Copyright (C) 1999-2026, QOS.ch. All rights reserved.
004 *
005 * This program and the accompanying materials are dual-licensed under
006 * either the terms of the Eclipse Public License v2.0 as published by
007 * the Eclipse Foundation
008 *
009 *   or (per the licensee's choosing)
010 *
011 * under the terms of the GNU Lesser General Public License version 2.1
012 * as published by the Free Software Foundation.
013 */
014
015package ch.qos.logback.classic.model;
016
017import java.util.Objects;
018
019import ch.qos.logback.core.model.Model;
020import ch.qos.logback.core.util.Duration;
021
022public class ConfigurationModel extends Model {
023
024    private static final long serialVersionUID = 1286156598561818515L;
025
026    String debugStr;
027    String scanStr;
028    String scanPeriodStr;
029    String packagingDataStr;
030    
031    @Override
032    protected ConfigurationModel makeNewInstance() {
033        return new ConfigurationModel();
034    }
035    
036    @Override protected void mirror(Model that) {
037        ConfigurationModel actual = (ConfigurationModel) that;
038        super.mirror(that);
039        this.debugStr = actual.debugStr;
040        this.scanStr = actual.scanStr;
041        this.scanPeriodStr = actual.scanPeriodStr;
042        this.packagingDataStr = actual.packagingDataStr;
043    }
044    
045    public String getDebugStr() {
046        return debugStr;
047    }
048
049    public void setDebugStr(String debugStr) {
050        this.debugStr = debugStr;
051    }
052
053    public String getScanStr() {
054        return scanStr;
055    }
056
057    public void setScanStr(String scanStr) {
058        this.scanStr = scanStr;
059    }
060
061    public String getScanPeriodStr() {
062        return scanPeriodStr;
063    }
064
065    public void setScanPeriodStr(String scanPeriodStr) {
066        this.scanPeriodStr = scanPeriodStr;
067    }
068
069    public String getPackagingDataStr() {
070        return packagingDataStr;
071    }
072
073    public void setPackagingDataStr(String packagingDataStr) {
074        this.packagingDataStr = packagingDataStr;
075    }
076    
077    @Override
078    public int hashCode() {
079        final int prime = 31;
080        int result = super.hashCode();
081        result = prime * result + Objects.hash(debugStr, packagingDataStr, scanPeriodStr, scanStr);
082        return result;
083    }
084
085    @Override
086    public boolean equals(Object obj) {
087        if (this == obj)
088            return true;
089        if (!super.equals(obj))
090            return false;
091        if (getClass() != obj.getClass())
092            return false;
093        ConfigurationModel other = (ConfigurationModel) obj;
094        return Objects.equals(debugStr, other.debugStr) && Objects.equals(packagingDataStr, other.packagingDataStr)
095                && Objects.equals(scanPeriodStr, other.scanPeriodStr) && Objects.equals(scanStr, other.scanStr);
096    }
097
098}