com.stratelia.webactiv.organization
Class InstanceDataTable

java.lang.Object
  extended by com.stratelia.webactiv.organization.Table<InstanceDataRow>
      extended by com.stratelia.webactiv.organization.InstanceDataTable

public class InstanceDataTable
extends Table<InstanceDataRow>

A InstanceData object manages component parameters


Constructor Summary
InstanceDataTable(OrganizationSchema organization)
           
 
Method Summary
 void createInstanceData(int componentId, Parameter parameter)
          Inserts in the database a new instanceData row.
protected  InstanceDataRow fetchInstanceData(ResultSet rs)
          Fetch the current instanceData row from a resultSet.
protected  InstanceDataRow fetchRow(ResultSet rs)
          Fetch the current instanceData row from a resultSet.
protected  InstanceDataRow fetchUserSet(ResultSet rs)
          Fetch the current instanceData row from a resultSet.
 List<Parameter> getAllParametersInComponent(int componentId)
          Returns all the parameters of the given component (List of SPParameter)
 InstanceDataRow getInstanceData(int id)
          Returns the instance whith the given id.
protected  void prepareInsert(String insertQuery, PreparedStatement insert, InstanceDataRow row)
          Set all the parameters of the insert PreparedStatement built from the insertQuery in order to insert the given row.
protected  void prepareUpdate(String updateQuery, PreparedStatement update, InstanceDataRow row)
          Set all the parameters of the update PreparedStatement built from the updateQuery in order to update the given row.
 void removeInstanceData(int id)
          Removes a instance data row.
 void updateInstanceData(int componentId, Parameter parameter)
          Updates a instance data row.
 
Methods inherited from class com.stratelia.webactiv.organization.Table
addIdToQuery, addParamToQuery, addParamToQuery, addParamToQuery, aliasColumns, getCount, getCount, getIds, getIds, getIds, getIds, getInteger, getInteger, getMatchingRows, getNextId, getRows, getRows, getRows, getRows, getUniqueRow, getUniqueRow, getUniqueRow, insertRow, performPrepareStatementParams, truncate, updateRelation, updateRelation, updateRelation, updateRow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstanceDataTable

public InstanceDataTable(OrganizationSchema organization)
Method Detail

fetchUserSet

protected InstanceDataRow fetchUserSet(ResultSet rs)
                                throws SQLException
Fetch the current instanceData row from a resultSet.

Throws:
SQLException

createInstanceData

public void createInstanceData(int componentId,
                               Parameter parameter)
                        throws AdminPersistenceException,
                               SQLException
Inserts in the database a new instanceData row.

Throws:
AdminPersistenceException
SQLException

getInstanceData

public InstanceDataRow getInstanceData(int id)
                                throws AdminPersistenceException
Returns the instance whith the given id.

Throws:
AdminPersistenceException

prepareInsert

protected void prepareInsert(String insertQuery,
                             PreparedStatement insert,
                             InstanceDataRow row)
                      throws SQLException
Description copied from class: Table
Set all the parameters of the insert PreparedStatement built from the insertQuery in order to insert the given row.

Specified by:
prepareInsert in class Table<InstanceDataRow>
Throws:
SQLException

getAllParametersInComponent

public List<Parameter> getAllParametersInComponent(int componentId)
                                            throws AdminPersistenceException
Returns all the parameters of the given component (List of SPParameter)

Throws:
AdminPersistenceException

updateInstanceData

public void updateInstanceData(int componentId,
                               Parameter parameter)
                        throws AdminPersistenceException,
                               SQLException
Updates a instance data row.

Throws:
AdminPersistenceException
SQLException

removeInstanceData

public void removeInstanceData(int id)
                        throws AdminPersistenceException
Removes a instance data row.

Throws:
AdminPersistenceException

fetchRow

protected InstanceDataRow fetchRow(ResultSet rs)
                            throws SQLException
Fetch the current instanceData row from a resultSet.

Specified by:
fetchRow in class Table<InstanceDataRow>
Returns:
Throws:
SQLException

fetchInstanceData

protected InstanceDataRow fetchInstanceData(ResultSet rs)
                                     throws SQLException
Fetch the current instanceData row from a resultSet.

Throws:
SQLException

prepareUpdate

protected void prepareUpdate(String updateQuery,
                             PreparedStatement update,
                             InstanceDataRow row)
                      throws SQLException
Description copied from class: Table
Set all the parameters of the update PreparedStatement built from the updateQuery in order to update the given row.

Specified by:
prepareUpdate in class Table<InstanceDataRow>
Throws:
SQLException


Copyright © 2016 Silverpeas. All Rights Reserved.