View Javadoc
1   
2   /*
3    * Copyright (c) 2002-2013, Mairie de Paris
4    * All rights reserved.
5    *
6    * Redistribution and use in source and binary forms, with or without
7    * modification, are permitted provided that the following conditions
8    * are met:
9    *
10   *  1. Redistributions of source code must retain the above copyright notice
11   *	 and the following disclaimer.
12   *
13   *  2. Redistributions in binary form must reproduce the above copyright notice
14   *	 and the following disclaimer in the documentation and/or other materials
15   *	 provided with the distribution.
16   *
17   *  3. Neither the name of 'Mairie de Paris' nor 'Lutece' nor the names of its
18   *	 contributors may be used to endorse or promote products derived from
19   *	 this software without specific prior written permission.
20   *
21   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24   * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
25   * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26   * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27   * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28   * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29   * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31   * POSSIBILITY OF SUCH DAMAGE.
32   *
33   * License 1.0
34   */
35   
36  package fr.paris.lutece.plugins.dataviz.business;
37  
38  import fr.paris.lutece.portal.service.plugin.Plugin;
39  import java.util.Collection;
40  
41  
42  
43  /**
44   * IStatDAO Interface
45   */
46  public interface IStatDAO
47  {
48  
49  //
50  //	/**
51  //	 * Insert a new record in the table.
52  //	 * @param stat instance of the Stat object to insert
53  //	 * @param plugin the Plugin
54  //	 */
55  //	void insert( Stat stat, Plugin plugin );
56  //
57  //
58  //
59  //	/**
60  //	 * Update the record in the table
61  //	 * @param stat the reference of the Stat
62  //	 * @param plugin the Plugin
63  //	 */
64  //	void store( Stat stat, Plugin plugin );
65  //
66  //
67  //	/**
68  //	 * Delete a record from the table
69  //	 * @param nIdStat int identifier of the Stat to delete
70  //	 * @param plugin the Plugin
71  //	 */
72  //	void delete( int nIdStat, Plugin plugin );
73  //
74  //	///////////////////////////////////////////////////////////////////////////
75  //	// Finders
76  //
77  //	/**
78  //	 * Load the data from the table
79  //	 * @param nKey The identifier of the stat
80  //	 * @param plugin the Plugin
81  //	 * @return The instance of the stat
82  //	 */
83  //	Stat load( int nKey, Plugin plugin );
84  //
85  //
86  //
87  //	/**
88  //	 * Load the data of all the stat objects and returns them as a collection
89  //	 * @param plugin the Plugin
90  //	 * @return The collection which contains the data of all the stat objects
91  //	 */
92  //	Collection<Stat> selectStatsList( Plugin plugin );
93          
94          /**
95  	 * Executes the SQL request and returns it result
96  	 * @param plugin the Plugin
97           * @param sql the SQL request
98  	 * @return The result of the SQL request
99  	 */
100         int getSingleResult( String sql, Plugin _plugin );
101     
102         /**
103 	 * Executes the SQL request and returns it result
104 	 * @param plugin the Plugin
105          * @param sql the SQL request
106 	 * @return The result of the SQL request
107 	 */
108         Object getListResult ( String sql, Plugin plugin);
109 	
110 }
111