Class DomainTable
- java.lang.Object
-
- org.silverpeas.core.persistence.jdbc.AbstractTable<T>
-
- org.silverpeas.core.admin.persistence.Table<DomainRow>
-
- org.silverpeas.core.admin.persistence.DomainTable
-
@Repository public class DomainTable extends Table<DomainRow>
A DomainTable object manages the ST_Domain table.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createDomain(DomainRow domain)
Insert a new domain row.protected DomainRow
fetchDomain(ResultSet rs)
Fetch the current domain row from a resultSet.protected DomainRow
fetchRow(ResultSet rs)
Fetch the current domain row from a resultSet.DomainRow[]
getAllDomains()
Returns all the Domains.DomainRow
getDomain(int id)
Returns the domain whith the given id.protected void
prepareInsert(String insertQuery, PreparedStatement insert, DomainRow row)
protected void
prepareUpdate(String updateQuery, PreparedStatement update, DomainRow row)
void
removeDomain(int id)
Delete the domainvoid
updateDomain(DomainRow domain)
Updates a domain row.-
Methods inherited from class org.silverpeas.core.admin.persistence.Table
addIdToQuery, addParamToQuery, addParamToQuery, aliasColumns, checkGroupExistence, checkUserExistence, getCount, getCount, getIds, getIds, getIds, getIds, getNotNullString, getRows, performPrepareStatementParams, updateRelation
-
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
-
-
-
-
Method Detail
-
fetchDomain
protected DomainRow fetchDomain(ResultSet rs) throws SQLException
Fetch the current domain row from a resultSet.- Parameters:
rs
-- Returns:
- the current domain row from a resultSet.
- Throws:
SQLException
-
getDomain
public DomainRow getDomain(int id) throws SQLException
Returns the domain whith the given id.- Parameters:
id
-- Returns:
- the domain whith the given id.
- Throws:
SQLException
-
getAllDomains
public DomainRow[] getAllDomains() throws SQLException
Returns all the Domains.- Returns:
- all the Domains.
- Throws:
SQLException
-
createDomain
public void createDomain(DomainRow domain) throws SQLException
Insert a new domain row.- Parameters:
domain
-- Throws:
SQLException
-
prepareInsert
protected void prepareInsert(String insertQuery, PreparedStatement insert, DomainRow row) throws SQLException
- Specified by:
prepareInsert
in classAbstractTable<DomainRow>
- Throws:
SQLException
-
updateDomain
public void updateDomain(DomainRow domain) throws SQLException
Updates a domain row.- Parameters:
domain
-- Throws:
SQLException
-
prepareUpdate
protected void prepareUpdate(String updateQuery, PreparedStatement update, DomainRow row) throws SQLException
- Specified by:
prepareUpdate
in classAbstractTable<DomainRow>
- Throws:
SQLException
-
removeDomain
public void removeDomain(int id) throws SQLException
Delete the domain- Parameters:
id
-- Throws:
SQLException
-
fetchRow
protected DomainRow fetchRow(ResultSet rs) throws SQLException
Fetch the current domain row from a resultSet.- Specified by:
fetchRow
in classAbstractTable<DomainRow>
- Parameters:
rs
- the result set from which the row will be fetched.- Returns:
- the entity in the row.
- Throws:
SQLException
- on SQL error.
-
-