001// license-header java merge-point
002//
003// Attention: Generated code! Do not modify by hand!
004// Generated by: hibernate/HibernateEntity.vsl in andromda-hibernate-cartridge.
005//
006package fr.ifremer.adagio.core.dao.administration.programStrategy;
007
008/*
009 * #%L
010 * SIH-Adagio :: Core
011 * $Id:$
012 * $HeadURL:$
013 * %%
014 * Copyright (C) 2012 - 2014 Ifremer
015 * %%
016 * This program is free software: you can redistribute it and/or modify
017 * it under the terms of the GNU Affero General Public License as published by
018 * the Free Software Foundation, either version 3 of the License, or
019 * (at your option) any later version.
020 * 
021 * This program is distributed in the hope that it will be useful,
022 * but WITHOUT ANY WARRANTY; without even the implied warranty of
023 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
024 * GNU General Public License for more details.
025 * 
026 * You should have received a copy of the GNU Affero General Public License
027 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
028 * #L%
029 */
030
031import fr.ifremer.adagio.core.dao.data.batch.BatchModel;
032import java.io.Serializable;
033
034/**
035 * 
036 */
037// HibernateEntity.vsl annotations merge-point
038public abstract class BatchModelAppliedStrategy
039    implements Serializable, Comparable<BatchModelAppliedStrategy>
040{
041    /**
042     * The serial version UID of this class. Needed for serialization.
043     */
044    private static final long serialVersionUID = -24071804155122521L;
045
046    private BatchModelAppliedStrategyPK batchModelAppliedStrategyPk;
047
048    /**
049     * Get the composite primary key identifier class
050     * @return batchModelAppliedStrategyPk
051     */
052    public BatchModelAppliedStrategyPK getBatchModelAppliedStrategyPk()
053    {
054        return this.batchModelAppliedStrategyPk;
055    }
056
057    /**
058     * Set the composite primary key identifier class
059     * @param batchModelAppliedStrategyPkIn
060     */
061    public void setBatchModelAppliedStrategyPk(BatchModelAppliedStrategyPK batchModelAppliedStrategyPkIn) {
062        this.batchModelAppliedStrategyPk = batchModelAppliedStrategyPkIn;
063    }
064
065    // Generate 0 attributes
066    // Generate 3 associations
067    private BatchModel batchModel;
068
069    /**
070     * 
071     * @return this.batchModel BatchModel
072     */
073    public BatchModel getBatchModel()
074    {
075        return this.batchModel;
076    }
077
078    /**
079     * 
080     * @param batchModelIn BatchModel
081     */
082    public void setBatchModel(BatchModel batchModelIn)
083    {
084        this.batchModel = batchModelIn;
085    }
086
087    private AcquisitionLevel acquisitionLevel;
088
089    /**
090     * Niveau
091     * @return this.acquisitionLevel AcquisitionLevel
092     */
093    public AcquisitionLevel getAcquisitionLevel()
094    {
095        return this.acquisitionLevel;
096    }
097
098    /**
099     * Niveau
100     * @param acquisitionLevelIn AcquisitionLevel
101     */
102    public void setAcquisitionLevel(AcquisitionLevel acquisitionLevelIn)
103    {
104        this.acquisitionLevel = acquisitionLevelIn;
105    }
106
107    private AppliedStrategy appliedStrategy;
108
109    /**
110     * Une stratégie applicable est la stratégie qui s'applique pour un lieu de surveillance donné
111     * durant
112     * un interval de dates défini.
113     * @return this.appliedStrategy AppliedStrategy
114     */
115    public AppliedStrategy getAppliedStrategy()
116    {
117        return this.appliedStrategy;
118    }
119
120    /**
121     * Une stratégie applicable est la stratégie qui s'applique pour un lieu de surveillance donné
122     * durant
123     * un interval de dates défini.
124     * @param appliedStrategyIn AppliedStrategy
125     */
126    public void setAppliedStrategy(AppliedStrategy appliedStrategyIn)
127    {
128        this.appliedStrategy = appliedStrategyIn;
129    }
130
131    /**
132     * This entity does not have any identifiers
133     * and is not extending any other entity,
134     * so this method will only return <code>true</code> if the argument reference and <code>this</code>
135     * refer to the same object.
136     */
137    @Override
138    public boolean equals(Object object)
139    {
140        return super.equals(object);
141    }
142
143    /**
144     * This entity does not have any identifiers
145     * and is not extending any other entity,
146     * so this method will only take the identifiers of this entity into account when calculating the hash code.
147     */
148    @Override
149    public int hashCode()
150    {
151        return super.hashCode();
152    }
153
154    /**
155     * Constructs new instances of {@link BatchModelAppliedStrategy}.
156     */
157    public static final class Factory
158    {
159        /**
160         * Constructs a new instance of {@link BatchModelAppliedStrategy}.
161         * @return new BatchModelAppliedStrategyImpl()
162         */
163        public static BatchModelAppliedStrategy newInstance()
164        {
165            return new BatchModelAppliedStrategyImpl();
166        }
167
168
169        /**
170         * Constructs a new instance of {@link BatchModelAppliedStrategy}, taking all possible properties
171         * (except the identifier(s))as arguments.
172         * @param batchModel BatchModel
173         * @param acquisitionLevel AcquisitionLevel
174         * @param appliedStrategy AppliedStrategy
175         * @return newInstance BatchModelAppliedStrategy
176         */
177        public static BatchModelAppliedStrategy newInstance(BatchModel batchModel, AcquisitionLevel acquisitionLevel, AppliedStrategy appliedStrategy)
178        {
179            final BatchModelAppliedStrategy entity = new BatchModelAppliedStrategyImpl();
180            entity.setBatchModel(batchModel);
181            entity.setAcquisitionLevel(acquisitionLevel);
182            entity.setAppliedStrategy(appliedStrategy);
183            return entity;
184        }
185    }
186
187    /**
188     * @see Comparable#compareTo
189     */
190    public int compareTo(BatchModelAppliedStrategy o)
191    {
192        int cmp = 0;
193        if (this.getBatchModelAppliedStrategyPk() != null)
194        {
195            cmp = this.getBatchModelAppliedStrategyPk().compareTo(o.getBatchModelAppliedStrategyPk());
196        }
197        return cmp;
198    }
199// HibernateEntity.vsl merge-point
200// BatchModelAppliedStrategy.java merge-point
201}