1 /* 2 * Copyright (c) 2002-2017, 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.form.modules.exportdirectory.business; 35 36 import fr.paris.lutece.plugins.directory.business.IEntry; 37 import fr.paris.lutece.portal.service.plugin.Plugin; 38 39 import java.util.Collection; 40 41 /** 42 * 43 * @author ELY 44 * 45 */ 46 public interface IEntryConfigurationDAO 47 { 48 /** 49 * Find the {@link EntryConfiguration} list from the form identifier 50 * 51 * @param nIdForm 52 * The form identifier 53 * @param plugin 54 * The {@link Plugin} 55 * @return The {@link Collection} of {@link EntryConfiguration} 56 */ 57 Collection<EntryConfiguration> findEntryConfigurationListByIdForm( int nIdForm, Plugin plugin ); 58 59 /** 60 * Find the {@link EntryConfiguration} of the specified {@link IEntry} 61 * 62 * @param nIdDirectoryEntry 63 * The {@link IEntry} identifier 64 * @param plugin 65 * The {@link Plugin} 66 * @return The {@link EntryConfiguration} 67 */ 68 EntryConfiguration findDirectoryEntryConfiguration( int nIdDirectoryEntry, Plugin plugin ); 69 70 /** 71 * Find the {@link EntryConfiguration} by ids 72 * 73 * @param nIdForm 74 * The form id 75 * @param nIdEntry 76 * The entry id 77 * @param nIterationNumber 78 * The iteration number of the entry 79 * @param plugin 80 * The {@link Plugin} 81 * @return The {@link EntryConfiguration} or null if not exists 82 */ 83 EntryConfiguration findByPrimaryKey( int nIdForm, int nIdEntry, int nIterationNumber, Plugin plugin ); 84 85 /** 86 * Delete an Entry configuration 87 * 88 * @param nIdForm 89 * The form identifier 90 * @param nIdEntry 91 * The entry identifier 92 * @param nIterationNumber 93 * The iteration number of the entry 94 * @param plugin 95 * The plugin 96 */ 97 void delete( int nIdForm, int nIdEntry, int nIterationNumber, Plugin plugin ); 98 99 /** 100 * Delete all Entry configuration by Form 101 * 102 * @param nIdForm 103 * The form identifier 104 * @param plugin 105 * The plugin 106 */ 107 void deleteByForm( int nIdForm, Plugin plugin ); 108 109 /** 110 * Insert a new Entry configuration into database 111 * 112 * @param entryConfiguration 113 * The new {@link EntryConfiguration} 114 * @param plugin 115 * The plugin 116 */ 117 void insert( EntryConfiguration entryConfiguration, Plugin plugin ); 118 119 /** 120 * Update an existing {@link EntryConfiguration} 121 * 122 * @param entryConfiguration 123 * The {@link EntryConfiguration} to update 124 * @param plugin 125 * The plugin 126 */ 127 void store( EntryConfiguration entryConfiguration, Plugin plugin ); 128 }