de.hs_rm.cs.lecturenotes.server.core.persistence.factory
Class AnnotationFactory

java.lang.Object
  extended by de.hs_rm.cs.lecturenotes.server.core.persistence.factory.AnnotationFactory
All Implemented Interfaces:
IEntityFactory<Annotation>

public final class AnnotationFactory
extends java.lang.Object
implements IEntityFactory<Annotation>

Concrete abstract DAO factory for entity Annotation.

Author:
Enrico Homann

Constructor Summary
AnnotationFactory()
           
 
Method Summary
 java.sql.PreparedStatement createPreparedStatementInsertFromEntity(java.sql.Connection conn, Annotation entity)
          Creates a PreparedStatement for insert purpose.
 Annotation createProductFromResultSet(SQLConnection conn, java.sql.ResultSet rs)
          Creates the Entity Product from a given ResultSet.
static AnnotationFactory getInstance()
          Returns the Singleton for this Factory.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationFactory

public AnnotationFactory()
Method Detail

getInstance

public static AnnotationFactory getInstance()
Returns the Singleton for this Factory.

Returns:
AnnotationFactory

createProductFromResultSet

public Annotation createProductFromResultSet(SQLConnection conn,
                                             java.sql.ResultSet rs)
Description copied from interface: IEntityFactory
Creates the Entity Product from a given ResultSet. Connection conn may be used for inner connections.

Specified by:
createProductFromResultSet in interface IEntityFactory<Annotation>
Parameters:
conn - SQLConnection
rs - ResultSet
Returns:
T

createPreparedStatementInsertFromEntity

public java.sql.PreparedStatement createPreparedStatementInsertFromEntity(java.sql.Connection conn,
                                                                          Annotation entity)
                                                                   throws java.sql.SQLException
Description copied from interface: IEntityFactory
Creates a PreparedStatement for insert purpose.

Specified by:
createPreparedStatementInsertFromEntity in interface IEntityFactory<Annotation>
Parameters:
conn - Connection of the JDBC
entity - T Entity
Returns:
PreparedStatement to be used with the JDBC
Throws:
java.sql.SQLException - Exception possibly thrown