Class NotifChannelTable
- java.lang.Object
-
- org.silverpeas.core.persistence.jdbc.AbstractTable<NotifChannelRow>
-
- org.silverpeas.core.notification.user.client.model.NotifChannelTable
-
@Repository public class NotifChannelTable extends AbstractTable<NotifChannelRow>
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
NOTIFCHANNEL_COLUMNS
The column list used for every select query.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
create(NotifChannelRow notifChannel)
Inserts in the database a new NotifChannel row.void
delete(int id)
Deletes theNotifChannelRow. after having removed all the reference to it.protected NotifChannelRow
fetchRow(ResultSet rs)
Fetch the current NotifChannel row from a resultSet.NotifChannelRow[]
getAllRows()
Returns all the rows.NotifChannelRow
getNotifChannel(int id)
Returns the unique NotifChannel row having a given idNotifChannelRow
getNotifChannel(String query)
Returns the unique row given by a no parameters query.NotifChannelRow[]
getNotifChannels(String query)
Returns all the rows given by a no parameters query.protected void
prepareInsert(String insertQuery, PreparedStatement insert, NotifChannelRow r)
Prepares the statement to insert the given rowprotected void
prepareUpdate(String updateQuery, PreparedStatement update, NotifChannelRow r)
Prepares the statement to update the given rowvoid
save(NotifChannelRow notifChannel)
Updates theNotifChannel row. or inserts it if new.void
update(NotifChannelRow notifChannel)
Update the given NotifChannelRow-
Methods inherited from class org.silverpeas.core.persistence.jdbc.AbstractTable
getInteger, getInteger, getMatchingRows, getNextId, getRows, getRows, getRows, getRows, getRows, getRows, getRows, getUniqueRow, getUniqueRow, getUniqueRow, getUniqueRow, getUniqueRow, getUniqueRow, getUniqueRow, insertRow, truncate, updateRelation, updateRelation, updateRow
-
-
-
-
Field Detail
-
NOTIFCHANNEL_COLUMNS
protected static final String NOTIFCHANNEL_COLUMNS
The column list used for every select query.- See Also:
- Constant Field Values
-
-
Method Detail
-
getNotifChannel
public NotifChannelRow getNotifChannel(int id) throws SQLException
Returns the unique NotifChannel row having a given id- Throws:
SQLException
-
getAllRows
public NotifChannelRow[] getAllRows() throws SQLException
Returns all the rows.- Throws:
SQLException
-
getNotifChannel
public NotifChannelRow getNotifChannel(String query) throws SQLException
Returns the unique row given by a no parameters query.- Throws:
SQLException
-
getNotifChannels
public NotifChannelRow[] getNotifChannels(String query) throws SQLException
Returns all the rows given by a no parameters query.- Throws:
SQLException
-
create
public int create(NotifChannelRow notifChannel) throws SQLException
Inserts in the database a new NotifChannel row.- Throws:
SQLException
-
update
public void update(NotifChannelRow notifChannel) throws SQLException
Update the given NotifChannelRow- Throws:
SQLException
-
save
public void save(NotifChannelRow notifChannel) throws SQLException
Updates theNotifChannel row. or inserts it if new.- Throws:
SQLException
-
delete
public void delete(int id) throws SQLException
Deletes theNotifChannelRow. after having removed all the reference to it.- Throws:
SQLException
-
fetchRow
protected NotifChannelRow fetchRow(ResultSet rs) throws SQLException
Fetch the current NotifChannel row from a resultSet.- Specified by:
fetchRow
in classAbstractTable<NotifChannelRow>
- Parameters:
rs
- the result set from which the row will be fetched.- Returns:
- the entity in the row.
- Throws:
SQLException
- on SQL error.
-
prepareUpdate
protected void prepareUpdate(String updateQuery, PreparedStatement update, NotifChannelRow r) throws SQLException
Prepares the statement to update the given row- Specified by:
prepareUpdate
in classAbstractTable<NotifChannelRow>
- Throws:
SQLException
-
prepareInsert
protected void prepareInsert(String insertQuery, PreparedStatement insert, NotifChannelRow r) throws SQLException
Prepares the statement to insert the given row- Specified by:
prepareInsert
in classAbstractTable<NotifChannelRow>
- Throws:
SQLException
-
-