com.stratelia.silverpeas.portlet.model
Class PortletStateTable

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

public class PortletStateTable
extends AbstractTable<PortletStateRow>


Field Summary
protected static String PORTLETSTATE_COLUMNS
          The column list used for every select query.
 
Fields inherited from class com.stratelia.webactiv.util.AbstractTable
schema
 
Constructor Summary
PortletStateTable(Schema schema)
          Builds a new PortletStateTable
 
Method Summary
 int create(PortletStateRow portletState)
          Inserts in the database a new PortletState row.
 void delete(int id)
          Deletes thePortletStateRow. after having removed all the reference to it.
 void dereferencePortletRowId(int portletRowId)
          Removes a reference to PortletRowId
 void dereferenceUserId(int userId)
          Removes a reference to UserId
protected  PortletStateRow fetchRow(ResultSet rs)
          Fetch the current PortletState row from a resultSet.
 PortletStateRow[] getAllByPortletRowId(int portletRowId)
          Returns all the PortletStateRow having a given portletRowId
 PortletStateRow[] getAllByPortletRowId(int aPortletRowId, String orderField)
          Returns all the PortletState rows having a given portletRowId
 PortletStateRow[] getAllByUserId(int userId)
          Returns all the PortletStateRow having a given userId
 PortletStateRow[] getAllRows()
          Returns all the rows.
 PortletStateRow getPortletState(int id)
          Returns the unique PortletState row having a given id
 PortletStateRow getPortletState(String query)
          Returns the unique row given by a no parameters query.
 PortletStateRow[] getPortletStates(String query)
          Returns all the rows given by a no parameters query.
protected  void prepareInsert(String insertQuery, PreparedStatement insert, PortletStateRow row)
          Prepares the statement to insert the given row
protected  void prepareUpdate(String updateQuery, PreparedStatement update, PortletStateRow row)
          Prepares the statement to update the given row
 void save(PortletStateRow portletState)
          Updates thePortletState row. or inserts it if new.
 void update(PortletStateRow portletState)
          Update the given PortletStateRow
 
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

PORTLETSTATE_COLUMNS

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

See Also:
Constant Field Values
Constructor Detail

PortletStateTable

public PortletStateTable(Schema schema)
Builds a new PortletStateTable

Method Detail

getPortletState

public PortletStateRow getPortletState(int id)
                                throws UtilException
Returns the unique PortletState row having a given id

Throws:
UtilException

getAllByPortletRowId

public PortletStateRow[] getAllByPortletRowId(int aPortletRowId,
                                              String orderField)
                                       throws UtilException
Returns all the PortletState rows having a given portletRowId

Throws:
UtilException

getAllByPortletRowId

public PortletStateRow[] getAllByPortletRowId(int portletRowId)
                                       throws UtilException
Returns all the PortletStateRow having a given portletRowId

Throws:
UtilException

getAllByUserId

public PortletStateRow[] getAllByUserId(int userId)
                                 throws UtilException
Returns all the PortletStateRow having a given userId

Throws:
UtilException

getAllRows

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

Throws:
UtilException

getPortletState

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

Throws:
UtilException

getPortletStates

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

Throws:
UtilException

create

public int create(PortletStateRow portletState)
           throws UtilException
Inserts in the database a new PortletState row.

Throws:
UtilException

update

public void update(PortletStateRow portletState)
            throws UtilException
Update the given PortletStateRow

Throws:
UtilException

save

public void save(PortletStateRow portletState)
          throws UtilException
Updates thePortletState row. or inserts it if new.

Throws:
UtilException

delete

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

Throws:
UtilException

dereferencePortletRowId

public void dereferencePortletRowId(int portletRowId)
                             throws UtilException
Removes a reference to PortletRowId

Throws:
UtilException

dereferenceUserId

public void dereferenceUserId(int userId)
                       throws UtilException
Removes a reference to UserId

Throws:
UtilException

fetchRow

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

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

prepareUpdate

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

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

prepareInsert

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

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


Copyright © 2016 Silverpeas. All Rights Reserved.