Class NotifDefaultAddressTable
- java.lang.Object
-
- org.silverpeas.core.persistence.jdbc.AbstractTable<NotifDefaultAddressRow>
-
- org.silverpeas.core.notification.user.client.model.NotifDefaultAddressTable
-
@Repository public class NotifDefaultAddressTable extends AbstractTable<NotifDefaultAddressRow>
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
NOTIFDEFAULTADDRESS_COLUMNS
The column list used for every select query.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
create(NotifDefaultAddressRow notifDefaultAddress)
Inserts in the database a new NotifDefaultAddress row.void
delete(int id)
Deletes theNotifDefaultAddressRow. after having removed all the reference to it.void
dereferenceUserId(int userId)
Removes a reference to UserIdprotected NotifDefaultAddressRow
fetchRow(ResultSet rs)
Fetch the current NotifDefaultAddress row from a resultSet.NotifDefaultAddressRow[]
getAllByUserId(int userId)
Returns all the NotifDefaultAddressRow having a given userIdNotifDefaultAddressRow[]
getAllRows()
Returns all the rows.NotifDefaultAddressRow
getNotifDefaultAddress(int id)
Returns the unique NotifDefaultAddress row having a given idNotifDefaultAddressRow
getNotifDefaultAddress(String query)
Returns the unique row given by a no parameters query.NotifDefaultAddressRow[]
getNotifDefaultAddresss(String query)
Returns all the rows given by a no parameters query.protected void
prepareInsert(String insertQuery, PreparedStatement insert, NotifDefaultAddressRow r)
Prepares the statement to insert the given rowprotected void
prepareUpdate(String updateQuery, PreparedStatement update, NotifDefaultAddressRow r)
Prepares the statement to update the given rowvoid
save(NotifDefaultAddressRow notifDefaultAddress)
Updates theNotifDefaultAddress row. or inserts it if new.void
update(NotifDefaultAddressRow notifDefaultAddress)
Update the given NotifDefaultAddressRow-
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
-
NOTIFDEFAULTADDRESS_COLUMNS
protected static final String NOTIFDEFAULTADDRESS_COLUMNS
The column list used for every select query.- See Also:
- Constant Field Values
-
-
Method Detail
-
getNotifDefaultAddress
public NotifDefaultAddressRow getNotifDefaultAddress(int id) throws SQLException
Returns the unique NotifDefaultAddress row having a given id- Throws:
SQLException
-
getAllByUserId
public NotifDefaultAddressRow[] getAllByUserId(int userId) throws SQLException
Returns all the NotifDefaultAddressRow having a given userId- Throws:
SQLException
-
getAllRows
public NotifDefaultAddressRow[] getAllRows() throws SQLException
Returns all the rows.- Throws:
SQLException
-
getNotifDefaultAddress
public NotifDefaultAddressRow getNotifDefaultAddress(String query) throws SQLException
Returns the unique row given by a no parameters query.- Throws:
SQLException
-
getNotifDefaultAddresss
public NotifDefaultAddressRow[] getNotifDefaultAddresss(String query) throws SQLException
Returns all the rows given by a no parameters query.- Throws:
SQLException
-
create
public int create(NotifDefaultAddressRow notifDefaultAddress) throws SQLException
Inserts in the database a new NotifDefaultAddress row.- Throws:
SQLException
-
update
public void update(NotifDefaultAddressRow notifDefaultAddress) throws SQLException
Update the given NotifDefaultAddressRow- Throws:
SQLException
-
save
public void save(NotifDefaultAddressRow notifDefaultAddress) throws SQLException
Updates theNotifDefaultAddress row. or inserts it if new.- Throws:
SQLException
-
delete
public void delete(int id) throws SQLException
Deletes theNotifDefaultAddressRow. after having removed all the reference to it.- Throws:
SQLException
-
dereferenceUserId
public void dereferenceUserId(int userId) throws SQLException
Removes a reference to UserId- Throws:
SQLException
-
fetchRow
protected NotifDefaultAddressRow fetchRow(ResultSet rs) throws SQLException
Fetch the current NotifDefaultAddress row from a resultSet.- Specified by:
fetchRow
in classAbstractTable<NotifDefaultAddressRow>
- 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, NotifDefaultAddressRow r) throws SQLException
Prepares the statement to update the given row- Specified by:
prepareUpdate
in classAbstractTable<NotifDefaultAddressRow>
- Throws:
SQLException
-
prepareInsert
protected void prepareInsert(String insertQuery, PreparedStatement insert, NotifDefaultAddressRow r) throws SQLException
Prepares the statement to insert the given row- Specified by:
prepareInsert
in classAbstractTable<NotifDefaultAddressRow>
- Throws:
SQLException
-
-