com.stratelia.webactiv.organization
Class ComponentInstanceI18NTable

java.lang.Object
  extended by com.stratelia.webactiv.organization.Table<ComponentInstanceI18NRow>
      extended by com.stratelia.webactiv.organization.ComponentInstanceI18NTable

public class ComponentInstanceI18NTable
extends Table<ComponentInstanceI18NRow>

A ComponentInstanceI18NTable object manages the ST_ComponentInstance table.


Constructor Summary
ComponentInstanceI18NTable(OrganizationSchema organization)
           
 
Method Summary
 void createTranslation(ComponentInstanceI18NRow translation)
          Inserts in the database a new component row.
protected  ComponentInstanceI18NRow fetchRow(ResultSet rs)
          Fetch the current component row from a resultSet.
protected  ComponentInstanceI18NRow fetchTranslation(ResultSet rs)
          Fetch the current component row from a resultSet.
 List<ComponentInstanceI18NRow> getTranslations(int componentId)
          Returns the Component whith the given id.
protected  void prepareInsert(String insertQuery, PreparedStatement insert, ComponentInstanceI18NRow 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, ComponentInstanceI18NRow row)
          Set all the parameters of the update PreparedStatement built from the updateQuery in order to update the given row.
 void removeTranslation(int id)
          Delete a translation.
 void removeTranslations(int componentId)
          Delete all component's translations.
 void updateTranslation(ComponentInstanceI18NRow component)
          Updates a component 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

ComponentInstanceI18NTable

public ComponentInstanceI18NTable(OrganizationSchema organization)
Method Detail

fetchTranslation

protected ComponentInstanceI18NRow fetchTranslation(ResultSet rs)
                                             throws SQLException
Fetch the current component row from a resultSet.

Parameters:
rs -
Returns:
the current component row from a resultSet.
Throws:
SQLException

getTranslations

public List<ComponentInstanceI18NRow> getTranslations(int componentId)
                                               throws AdminPersistenceException
Returns the Component whith the given id.

Parameters:
componentId -
Returns:
the Component whith the given id.
Throws:
AdminPersistenceException

createTranslation

public void createTranslation(ComponentInstanceI18NRow translation)
                       throws AdminPersistenceException
Inserts in the database a new component row.

Parameters:
translation -
Throws:
AdminPersistenceException

prepareInsert

protected void prepareInsert(String insertQuery,
                             PreparedStatement insert,
                             ComponentInstanceI18NRow 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<ComponentInstanceI18NRow>
Throws:
SQLException

updateTranslation

public void updateTranslation(ComponentInstanceI18NRow component)
                       throws AdminPersistenceException
Updates a component row.

Parameters:
component -
Throws:
AdminPersistenceException

prepareUpdate

protected void prepareUpdate(String updateQuery,
                             PreparedStatement update,
                             ComponentInstanceI18NRow 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<ComponentInstanceI18NRow>
Throws:
SQLException

removeTranslation

public void removeTranslation(int id)
                       throws AdminPersistenceException
Delete a translation.

Parameters:
id -
Throws:
AdminPersistenceException

removeTranslations

public void removeTranslations(int componentId)
                        throws AdminPersistenceException
Delete all component's translations.

Parameters:
componentId -
Throws:
AdminPersistenceException

fetchRow

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

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


Copyright © 2016 Silverpeas. All Rights Reserved.