1 /* 2 * Copyright (c) 2002-2022, 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.workflow.modules.archive.business; 35 36 import java.sql.Timestamp; 37 38 public class ArchiveResource 39 { 40 private int _nIdResource; 41 private int _nIdTask; 42 private Timestamp _tInitialDate; 43 private Timestamp _tArchivalDate; 44 private boolean _bIsArchived; 45 46 /** 47 * @return the nIdResource 48 */ 49 public int getIdResource( ) 50 { 51 return _nIdResource; 52 } 53 54 /** 55 * @param nIdResource 56 * the nIdResource to set 57 */ 58 public void setIdResource( int nIdResource ) 59 { 60 _nIdResource = nIdResource; 61 } 62 63 /** 64 * @return the nIdTask 65 */ 66 public int getIdTask( ) 67 { 68 return _nIdTask; 69 } 70 71 /** 72 * @param nIdTask 73 * the nIdTask to set 74 */ 75 public void setIdTask( int nIdTask ) 76 { 77 _nIdTask = nIdTask; 78 } 79 80 /** 81 * @return the tInitialDate 82 */ 83 public Timestamp getInitialDate( ) 84 { 85 if ( _tInitialDate == null ) 86 { 87 return null; 88 } 89 return new Timestamp( _tInitialDate.getTime( ) ); 90 } 91 92 /** 93 * @param tInitialDate 94 * the tInitialDate to set 95 */ 96 public void setInitialDate( Timestamp tInitialDate ) 97 { 98 if ( tInitialDate == null ) 99 { 100 _tInitialDate = null; 101 } 102 else 103 { 104 _tInitialDate = new Timestamp( tInitialDate.getTime( ) ); 105 } 106 } 107 108 /** 109 * @return the tArchivalDate 110 */ 111 public Timestamp getArchivalDate( ) 112 { 113 if ( _tArchivalDate == null ) 114 { 115 return null; 116 } 117 return new Timestamp( _tArchivalDate.getTime( ) ); 118 } 119 120 /** 121 * @param tArchivalDate 122 * the tArchivalDate to set 123 */ 124 public void setArchivalDate( Timestamp tArchivalDate ) 125 { 126 if ( tArchivalDate == null ) 127 { 128 _tArchivalDate = null; 129 } 130 else 131 { 132 _tArchivalDate = new Timestamp( tArchivalDate.getTime( ) ); 133 } 134 } 135 136 /** 137 * @return the bIsArchived 138 */ 139 public boolean isArchived( ) 140 { 141 return _bIsArchived; 142 } 143 144 /** 145 * @param bIsArchived 146 * the bIsArchived to set 147 */ 148 public void setIsArchived( boolean bIsArchived ) 149 { 150 _bIsArchived = bIsArchived; 151 } 152 }