com.stratelia.silverpeas.portlet.model
Class PortletRowTable

java.lang.Object
  extended by com.stratelia.webactiv.util.AbstractTable<PortletRowRow>
      extended by com.stratelia.silverpeas.portlet.model.PortletRowTable

public class PortletRowTable
extends AbstractTable<PortletRowRow>


Field Summary
protected static String PORTLETROW_COLUMNS
          The column list used for every select query.
 
Fields inherited from class com.stratelia.webactiv.util.AbstractTable
schema
 
Constructor Summary
PortletRowTable(Schema schema)
          Builds a new PortletRowTable
 
Method Summary
 int create(PortletRowRow portletRow)
          Inserts in the database a new PortletRow row.
 void delete(int id)
          Deletes thePortletRowRow. after having removed all the reference to it.
 PortletRowRow[] dereferenceInstanceId(int InstanceId)
          Removes a reference to InstanceId
 PortletRowRow[] dereferencePortletColumnId(int portletColumnId)
          Removes a reference to PortletColumnId
protected  PortletRowRow fetchRow(ResultSet rs)
          Fetch the current PortletRow row from a resultSet.
 PortletRowRow[] getAllByInstanceId(int instanceId)
          Returns all the PortletRowRow having a given instanceId
 PortletRowRow[] getAllByPortletColumnId(int portletColumnId)
          Returns all the PortletRowRow having a given portletColumnId
 PortletRowRow[] getAllByPortletColumnId(int aPortletColumnId, String orderField)
          Returns all the PortletRow rows having a given portletColumnId
 PortletRowRow[] getAllRows()
          Returns all the rows.
 PortletRowRow getPortletRow(int id)
          Returns the unique PortletRow row having a given id
 PortletRowRow getPortletRow(String query)
          Returns the unique row given by a no parameters query.
 PortletRowRow[] getPortletRows(String query)
          Returns all the rows given by a no parameters query.
protected  void prepareInsert(String insertQuery, PreparedStatement insert, PortletRowRow row)
          Prepares the statement to insert the given row
protected  void prepareUpdate(String updateQuery, PreparedStatement update, PortletRowRow row)
          Prepares the statement to update the given row
 void save(PortletRowRow portletRow)
          Updates thePortletRow row. or inserts it if new.
 void update(PortletRowRow portletRow)
          Update the given PortletRowRow
 
Methods inherited from class com.stratelia.webactiv.util.AbstractTable
aliasColumns, getInteger, getInteger, getMatchingRows, getNextId, getRows, getRows, getRows, getRows, getRows, getRows, getRows, getUniqueRow, getUniqueRow, getUniqueRow, getUniqueRow, getUniqueRow, getUniqueRow, getUniqueRow, insertRow, truncate, updateRelation, updateRelation, updateRow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PORTLETROW_COLUMNS

protected static final String PORTLETROW_COLUMNS
The column list used for every select query.

See Also:
Constant Field Values
Constructor Detail

PortletRowTable

public PortletRowTable(Schema schema)
Builds a new PortletRowTable

Method Detail

getPortletRow

public PortletRowRow getPortletRow(int id)
                            throws UtilException
Returns the unique PortletRow row having a given id

Throws:
UtilException

getAllByPortletColumnId

public PortletRowRow[] getAllByPortletColumnId(int aPortletColumnId,
                                               String orderField)
                                        throws UtilException
Returns all the PortletRow rows having a given portletColumnId

Throws:
UtilException

getAllByInstanceId

public PortletRowRow[] getAllByInstanceId(int instanceId)
                                   throws UtilException
Returns all the PortletRowRow having a given instanceId

Throws:
UtilException

getAllByPortletColumnId

public PortletRowRow[] getAllByPortletColumnId(int portletColumnId)
                                        throws UtilException
Returns all the PortletRowRow having a given portletColumnId

Throws:
UtilException

getAllRows

public PortletRowRow[] getAllRows()
                           throws UtilException
Returns all the rows.

Throws:
UtilException

getPortletRow

public PortletRowRow getPortletRow(String query)
                            throws UtilException
Returns the unique row given by a no parameters query.

Throws:
UtilException

getPortletRows

public PortletRowRow[] getPortletRows(String query)
                               throws UtilException
Returns all the rows given by a no parameters query.

Throws:
UtilException

create

public int create(PortletRowRow portletRow)
           throws UtilException
Inserts in the database a new PortletRow row.

Throws:
UtilException

update

public void update(PortletRowRow portletRow)
            throws UtilException
Update the given PortletRowRow

Throws:
UtilException

save

public void save(PortletRowRow portletRow)
          throws UtilException
Updates thePortletRow row. or inserts it if new.

Throws:
UtilException

delete

public void delete(int id)
            throws UtilException
Deletes thePortletRowRow. after having removed all the reference to it.

Throws:
UtilException

dereferenceInstanceId

public PortletRowRow[] dereferenceInstanceId(int InstanceId)
                                      throws UtilException
Removes a reference to InstanceId

Throws:
UtilException

dereferencePortletColumnId

public PortletRowRow[] dereferencePortletColumnId(int portletColumnId)
                                           throws UtilException
Removes a reference to PortletColumnId

Throws:
UtilException

fetchRow

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

Specified by:
fetchRow in class AbstractTable<PortletRowRow>
Throws:
SQLException

prepareUpdate

protected void prepareUpdate(String updateQuery,
                             PreparedStatement update,
                             PortletRowRow row)
                      throws SQLException
Prepares the statement to update the given row

Specified by:
prepareUpdate in class AbstractTable<PortletRowRow>
Throws:
SQLException

prepareInsert

protected void prepareInsert(String insertQuery,
                             PreparedStatement insert,
                             PortletRowRow row)
                      throws SQLException
Prepares the statement to insert the given row

Specified by:
prepareInsert in class AbstractTable<PortletRowRow>
Throws:
SQLException


Copyright © 2016 Silverpeas. All Rights Reserved.