View Javadoc
1   /*
2    * Copyright (c) 2002-2015, Mairie de 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.indicator.business;
35  
36  import org.hibernate.validator.constraints.NotEmpty;
37  
38  import javax.validation.constraints.Size;
39  
40  import java.io.Serializable;
41  
42  /**
43   * This is the business class for the object Indicator
44   */
45  public class Indicator implements Serializable
46  {
47      private static final long serialVersionUID = 1L;
48      
49      // Variables declarations 
50      private int _nId;
51      @NotEmpty( message = "#i18n{indicator.validation.indicator.IndKey.notEmpty}" )
52      @Size( max = 50, message = "#i18n{indicator.validation.indicator.IndKey.size}" )
53      private String _strIndKey;
54      @NotEmpty( message = "#i18n{indicator.validation.indicator.Label.notEmpty}" )
55      @Size( max = 50, message = "#i18n{indicator.validation.indicator.Label.size}" )
56      private String _strLabel;
57      @NotEmpty( message = "#i18n{indicator.validation.indicator.Description.notEmpty}" )
58      @Size( max = 255, message = "#i18n{indicator.validation.indicator.Description.size}" )
59      private String _strDescription;
60      private int _nIndValue;
61      private int _nIndTarget;
62      @NotEmpty( message = "#i18n{indicator.validation.indicator.HistoryPeriod.notEmpty}" )
63      @Size( max = 50, message = "#i18n{indicator.validation.indicator.HistoryPeriod.size}" )
64      private String _strHistoryPeriod;
65  
66      /**
67       * Returns the Id
68       * @return The Id
69       */
70      public int getId(  )
71      {
72          return _nId;
73      }
74  
75      /**
76       * Sets the Id
77       * @param nId The Id
78       */
79      public void setId( int nId )
80      {
81          _nId = nId;
82      }
83  
84      /**
85       * Returns the IndKey
86       * @return The IndKey
87       */
88      public String getIndKey(  )
89      {
90          return _strIndKey;
91      }
92  
93      /**
94       * Sets the IndKey
95       * @param strIndKey The IndKey
96       */
97      public void setIndKey( String strIndKey )
98      {
99          _strIndKey = strIndKey;
100     }
101 
102     /**
103      * Returns the Label
104      * @return The Label
105      */
106     public String getLabel(  )
107     {
108         return _strLabel;
109     }
110 
111     /**
112      * Sets the Label
113      * @param strLabel The Label
114      */
115     public void setLabel( String strLabel )
116     {
117         _strLabel = strLabel;
118     }
119 
120     /**
121      * Returns the Description
122      * @return The Description
123      */
124     public String getDescription(  )
125     {
126         return _strDescription;
127     }
128 
129     /**
130      * Sets the Description
131      * @param strDescription The Description
132      */
133     public void setDescription( String strDescription )
134     {
135         _strDescription = strDescription;
136     }
137 
138     /**
139      * Returns the IndValue
140      * @return The IndValue
141      */
142     public int getValue(  )
143     {
144         return _nIndValue;
145     }
146 
147     /**
148      * Sets the IndValue
149      * @param nIndValue The IndValue
150      */
151     public void setIndValue( int nIndValue )
152     {
153         _nIndValue = nIndValue;
154     }
155 
156     /**
157      * Returns the IndTarget
158      * @return The IndTarget
159      */
160     public int getIndTarget(  )
161     {
162         return _nIndTarget;
163     }
164 
165     /**
166      * Sets the IndTarget
167      * @param nIndTarget The IndTarget
168      */
169     public void setIndTarget( int nIndTarget )
170     {
171         _nIndTarget = nIndTarget;
172     }
173 
174     /**
175      * Returns the HistoryPeriod
176      * @return The HistoryPeriod
177      */
178     public String getHistoryPeriod(  )
179     {
180         return _strHistoryPeriod;
181     }
182 
183     /**
184      * Sets the HistoryPeriod
185      * @param strHistoryPeriod The HistoryPeriod
186      */
187     public void setHistoryPeriod( String strHistoryPeriod )
188     {
189         _strHistoryPeriod = strHistoryPeriod;
190     }
191 }