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

java.lang.Object
  extended by fr.paris.lutece.plugins.adminsql.business.TableDAO
All Implemented Interfaces:
ITableDAO

public class TableDAO
extends java.lang.Object
implements ITableDAO

Creates a new instance of TableDAO


Constructor Summary
TableDAO()
           
 
Method Summary
 void delete(java.lang.String strTableName, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a table from a database
 int findFieldKeyIdbyLabel(java.lang.String strLabelKey, fr.paris.lutece.portal.service.plugin.Plugin plugin, java.lang.String strPoolName)
          Find the field id key by label key from adminsql database
 java.lang.String findFieldKeyLabelbyId(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin, java.lang.String strPoolName)
          Find the field id key by label key from adminsql database
 int findFieldNullIdbyLabel(java.lang.String strLabelNull, fr.paris.lutece.portal.service.plugin.Plugin plugin, java.lang.String strPoolName)
          Find the field id null by label null from adminsql database
 java.lang.String findFieldNullLabelbyId(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin, java.lang.String strPoolName)
          Find the field id null by label null from adminsql database
 int findFieldTypeIdbyLabel(java.lang.String strLabelType, fr.paris.lutece.portal.service.plugin.Plugin plugin, java.lang.String strPoolName)
          Find the field id type by label type from adminsql database
 java.lang.String findFieldTypeLabelbyId(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin, java.lang.String strPoolName)
          Find the field label type by id type from adminsql database
 void insert(java.lang.String strPoolName, Table table, Field field, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a table into a database
 Table load(java.lang.String strPoolName, java.lang.String strTableName, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load a table from a database
 fr.paris.lutece.util.ReferenceList selectFieldKeyList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          lists the field list possiblilities to create or modify fields form
 fr.paris.lutece.util.ReferenceList selectFieldNullList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          lists the field list possiblilities to create or modify fields form
 fr.paris.lutece.util.ReferenceList selectFieldTypeList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          lists the field list possiblilities to create or modify fields form
 java.util.List<Table> selectTableList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find the list of the tables on a database
 java.util.List<Table> selectTableListByPool(java.lang.String strPoolName, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find the list of the tables on a database
 void store(java.lang.String strTableNameToModify, Table table)
          Store a table into a database
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableDAO

public TableDAO()
Method Detail

load

public Table load(java.lang.String strPoolName,
                  java.lang.String strTableName,
                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load a table from a database

Specified by:
load in interface ITableDAO
Parameters:
strPoolName - the name of the pool
strTableName - the name of the table
plugin - Plugin adminsql
Returns:
the table objet

insert

public void insert(java.lang.String strPoolName,
                   Table table,
                   Field field,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a table into a database

Specified by:
insert in interface ITableDAO
Parameters:
strPoolName - the name of the pool
table - the name of the table
field - the name of the field
plugin - Plugin adminsql

store

public void store(java.lang.String strTableNameToModify,
                  Table table)
Store a table into a database

Specified by:
store in interface ITableDAO
Parameters:
strTableNameToModify - the name of the table to modify
table - Table object

delete

public void delete(java.lang.String strTableName,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a table from a database

Specified by:
delete in interface ITableDAO
Parameters:
strTableName - the name of the table
plugin - Plugin adminsql

selectTableList

public java.util.List<Table> selectTableList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find the list of the tables on a database

Specified by:
selectTableList in interface ITableDAO
Parameters:
plugin - Plugin adminsql
Returns:
the list of the tables on a database

selectTableListByPool

public java.util.List<Table> selectTableListByPool(java.lang.String strPoolName,
                                                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find the list of the tables on a database

Specified by:
selectTableListByPool in interface ITableDAO
Parameters:
strPoolName - the name of the pool
plugin - Plugin adminsql
Returns:
the list of the tables on a database

selectFieldTypeList

public fr.paris.lutece.util.ReferenceList selectFieldTypeList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
lists the field list possiblilities to create or modify fields form

Parameters:
plugin - plugin adminsql
Returns:
Field list

selectFieldKeyList

public fr.paris.lutece.util.ReferenceList selectFieldKeyList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
lists the field list possiblilities to create or modify fields form

Parameters:
plugin - Plugin adminsql
Returns:
the keys choice adminsql database

selectFieldNullList

public fr.paris.lutece.util.ReferenceList selectFieldNullList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
lists the field list possiblilities to create or modify fields form

Parameters:
plugin - Plugin adminsql
Returns:
the null value choice adminsql database

findFieldTypeIdbyLabel

public int findFieldTypeIdbyLabel(java.lang.String strLabelType,
                                  fr.paris.lutece.portal.service.plugin.Plugin plugin,
                                  java.lang.String strPoolName)
Find the field id type by label type from adminsql database

Parameters:
strLabelType - the name of the type that user choose
plugin - Plugin adminsql
strPoolName - the name of the pool
Returns:
id type from label type

findFieldTypeLabelbyId

public java.lang.String findFieldTypeLabelbyId(int nId,
                                               fr.paris.lutece.portal.service.plugin.Plugin plugin,
                                               java.lang.String strPoolName)
Find the field label type by id type from adminsql database

Parameters:
nId - the id of type label
plugin - Plugin adminsql
strPoolName - name of the pool
Returns:
the label of the type by id

findFieldNullIdbyLabel

public int findFieldNullIdbyLabel(java.lang.String strLabelNull,
                                  fr.paris.lutece.portal.service.plugin.Plugin plugin,
                                  java.lang.String strPoolName)
Find the field id null by label null from adminsql database

Parameters:
strLabelNull - the label of the null value
plugin - Plugin adminsql
strPoolName - the name of the pool
Returns:
id null from null type

findFieldNullLabelbyId

public java.lang.String findFieldNullLabelbyId(int nId,
                                               fr.paris.lutece.portal.service.plugin.Plugin plugin,
                                               java.lang.String strPoolName)
Find the field id null by label null from adminsql database

Parameters:
nId - the id of the null value
plugin - Plugin adminsql
strPoolName - the name of the pool
Returns:
the label of null value by id

findFieldKeyIdbyLabel

public int findFieldKeyIdbyLabel(java.lang.String strLabelKey,
                                 fr.paris.lutece.portal.service.plugin.Plugin plugin,
                                 java.lang.String strPoolName)
Find the field id key by label key from adminsql database

Parameters:
strLabelKey - the label key of the field
plugin - Plugin adminsql
strPoolName - the name of the pool
Returns:
id key from label key

findFieldKeyLabelbyId

public java.lang.String findFieldKeyLabelbyId(int nId,
                                              fr.paris.lutece.portal.service.plugin.Plugin plugin,
                                              java.lang.String strPoolName)
Find the field id key by label key from adminsql database

Parameters:
nId - the id of the key
plugin - Plugin adminsql
strPoolName - the name of the pool
Returns:
the label of key by id


Copyright © 2010 Mairie de Paris. All Rights Reserved.