1 /* 2 * Copyright (c) 2002-2014, 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.shoppingcart.business; 35 36 import java.util.Date; 37 38 39 /** 40 * Filter for {@link ShoppingCartItem} 41 */ 42 public class ShoppingCartItemFilter 43 { 44 private String _strIdProvider; 45 private int _nIdLot; 46 private String _strIdUser; 47 private String _strResourceType; 48 private String _strIdResource; 49 private double _dItemPrice; 50 private Date _dateCreationMin; 51 private Date _dateCreationMax; 52 53 /** 54 * Returns the id of the service that provides the item 55 * @return The id of the service that provides the item 56 */ 57 public String getIdProvider( ) 58 { 59 return _strIdProvider; 60 } 61 62 /** 63 * Sets the id of the service that provides the item 64 * @param strIdProvider The id of the service that provides the item 65 */ 66 public void setIdProvider( String strIdProvider ) 67 { 68 _strIdProvider = strIdProvider; 69 } 70 71 /** 72 * Returns the id of the lot 73 * @return The id of the lot 74 */ 75 public int getIdLot( ) 76 { 77 return _nIdLot; 78 } 79 80 /** 81 * Sets the id of the lot 82 * @param nIdLot The id of the lot 83 */ 84 public void setIdLot( int nIdLot ) 85 { 86 _nIdLot = nIdLot; 87 } 88 89 /** 90 * Returns the id of the user 91 * @return The id of the user 92 */ 93 public String getIdUser( ) 94 { 95 return _strIdUser; 96 } 97 98 /** 99 * Sets the id of the user 100 * @param strIdUser The id of the user 101 */ 102 public void setIdUser( String strIdUser ) 103 { 104 _strIdUser = strIdUser; 105 } 106 107 /** 108 * Returns the type of the resource added to the shopping cart 109 * @return The type of the resource added to the shopping cart 110 */ 111 public String getResourceType( ) 112 { 113 return _strResourceType; 114 } 115 116 /** 117 * Sets the type of the resource added to the shopping cart 118 * @param strResourceType The type of the resource added to the shopping 119 * cart 120 */ 121 public void setResourceType( String strResourceType ) 122 { 123 _strResourceType = strResourceType; 124 } 125 126 /** 127 * Returns the id of the resource added to the shopping cart 128 * @return The id of the resource added to the shopping cart 129 */ 130 public String getIdResource( ) 131 { 132 return _strIdResource; 133 } 134 135 /** 136 * Sets the id of the resource added to the shopping cart 137 * @param strIdResource The id of the resource added to the shopping cart 138 */ 139 public void setIdResource( String strIdResource ) 140 { 141 _strIdResource = strIdResource; 142 } 143 144 /** 145 * Returns the price of the item 146 * @return The price of the item 147 */ 148 public double getItemPrice( ) 149 { 150 return _dItemPrice; 151 } 152 153 /** 154 * Sets the ItemPrice 155 * @param dItemPrice The ItemPrice 156 */ 157 public void setItemPrice( double dItemPrice ) 158 { 159 _dItemPrice = dItemPrice; 160 } 161 162 /** 163 * Get the minimum creation date of this filter 164 * @return The minimum creation date of this filter 165 */ 166 public Date getDateCreationMin( ) 167 { 168 return _dateCreationMin == null ? null : (Date) _dateCreationMin.clone( ); 169 } 170 171 /** 172 * Set the minimum creation date of this filter 173 * @param dateCreationMin The minimum creation date of this filter 174 */ 175 public void setDateCreationMin( Date dateCreationMin ) 176 { 177 this._dateCreationMin = dateCreationMin == null ? null : (Date) _dateCreationMin.clone( ); 178 } 179 180 /** 181 * Get the maximum creation date of this filter 182 * @return The maximum creation date of this filter 183 */ 184 public Date getDateCreationMax( ) 185 { 186 return _dateCreationMax == null ? null : (Date) _dateCreationMax.clone( ); 187 } 188 189 /** 190 * Set the maximum creation date of this filter 191 * @param dateCreationMax the maximum creation date of this filter 192 */ 193 public void setDateCreationMax( Date dateCreationMax ) 194 { 195 this._dateCreationMax = dateCreationMax == null ? null : (Date) dateCreationMax.clone( ); 196 } 197 }