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

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

public final class ParagraphFactory
extends java.lang.Object
implements IEntityFactory<Paragraph>

Version:
$LastChangedRevision: 266 $
Author:
Enrico Homann

Constructor Summary
ParagraphFactory()
           
 
Method Summary
 java.sql.PreparedStatement createPreparedStatementInsertFromEntity(java.sql.Connection conn, Paragraph entity)
          Creates a PreparedStatement for insert purpose.
 Paragraph createProductFromResultSet(SQLConnection conn, java.sql.ResultSet rs)
          Creates the Entity Product from a given ResultSet.
static ParagraphFactory 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

ParagraphFactory

public ParagraphFactory()
Method Detail

getInstance

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

Returns:
ParagraphFactory

createProductFromResultSet

public Paragraph 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<Paragraph>
Parameters:
conn - SQLConnection
rs - ResultSet
Returns:
T

createPreparedStatementInsertFromEntity

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

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