org.onebusaway.gtfs.impl
Class SpringHibernateOperationsImpl

java.lang.Object
  extended by org.onebusaway.gtfs.impl.SpringHibernateOperationsImpl
All Implemented Interfaces:
org.onebusaway.gtfs.services.HibernateOperations

public class SpringHibernateOperationsImpl
extends Object
implements org.onebusaway.gtfs.services.HibernateOperations


Constructor Summary
SpringHibernateOperationsImpl()
           
SpringHibernateOperationsImpl(org.hibernate.SessionFactory sessionFactory)
           
 
Method Summary
<T> void
clearAllEntitiesForType(Class<T> type)
           
 void close()
           
 Object execute(org.onebusaway.gtfs.services.HibernateOperation callback)
           
<T> List<T>
find(String queryString)
           
<T> List<T>
findByNamedQuery(String namedQuery)
           
<T> List<T>
findByNamedQueryAndNamedParam(String namedQuery, String paramName, Object paramValue)
           
<T> List<T>
findByNamedQueryAndNamedParams(String namedQuery, String[] paramNames, Object[] values)
           
<T> List<T>
findWithNamedParam(String queryString, String paramName, Object value)
           
<T> List<T>
findWithNamedParams(String queryString, String[] paramNames, Object[] values)
           
 void flush()
           
<T> T
get(Class<T> entityType, Serializable id)
           
 org.hibernate.SessionFactory getSessionFactory()
           
 void open()
           
<T> void
removeEntity(T entity)
           
 void save(Object entity)
           
 void saveOrUpdate(Object entity)
           
 void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
           
 void update(Object entity)
          Mutable Methods
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringHibernateOperationsImpl

public SpringHibernateOperationsImpl()

SpringHibernateOperationsImpl

public SpringHibernateOperationsImpl(org.hibernate.SessionFactory sessionFactory)
Method Detail

setSessionFactory

public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)

getSessionFactory

public org.hibernate.SessionFactory getSessionFactory()
Specified by:
getSessionFactory in interface org.onebusaway.gtfs.services.HibernateOperations

execute

public Object execute(org.onebusaway.gtfs.services.HibernateOperation callback)
Specified by:
execute in interface org.onebusaway.gtfs.services.HibernateOperations

find

public <T> List<T> find(String queryString)
Specified by:
find in interface org.onebusaway.gtfs.services.HibernateOperations

findByNamedQuery

public <T> List<T> findByNamedQuery(String namedQuery)
Specified by:
findByNamedQuery in interface org.onebusaway.gtfs.services.HibernateOperations

findByNamedQueryAndNamedParam

public <T> List<T> findByNamedQueryAndNamedParam(String namedQuery,
                                                 String paramName,
                                                 Object paramValue)
Specified by:
findByNamedQueryAndNamedParam in interface org.onebusaway.gtfs.services.HibernateOperations

findByNamedQueryAndNamedParams

public <T> List<T> findByNamedQueryAndNamedParams(String namedQuery,
                                                  String[] paramNames,
                                                  Object[] values)
Specified by:
findByNamedQueryAndNamedParams in interface org.onebusaway.gtfs.services.HibernateOperations

findWithNamedParam

public <T> List<T> findWithNamedParam(String queryString,
                                      String paramName,
                                      Object value)
Specified by:
findWithNamedParam in interface org.onebusaway.gtfs.services.HibernateOperations

findWithNamedParams

public <T> List<T> findWithNamedParams(String queryString,
                                       String[] paramNames,
                                       Object[] values)
Specified by:
findWithNamedParams in interface org.onebusaway.gtfs.services.HibernateOperations

get

public <T> T get(Class<T> entityType,
                 Serializable id)
Specified by:
get in interface org.onebusaway.gtfs.services.HibernateOperations

update

public void update(Object entity)
Mutable Methods

Specified by:
update in interface org.onebusaway.gtfs.services.HibernateOperations

save

public void save(Object entity)
Specified by:
save in interface org.onebusaway.gtfs.services.HibernateOperations

saveOrUpdate

public void saveOrUpdate(Object entity)
Specified by:
saveOrUpdate in interface org.onebusaway.gtfs.services.HibernateOperations

removeEntity

public <T> void removeEntity(T entity)
Specified by:
removeEntity in interface org.onebusaway.gtfs.services.HibernateOperations

clearAllEntitiesForType

public <T> void clearAllEntitiesForType(Class<T> type)
Specified by:
clearAllEntitiesForType in interface org.onebusaway.gtfs.services.HibernateOperations

open

public void open()
Specified by:
open in interface org.onebusaway.gtfs.services.HibernateOperations

close

public void close()
Specified by:
close in interface org.onebusaway.gtfs.services.HibernateOperations

flush

public void flush()
Specified by:
flush in interface org.onebusaway.gtfs.services.HibernateOperations


Copyright © 2012 OneBusAway. All Rights Reserved.