org.opensubsystems.blog.persist.db
Class BlogDatabaseFactory

java.lang.Object
  extended by org.opensubsystems.core.persist.db.DatabaseFactoryImpl
      extended by org.opensubsystems.blog.persist.db.BlogDatabaseFactory
All Implemented Interfaces:
BlogFactory, org.opensubsystems.core.persist.BasicDataFactory, org.opensubsystems.core.persist.DataFactory, org.opensubsystems.core.persist.db.BasicDatabaseFactory, org.opensubsystems.core.persist.db.DatabaseFactory, org.opensubsystems.core.persist.db.ModifiableDatabaseFactory, org.opensubsystems.core.persist.ModifiableDataFactory

public class BlogDatabaseFactory
extends org.opensubsystems.core.persist.db.DatabaseFactoryImpl
implements BlogFactory, org.opensubsystems.core.persist.db.ModifiableDatabaseFactory

Data factory to retrieve and manipulate blogs in the persistence store.

Version:
$Id: BlogDatabaseFactory.java,v 1.15 2007/02/01 07:34:37 bastafidli Exp $
Author:
Miro Halas
Code reviewer:
Miro Halas
Code reviewed:
1.9 2006/07/26 00:26:42 jlegeny

Field Summary
protected  BlogDatabaseSchema m_schema
          Schema to use to execute database dependent operations.
 
Fields inherited from class org.opensubsystems.core.persist.db.DatabaseFactoryImpl
m_connectionFactory, m_iConcurrencySelectListResultSet, m_iDataType, m_iTypeSelectListResultSet, m_transactionFactory
 
Constructor Summary
BlogDatabaseFactory()
          Default constructor.
 
Method Summary
 int create(java.util.Collection colDataObject)
          
 org.opensubsystems.core.data.DataObject create(org.opensubsystems.core.data.DataObject data)
          
 void delete(int iId, int iDomainId)
          
 org.opensubsystems.core.data.DataObject get(int iId, int iDomainId)
          
 Blog get(java.lang.String strFolder)
          Get blog data knowing just the folder where it's entries are displayed.
 java.util.List getAll()
          Return collection of all Blogs in the persistance store.
 org.opensubsystems.core.data.DataObject load(java.sql.ResultSet rsQueryResults, int initialIndex)
          
 org.opensubsystems.core.data.ModifiableDataObject save(org.opensubsystems.core.data.ModifiableDataObject data)
          
 int setValuesForInsert(java.sql.PreparedStatement insertStatement, org.opensubsystems.core.data.DataObject data, int iIndex)
          
 int setValuesForUpdate(java.sql.PreparedStatement updateStatement, org.opensubsystems.core.data.DataObject data, int iIndex)
          
 
Methods inherited from class org.opensubsystems.core.persist.db.DatabaseFactoryImpl
getConcurrencySelectListResultSet, getDataType, getTypeSelectListResultSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opensubsystems.core.persist.DataFactory
getDataType
 

Field Detail

m_schema

protected BlogDatabaseSchema m_schema
Schema to use to execute database dependent operations.

Constructor Detail

BlogDatabaseFactory

public BlogDatabaseFactory()
                    throws org.opensubsystems.core.error.OSSException
Default constructor.

Throws:
org.opensubsystems.core.error.OSSException - - an error has occured
Method Detail

load

public org.opensubsystems.core.data.DataObject load(java.sql.ResultSet rsQueryResults,
                                                    int initialIndex)
                                             throws org.opensubsystems.core.error.OSSDatabaseAccessException

Specified by:
load in interface org.opensubsystems.core.persist.db.DatabaseFactory
Throws:
org.opensubsystems.core.error.OSSDatabaseAccessException

setValuesForInsert

public int setValuesForInsert(java.sql.PreparedStatement insertStatement,
                              org.opensubsystems.core.data.DataObject data,
                              int iIndex)
                       throws org.opensubsystems.core.error.OSSException,
                              java.sql.SQLException

Specified by:
setValuesForInsert in interface org.opensubsystems.core.persist.db.BasicDatabaseFactory
Throws:
org.opensubsystems.core.error.OSSException
java.sql.SQLException

setValuesForUpdate

public int setValuesForUpdate(java.sql.PreparedStatement updateStatement,
                              org.opensubsystems.core.data.DataObject data,
                              int iIndex)
                       throws org.opensubsystems.core.error.OSSException,
                              java.sql.SQLException

Specified by:
setValuesForUpdate in interface org.opensubsystems.core.persist.db.ModifiableDatabaseFactory
Throws:
org.opensubsystems.core.error.OSSException
java.sql.SQLException

get

public org.opensubsystems.core.data.DataObject get(int iId,
                                                   int iDomainId)
                                            throws org.opensubsystems.core.error.OSSException

Specified by:
get in interface org.opensubsystems.core.persist.DataFactory
Throws:
org.opensubsystems.core.error.OSSException

create

public org.opensubsystems.core.data.DataObject create(org.opensubsystems.core.data.DataObject data)
                                               throws org.opensubsystems.core.error.OSSException

Specified by:
create in interface org.opensubsystems.core.persist.BasicDataFactory
Throws:
org.opensubsystems.core.error.OSSException

create

public int create(java.util.Collection colDataObject)
           throws org.opensubsystems.core.error.OSSException

Specified by:
create in interface org.opensubsystems.core.persist.BasicDataFactory
Throws:
org.opensubsystems.core.error.OSSException

delete

public void delete(int iId,
                   int iDomainId)
            throws org.opensubsystems.core.error.OSSException

Specified by:
delete in interface org.opensubsystems.core.persist.BasicDataFactory
Throws:
org.opensubsystems.core.error.OSSException

save

public org.opensubsystems.core.data.ModifiableDataObject save(org.opensubsystems.core.data.ModifiableDataObject data)
                                                       throws org.opensubsystems.core.error.OSSException

Specified by:
save in interface org.opensubsystems.core.persist.ModifiableDataFactory
Throws:
org.opensubsystems.core.error.OSSException

get

public Blog get(java.lang.String strFolder)
         throws org.opensubsystems.core.error.OSSException
Get blog data knowing just the folder where it's entries are displayed.

Specified by:
get in interface BlogFactory
Parameters:
strFolder - - folder where entries for given folder are displayed
Returns:
Blog - specified blog or null if not found
Throws:
org.opensubsystems.core.error.OSSException - - an error has occured

getAll

public java.util.List getAll()
                      throws org.opensubsystems.core.error.OSSException
Return collection of all Blogs in the persistance store.

Specified by:
getAll in interface BlogFactory
Returns:
List - list of Blogs objects sorted alphabetically
Throws:
org.opensubsystems.core.error.OSSException - - an error has occureds


Copyright © 2003 - 2007 OpenSubsystems s.r.o.