Class SilverpeasBeanDAOImpl<T extends SilverpeasBeanIntf>
- java.lang.Object
-
- org.silverpeas.core.persistence.jdbc.bean.SilverpeasBeanDAOImpl<T>
-
- Type Parameters:
T
- the concrete type of the persistent bean in Silverpeas.
- All Implemented Interfaces:
SilverpeasBeanDAO<T>
@Deprecated(forRemoval=false) public class SilverpeasBeanDAOImpl<T extends SilverpeasBeanIntf> extends Object implements SilverpeasBeanDAO<T>
Deprecated.Implementation of the previous custom persistence layer (before JPA).
-
-
Field Summary
-
Fields inherited from interface org.silverpeas.core.persistence.jdbc.bean.SilverpeasBeanDAO
CONNECTION_TYPE_DATASOURCE, CONNECTION_TYPE_DATASOURCE_SILVERPEAS, CONNECTION_TYPE_EJBDATASOURCE_SILVERPEAS, CONNECTION_TYPE_JDBC_CLASSIC
-
-
Constructor Summary
Constructors Constructor Description SilverpeasBeanDAOImpl(String beanClassName)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description WAPrimaryKey
add(Connection connection, T bean)
Deprecated.WAPrimaryKey
add(T bean)
Deprecated.create the bean and a row in DB.T
findByPrimaryKey(Connection connection, WAPrimaryKey pk)
Deprecated.T
findByPrimaryKey(WAPrimaryKey pk)
Deprecated.get a bean representing a row in db from its pkCollection<T>
findByWhereClause(Connection connection, WAPrimaryKey pk, String whereClause)
Deprecated.Collection<T>
findByWhereClause(WAPrimaryKey pk, String whereClause)
Deprecated.get a bean list, representing a specific row selection.void
remove(Connection connection, WAPrimaryKey pk)
Deprecated.void
remove(WAPrimaryKey pk)
Deprecated.remove the row in db represented by the primary key.void
removeWhere(Connection connection, WAPrimaryKey pk, String whereClause)
Deprecated.void
removeWhere(WAPrimaryKey pk, String whereClause)
Deprecated.remove all row in db represented by the where clause.void
update(Connection connection, T bean)
Deprecated.void
update(T bean)
Deprecated.update the row in db with the new bean properties.
-
-
-
Constructor Detail
-
SilverpeasBeanDAOImpl
public SilverpeasBeanDAOImpl(String beanClassName) throws PersistenceException
Deprecated.- Throws:
PersistenceException
-
-
Method Detail
-
remove
public void remove(WAPrimaryKey pk) throws PersistenceException
Deprecated.Description copied from interface:SilverpeasBeanDAO
remove the row in db represented by the primary key.- Specified by:
remove
in interfaceSilverpeasBeanDAO<T extends SilverpeasBeanIntf>
- Parameters:
pk
- the SilverpeasBeanIntf to update, with a primaryKey initialized with only spaceId and componentId.- Throws:
PersistenceException
- if the deletion fails.
-
remove
public void remove(Connection connection, WAPrimaryKey pk) throws PersistenceException
Deprecated.- Specified by:
remove
in interfaceSilverpeasBeanDAO<T extends SilverpeasBeanIntf>
- Throws:
PersistenceException
-
removeWhere
public void removeWhere(WAPrimaryKey pk, String whereClause) throws PersistenceException
Deprecated.Description copied from interface:SilverpeasBeanDAO
remove all row in db represented by the where clause.- Specified by:
removeWhere
in interfaceSilverpeasBeanDAO<T extends SilverpeasBeanIntf>
- Parameters:
pk
- the specific identifierwhereClause
- the where clause.- Throws:
PersistenceException
- if the deletion fails.
-
removeWhere
public void removeWhere(Connection connection, WAPrimaryKey pk, String whereClause) throws PersistenceException
Deprecated.- Specified by:
removeWhere
in interfaceSilverpeasBeanDAO<T extends SilverpeasBeanIntf>
- Throws:
PersistenceException
-
update
public void update(T bean) throws PersistenceException
Deprecated.Description copied from interface:SilverpeasBeanDAO
update the row in db with the new bean properties.- Specified by:
update
in interfaceSilverpeasBeanDAO<T extends SilverpeasBeanIntf>
- Parameters:
bean
- the SilverpeasBean to update, with its complete primaryKey.- Throws:
PersistenceException
- if the update fails.
-
update
public void update(Connection connection, T bean) throws PersistenceException
Deprecated.- Specified by:
update
in interfaceSilverpeasBeanDAO<T extends SilverpeasBeanIntf>
- Throws:
PersistenceException
-
add
public WAPrimaryKey add(T bean) throws PersistenceException
Deprecated.Description copied from interface:SilverpeasBeanDAO
create the bean and a row in DB.- Specified by:
add
in interfaceSilverpeasBeanDAO<T extends SilverpeasBeanIntf>
- Parameters:
bean
- the SilverpeasBeanIntf to update, with a primaryKey initialized with only spaceId and componentId.- Returns:
- The complete primary key, with the id.
- Throws:
PersistenceException
- if the creation fails.
-
add
public WAPrimaryKey add(Connection connection, T bean) throws PersistenceException
Deprecated.- Specified by:
add
in interfaceSilverpeasBeanDAO<T extends SilverpeasBeanIntf>
- Throws:
PersistenceException
-
findByPrimaryKey
public T findByPrimaryKey(WAPrimaryKey pk) throws PersistenceException
Deprecated.Description copied from interface:SilverpeasBeanDAO
get a bean representing a row in db from its pk- Specified by:
findByPrimaryKey
in interfaceSilverpeasBeanDAO<T extends SilverpeasBeanIntf>
- Parameters:
pk
- the complete beans primary key- Returns:
- The SilverpeasBeanIntfs corresponding to the pk, null if not found
- Throws:
PersistenceException
- if the finding fails.
-
findByPrimaryKey
public T findByPrimaryKey(Connection connection, WAPrimaryKey pk) throws PersistenceException
Deprecated.- Specified by:
findByPrimaryKey
in interfaceSilverpeasBeanDAO<T extends SilverpeasBeanIntf>
- Throws:
PersistenceException
-
findByWhereClause
public Collection<T> findByWhereClause(WAPrimaryKey pk, String whereClause) throws PersistenceException
Deprecated.Description copied from interface:SilverpeasBeanDAO
get a bean list, representing a specific row selection.- Specified by:
findByWhereClause
in interfaceSilverpeasBeanDAO<T extends SilverpeasBeanIntf>
- Parameters:
pk
- the beans primary key initialized with at least spaceId and componentId.whereClause
- The where clause to put in select request. If null, all SilverpeasBeanIntfs will be selected (all rows in the table).- Returns:
- The list of SilverpeasBeanIntfs corresponding to the where clause
- Throws:
PersistenceException
- if the finding fails.
-
findByWhereClause
public Collection<T> findByWhereClause(Connection connection, WAPrimaryKey pk, String whereClause) throws PersistenceException
Deprecated.- Specified by:
findByWhereClause
in interfaceSilverpeasBeanDAO<T extends SilverpeasBeanIntf>
- Throws:
PersistenceException
-
-