View Javadoc
1   /*
2    * Copyright (c) 2002-2020, City of Paris
3    * All rights reserved.
4    *
5    * Redistribution and use in source and binary forms, with or without
6    * modification, are permitted provided that the following conditions
7    * are met:
8    *
9    *  1. Redistributions of source code must retain the above copyright notice
10   *     and the following disclaimer.
11   *
12   *  2. Redistributions in binary form must reproduce the above copyright notice
13   *     and the following disclaimer in the documentation and/or other materials
14   *     provided with the distribution.
15   *
16   *  3. Neither the name of 'Mairie de Paris' nor 'Lutece' nor the names of its
17   *     contributors may be used to endorse or promote products derived from
18   *     this software without specific prior written permission.
19   *
20   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23   * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
24   * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25   * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26   * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27   * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28   * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30   * POSSIBILITY OF SUCH DAMAGE.
31   *
32   * License 1.0
33   */
34  package fr.paris.lutece.plugins.campagnebp.business;
35  
36  import javax.validation.constraints.*;
37  
38  import org.hibernate.validator.constraints.*;
39  
40  import fr.paris.lutece.portal.business.file.File;
41  
42  import java.io.Serializable;
43  
44  /**
45   * This is the business class for the object CampagneTheme
46   */
47  public class CampagneTheme implements Serializable
48  {
49      private static final long serialVersionUID = 1L;
50  
51      // Variables declarations
52      private int _nId;
53  
54      @NotEmpty( message = "#i18n{ideation.validation.campagnetheme.CodeCampagne.notEmpty}" )
55      @Size( max = 50, message = "#i18n{ideation.validation.campagnetheme.CodeCampagne.size}" )
56      private String _strCodeCampagne;
57  
58      @NotEmpty( message = "#i18n{ideation.validation.campagnetheme.Code.notEmpty}" )
59      @Size( max = 50, message = "#i18n{ideation.validation.campagnetheme.Code.size}" )
60      private String _strCode;
61  
62      @NotEmpty( message = "#i18n{ideation.validation.campagnetheme.Title.notEmpty}" )
63      @Size( max = 50, message = "#i18n{ideation.validation.campagnetheme.Title.size}" )
64      private String _strTitle;
65  
66      @NotEmpty( message = "#i18n{ideation.validation.campagnetheme.Description.notEmpty}" )
67      private String _strDescription;
68  
69      private boolean _bActive;
70  
71      private File _fileImage;
72  
73      /**
74       * Returns the Id
75       * 
76       * @return The Id
77       */
78      public int getId( )
79      {
80          return _nId;
81      }
82  
83      /**
84       * Sets the Id
85       * 
86       * @param nId
87       *            The Id
88       */
89      public void setId( int nId )
90      {
91          _nId = nId;
92      }
93  
94      /**
95       * Returns the CodeCampagne
96       * 
97       * @return The CodeCampagne
98       */
99      public String getCodeCampagne( )
100     {
101         return _strCodeCampagne;
102     }
103 
104     /**
105      * Sets the CodeCampagne
106      * 
107      * @param strCodeCampagne
108      *            The CodeCampagne
109      */
110     public void setCodeCampagne( String strCodeCampagne )
111     {
112         _strCodeCampagne = strCodeCampagne;
113     }
114 
115     /**
116      * Returns the Title
117      * 
118      * @return The Title
119      */
120     public String getTitle( )
121     {
122         return _strTitle;
123     }
124 
125     /**
126      * Sets the Title
127      * 
128      * @param strTitle
129      *            The Title
130      */
131     public void setTitle( String strTitle )
132     {
133         _strTitle = strTitle;
134     }
135 
136     /**
137      * Returns the Description
138      * 
139      * @return The Description
140      */
141     public String getDescription( )
142     {
143         return _strDescription;
144     }
145 
146     /**
147      * Sets the Description
148      * 
149      * @param strDescription
150      *            The Description
151      */
152     public void setDescription( String strDescription )
153     {
154         _strDescription = strDescription;
155     }
156 
157     /**
158      * Returns the Active
159      * 
160      * @return The Active
161      */
162     public boolean getActive( )
163     {
164         return _bActive;
165     }
166 
167     /**
168      * Sets the Active
169      * 
170      * @param bActive
171      *            The Active
172      */
173     public void setActive( boolean bActive )
174     {
175         _bActive = bActive;
176     }
177 
178     /**
179      * @return the Code
180      */
181     public String getCode( )
182     {
183         return _strCode;
184     }
185 
186     /**
187      * @param strCode
188      *            the Code to set
189      */
190     public void setCode( String strCode )
191     {
192         this._strCode = strCode;
193     }
194 
195     /**
196      * @return the Image
197      */
198     public File getImage( )
199     {
200         return _fileImage;
201     }
202 
203     /**
204      * @param _fileImage
205      *            the Image to set
206      */
207     public void setImage( File _fileImage )
208     {
209         this._fileImage = _fileImage;
210     }
211 }