org.ikasan.connector.basefiletransfer.outbound.persistence
Class HibernateBaseFileTransferDaoImpl

java.lang.Object
  extended by org.ikasan.connector.basefiletransfer.outbound.persistence.HibernateBaseFileTransferDaoImpl
All Implemented Interfaces:
BaseFileTransferDao

public class HibernateBaseFileTransferDaoImpl
extends java.lang.Object
implements BaseFileTransferDao

Implementation for Hibernate interactions involving File Transfer connectors TODO Could change this so that all business methods use HibernateTemplate as we (extend from HibernateDaoSupport)

Author:
Ikasan Development Team

Field Summary
protected static java.lang.String filterTableName
          Hibernate name of the mapped object
protected  org.hibernate.SessionFactory sessionFactory
          Hibernate session factory
 
Constructor Summary
HibernateBaseFileTransferDaoImpl(org.hibernate.SessionFactory sessionFactory)
          Constructor must provide a persistence handle
 
Method Summary
 void housekeep(java.lang.String clientId, int ageOfFiles, int maxRows)
          Delete entries from the FileFilter table based on their age of creation and their clientId TODO This is _not_ a platform independent solution as we are using a Sybase specific functions (dateadd() & getdate())
 boolean isDuplicate(ClientListEntry entry, boolean filterOnFilename, boolean filterOnLastModifiedDate)
          Method that checks if an ClientListEntry is already included in the filter table.
 void persistClientListEntry(ClientListEntry entry)
          Derives an FileFilter from the provided ClientListEntry and persists it to the filtering table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sessionFactory

protected org.hibernate.SessionFactory sessionFactory
Hibernate session factory


filterTableName

protected static final java.lang.String filterTableName
Hibernate name of the mapped object

See Also:
Constant Field Values
Constructor Detail

HibernateBaseFileTransferDaoImpl

public HibernateBaseFileTransferDaoImpl(org.hibernate.SessionFactory sessionFactory)
Constructor must provide a persistence handle

Parameters:
sessionFactory -
Method Detail

isDuplicate

public boolean isDuplicate(ClientListEntry entry,
                           boolean filterOnFilename,
                           boolean filterOnLastModifiedDate)
                    throws org.hibernate.HibernateException
Description copied from interface: BaseFileTransferDao
Method that checks if an ClientListEntry is already included in the filter table.

Specified by:
isDuplicate in interface BaseFileTransferDao
Parameters:
entry - The ClientListEntry to filter
Returns:
true if the entry is a duplicate, false otherwise.
Throws:
org.hibernate.HibernateException
See Also:
BaseFileTransferDao.isDuplicate(ClientListEntry, boolean, boolean)

persistClientListEntry

public void persistClientListEntry(ClientListEntry entry)
                            throws org.hibernate.HibernateException
Description copied from interface: BaseFileTransferDao
Derives an FileFilter from the provided ClientListEntry and persists it to the filtering table.

Specified by:
persistClientListEntry in interface BaseFileTransferDao
Parameters:
entry - the ClientListEntry to save.
Throws:
org.hibernate.HibernateException
See Also:
BaseFileTransferDao.persistClientListEntry(org.ikasan.connector.basefiletransfer.net.ClientListEntry)

housekeep

public void housekeep(java.lang.String clientId,
                      int ageOfFiles,
                      int maxRows)
               throws org.hibernate.HibernateException
Delete entries from the FileFilter table based on their age of creation and their clientId TODO This is _not_ a platform independent solution as we are using a Sybase specific functions (dateadd() & getdate())

Specified by:
housekeep in interface BaseFileTransferDao
Parameters:
clientId -
ageOfFiles -
maxRows -
Throws:
org.hibernate.HibernateException


Copyright © 2007-2010 Ikasan. All Rights Reserved.