org.onebusaway.gtfs.impl
Class GenericDaoImpl

java.lang.Object
  extended by org.onebusaway.gtfs.impl.GenericDaoImpl
All Implemented Interfaces:
GenericDao, GenericMutableDao
Direct Known Subclasses:
GtfsDaoImpl

public class GenericDaoImpl
extends Object
implements GenericMutableDao


Constructor Summary
GenericDaoImpl()
           
 
Method Summary
<T> void
clearAllEntitiesForType(Class<T> type)
           
 void close()
           
 void flush()
           
<T> Collection<T>
getAllEntitiesForType(Class<T> type)
          GenericMutableDao Interface
<K,V> Map<K,V>
getEntitiesByIdForEntityType(Class<K> keyType, Class<V> entityType)
           
 Set<Class<?>> getEntityClasses()
           
<T> T
getEntityForId(Class<T> type, Serializable id)
           
 void open()
           
<K extends Serializable,T extends IdentityBean<K>>
void
removeEntity(T entity)
           
 void saveEntity(Object entity)
           
 void saveOrUpdateEntity(Object entity)
           
 void setGenerateIds(boolean generateIds)
           
 void updateEntity(Object entity)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericDaoImpl

public GenericDaoImpl()
Method Detail

setGenerateIds

public void setGenerateIds(boolean generateIds)

getEntityClasses

public Set<Class<?>> getEntityClasses()

getEntitiesByIdForEntityType

public <K,V> Map<K,V> getEntitiesByIdForEntityType(Class<K> keyType,
                                                   Class<V> entityType)

getAllEntitiesForType

public <T> Collection<T> getAllEntitiesForType(Class<T> type)
GenericMutableDao Interface

Specified by:
getAllEntitiesForType in interface GenericDao

getEntityForId

public <T> T getEntityForId(Class<T> type,
                            Serializable id)
Specified by:
getEntityForId in interface GenericDao

saveEntity

public void saveEntity(Object entity)
Specified by:
saveEntity in interface GenericMutableDao

updateEntity

public void updateEntity(Object entity)
Specified by:
updateEntity in interface GenericMutableDao

saveOrUpdateEntity

public void saveOrUpdateEntity(Object entity)
Specified by:
saveOrUpdateEntity in interface GenericMutableDao

clearAllEntitiesForType

public <T> void clearAllEntitiesForType(Class<T> type)
Specified by:
clearAllEntitiesForType in interface GenericMutableDao

removeEntity

public <K extends Serializable,T extends IdentityBean<K>> void removeEntity(T entity)
Specified by:
removeEntity in interface GenericMutableDao

open

public void open()
Specified by:
open in interface GenericMutableDao

flush

public void flush()
Specified by:
flush in interface GenericMutableDao

close

public void close()
Specified by:
close in interface GenericMutableDao


Copyright © 2011 OneBusAway. All Rights Reserved.