fr.paris.lutece.plugins.adminsql.business
Class DataHome

java.lang.Object
  extended by fr.paris.lutece.plugins.adminsql.business.DataHome

public class DataHome
extends java.lang.Object

The class calling the business objects


Constructor Summary
DataHome()
           
 
Method Summary
static java.util.List<java.lang.String> create(java.lang.String strPoolName, java.lang.String strTableName, java.util.List<java.lang.String> listData, java.util.List<java.lang.String> listFieldsNames, fr.paris.lutece.portal.service.database.PluginConnectionService connectionService)
          Create an instance of data
static void createWithUserRequest(java.lang.String strUserRequest, fr.paris.lutece.portal.service.database.PluginConnectionService connectionService, java.lang.String strPoolName)
          Create an instance of data with user request
static java.util.List<java.util.List<java.lang.String>> findAll(java.lang.String strTableName, fr.paris.lutece.portal.service.database.PluginConnectionService connectionService)
          Creates a new instance of DataHome
static java.util.List<java.util.List<java.lang.String>> findAllInUserRequest(java.lang.String strPoolName, java.lang.String strUserRequest, fr.paris.lutece.portal.service.database.PluginConnectionService connectionService)
          List of data of user request
static java.util.List<java.util.List<java.lang.String>> findByPrimaryKey(java.lang.String strTableName, java.lang.String strContatFieldNameAndData, java.util.List<Field> listFields, fr.paris.lutece.portal.service.database.PluginConnectionService connectionService)
          find a row of a table
static java.util.List<java.lang.String> findFieldsNames(java.lang.String strUserRequest, fr.paris.lutece.portal.service.database.PluginConnectionService connectionService, java.lang.String strPoolName)
          Find fields names of a table for user request
static void remove(java.lang.String strPoolName, java.lang.String strTableName, java.util.List<java.lang.String> listConcatFieldNameAndData, fr.paris.lutece.portal.service.database.PluginConnectionService connectionService)
          Delete a row
static void update(java.lang.String strPoolName, java.lang.String strTableName, java.util.List<FieldValues> listFieldValues, fr.paris.lutece.portal.service.database.PluginConnectionService connectionService)
          Update a row in a table
static java.util.List<java.util.List<java.lang.String>> userRequest(java.lang.String strUserRequest, fr.paris.lutece.portal.service.database.PluginConnectionService connectionService)
          Result of a select request type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataHome

public DataHome()
Method Detail

findAll

public static java.util.List<java.util.List<java.lang.String>> findAll(java.lang.String strTableName,
                                                                       fr.paris.lutece.portal.service.database.PluginConnectionService connectionService)
Creates a new instance of DataHome

Parameters:
strTableName - Name of the table
connectionService - Plugin connectionService
Returns:
List of all data in a table

findAllInUserRequest

public static java.util.List<java.util.List<java.lang.String>> findAllInUserRequest(java.lang.String strPoolName,
                                                                                    java.lang.String strUserRequest,
                                                                                    fr.paris.lutece.portal.service.database.PluginConnectionService connectionService)
List of data of user request

Parameters:
strPoolName - Name of the pool
strUserRequest - User Request
connectionService - PluginConnectionService
Returns:
List of data of user request

create

public static java.util.List<java.lang.String> create(java.lang.String strPoolName,
                                                      java.lang.String strTableName,
                                                      java.util.List<java.lang.String> listData,
                                                      java.util.List<java.lang.String> listFieldsNames,
                                                      fr.paris.lutece.portal.service.database.PluginConnectionService connectionService)
Create an instance of data

Parameters:
strPoolName - the name of the current pool
strTableName - the name of the table
listData - data to insert
listFieldsNames - fields of a table
connectionService - PluginConnectionService
Returns:
list of data

createWithUserRequest

public static void createWithUserRequest(java.lang.String strUserRequest,
                                         fr.paris.lutece.portal.service.database.PluginConnectionService connectionService,
                                         java.lang.String strPoolName)
Create an instance of data with user request

Parameters:
strUserRequest - user request
connectionService - PluginConnctionSerice object
strPoolName - the name of the pool

findByPrimaryKey

public static java.util.List<java.util.List<java.lang.String>> findByPrimaryKey(java.lang.String strTableName,
                                                                                java.lang.String strContatFieldNameAndData,
                                                                                java.util.List<Field> listFields,
                                                                                fr.paris.lutece.portal.service.database.PluginConnectionService connectionService)
find a row of a table

Parameters:
strTableName - the name of the table
strContatFieldNameAndData - the concatenation of the field name and the data
listFields - list of field table
connectionService - PluginConnectionService object
Returns:
a row of a table

userRequest

public static java.util.List<java.util.List<java.lang.String>> userRequest(java.lang.String strUserRequest,
                                                                           fr.paris.lutece.portal.service.database.PluginConnectionService connectionService)
Result of a select request type

Parameters:
strUserRequest - user request
connectionService - PluginConnectionService object
Returns:
the result of the user request

findFieldsNames

public static java.util.List<java.lang.String> findFieldsNames(java.lang.String strUserRequest,
                                                               fr.paris.lutece.portal.service.database.PluginConnectionService connectionService,
                                                               java.lang.String strPoolName)
Find fields names of a table for user request

Parameters:
strUserRequest - user request
connectionService - PluginConnectionService object
strPoolName - the name of the pool
Returns:
list of fields names

update

public static void update(java.lang.String strPoolName,
                          java.lang.String strTableName,
                          java.util.List<FieldValues> listFieldValues,
                          fr.paris.lutece.portal.service.database.PluginConnectionService connectionService)
Update a row in a table

Parameters:
strPoolName - the name of the pool
strTableName - the name of the table
listFieldValues - list of table fields
connectionService - PluginConnectionService object

remove

public static void remove(java.lang.String strPoolName,
                          java.lang.String strTableName,
                          java.util.List<java.lang.String> listConcatFieldNameAndData,
                          fr.paris.lutece.portal.service.database.PluginConnectionService connectionService)
Delete a row

Parameters:
strPoolName - the name of the pool
strTableName - the name of the table
listConcatFieldNameAndData - list of concatenation of field name and data
connectionService - PluginConnectionService object


Copyright © 2010 Mairie de Paris. All Rights Reserved.