de.hs_rm.cs.lecturenotes.server.core.persistence.factory
Interface IEntityFactory<T>

Type Parameters:
T - Entity object a concrete class will handle
All Known Implementing Classes:
AnnotationFactory, ExerciseFactory, FilecardFactory, LectureFactory, ParagraphFactory, SlideFactory, UserFactory

public interface IEntityFactory<T>

This interface describes the DAO abstract factory pattern for entities.

Version:
$LastChangedRevision: 231 $
Author:
Enrico Homann

Method Summary
 java.sql.PreparedStatement createPreparedStatementInsertFromEntity(java.sql.Connection conn, T entity)
          Creates a PreparedStatement for insert purpose.
 T createProductFromResultSet(SQLConnection conn, java.sql.ResultSet rs)
          Creates the Entity Product from a given ResultSet.
 

Method Detail

createProductFromResultSet

T createProductFromResultSet(SQLConnection conn,
                             java.sql.ResultSet rs)
Creates the Entity Product from a given ResultSet. Connection conn may be used for inner connections.

Parameters:
conn - SQLConnection
rs - ResultSet
Returns:
T

createPreparedStatementInsertFromEntity

java.sql.PreparedStatement createPreparedStatementInsertFromEntity(java.sql.Connection conn,
                                                                   T entity)
                                                                   throws java.sql.SQLException
Creates a PreparedStatement for insert purpose.

Parameters:
conn - Connection of the JDBC
entity - T Entity
Returns:
PreparedStatement to be used with the JDBC
Throws:
java.sql.SQLException - Exception possibly thrown