com.stratelia.silverpeas.notificationManager.model
Class NotifAddressTable

java.lang.Object
  extended by com.stratelia.webactiv.util.AbstractTable<NotifAddressRow>
      extended by com.stratelia.silverpeas.notificationManager.model.NotifAddressTable

public class NotifAddressTable
extends AbstractTable<NotifAddressRow>


Field Summary
protected static String NOTIFADDRESS_COLUMNS
          The column list used for every select query.
 
Fields inherited from class com.stratelia.webactiv.util.AbstractTable
schema
 
Constructor Summary
NotifAddressTable(Schema schema)
          Builds a new NotifAddressTable
 
Method Summary
 int create(NotifAddressRow notifAddress)
          Inserts in the database a new NotifAddress row.
 void delete(int id)
          Deletes theNotifAddressRow. after having removed all the reference to it.
 void deleteAndPropagate(int notifAddressId, int defaultAddress)
           
 void dereferenceNotifChannelId(int notifChannelId)
          Removes a reference to NotifChannelId
 void dereferenceUserId(int userId)
          Removes a reference to UserId
protected  NotifAddressRow fetchRow(ResultSet rs)
          Fetch the current NotifAddress row from a resultSet.
 NotifAddressRow[] getAllByNotifChannelId(int notifChannelId)
          Returns all the NotifAddressRow having a given notifChannelId
 NotifAddressRow[] getAllByUserId(int userId)
          Returns all the NotifAddressRow having a given userId
 NotifAddressRow[] getAllByUserId(int aUserId, String orderField)
          Returns all the NotifAddress rows having a given userId
 NotifAddressRow[] getAllRows()
          Returns all the rows.
 NotifAddressRow getNotifAddress(int id)
          Returns the unique NotifAddress row having a given id
 NotifAddressRow getNotifAddress(String query)
          Returns the unique row given by a no parameters query.
 NotifAddressRow[] getNotifAddresss(String query)
          Returns all the rows given by a no parameters query.
protected  void prepareInsert(String insertQuery, PreparedStatement insert, NotifAddressRow row)
          Prepares the statement to insert the given row
protected  void prepareUpdate(String updateQuery, PreparedStatement update, NotifAddressRow row)
          Prepares the statement to update the given row
 void save(NotifAddressRow notifAddress)
          Updates theNotifAddress row. or inserts it if new.
 void update(NotifAddressRow notifAddress)
          Update the given NotifAddressRow
 
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

NOTIFADDRESS_COLUMNS

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

See Also:
Constant Field Values
Constructor Detail

NotifAddressTable

public NotifAddressTable(Schema schema)
Builds a new NotifAddressTable

Method Detail

getNotifAddress

public NotifAddressRow getNotifAddress(int id)
                                throws UtilException
Returns the unique NotifAddress row having a given id

Throws:
UtilException

getAllByUserId

public NotifAddressRow[] getAllByUserId(int aUserId,
                                        String orderField)
                                 throws UtilException
Returns all the NotifAddress rows having a given userId

Throws:
UtilException

getAllByNotifChannelId

public NotifAddressRow[] getAllByNotifChannelId(int notifChannelId)
                                         throws UtilException
Returns all the NotifAddressRow having a given notifChannelId

Throws:
UtilException

getAllByUserId

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

Throws:
UtilException

getAllRows

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

Throws:
UtilException

getNotifAddress

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

Throws:
UtilException

getNotifAddresss

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

Throws:
UtilException

create

public int create(NotifAddressRow notifAddress)
           throws UtilException
Inserts in the database a new NotifAddress row.

Throws:
UtilException

update

public void update(NotifAddressRow notifAddress)
            throws UtilException
Update the given NotifAddressRow

Throws:
UtilException

save

public void save(NotifAddressRow notifAddress)
          throws UtilException
Updates theNotifAddress row. or inserts it if new.

Throws:
UtilException

delete

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

Throws:
UtilException

dereferenceNotifChannelId

public void dereferenceNotifChannelId(int notifChannelId)
                               throws UtilException
Removes a reference to NotifChannelId

Throws:
UtilException

dereferenceUserId

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

Throws:
UtilException

fetchRow

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

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

prepareUpdate

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

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

prepareInsert

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

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

deleteAndPropagate

public void deleteAndPropagate(int notifAddressId,
                               int defaultAddress)
                        throws UtilException
Throws:
UtilException


Copyright © 2016 Silverpeas. All Rights Reserved.