org.onebusaway.transit_data_federation.impl.realtime
Class BlockLocationRecordDaoImpl

java.lang.Object
  extended by org.onebusaway.transit_data_federation.impl.realtime.BlockLocationRecordDaoImpl
All Implemented Interfaces:
BlockLocationRecordDao

@Component
@ManagedResource(value="org.onebusaway.transit_data_federation.impl.realtime:name=BlockLocationRecordDaoImpl")
public class BlockLocationRecordDaoImpl
extends Object
implements BlockLocationRecordDao

Implementation class for BlockLocationRecordDao that manages persisting BlockLocationRecord records to a Hibernate-managed data-store.

Author:
bdferris
See Also:
BlockLocationRecordDao, BlockLocationRecord

Constructor Summary
BlockLocationRecordDaoImpl()
           
 
Method Summary
 List<BlockLocationRecord> getBlockLocationRecords(org.onebusaway.gtfs.model.AgencyAndId blockId, org.onebusaway.gtfs.model.AgencyAndId tripId, org.onebusaway.gtfs.model.AgencyAndId vehicleId, long serviceDate, long fromTime, long toTime, int recordLimit)
          The mega-query method.
 List<BlockLocationRecord> getBlockLocationRecordsForBlockServiceDateAndTimeRange(org.onebusaway.gtfs.model.AgencyAndId blockId, long serviceDate, long fromTime, long toTime)
           
 List<BlockLocationRecord> getBlockLocationRecordsForVehicleAndTimeRange(org.onebusaway.gtfs.model.AgencyAndId vehicleId, long fromTime, long toTime)
           
 int getSavedRecordCount()
           
 void saveBlockLocationRecord(BlockLocationRecord record)
          BlockLocationRecordDao Interface
 void saveBlockLocationRecords(List<BlockLocationRecord> records)
           
 void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockLocationRecordDaoImpl

public BlockLocationRecordDaoImpl()
Method Detail

setSessionFactory

public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)

getSavedRecordCount

@ManagedAttribute
public int getSavedRecordCount()

saveBlockLocationRecord

public void saveBlockLocationRecord(BlockLocationRecord record)
BlockLocationRecordDao Interface

Specified by:
saveBlockLocationRecord in interface BlockLocationRecordDao

saveBlockLocationRecords

public void saveBlockLocationRecords(List<BlockLocationRecord> records)
Specified by:
saveBlockLocationRecords in interface BlockLocationRecordDao

getBlockLocationRecordsForBlockServiceDateAndTimeRange

public List<BlockLocationRecord> getBlockLocationRecordsForBlockServiceDateAndTimeRange(org.onebusaway.gtfs.model.AgencyAndId blockId,
                                                                                        long serviceDate,
                                                                                        long fromTime,
                                                                                        long toTime)
Specified by:
getBlockLocationRecordsForBlockServiceDateAndTimeRange in interface BlockLocationRecordDao
serviceDate - the service date (Unix-time) on which the block trip operated
fromTime - Unix-time
toTime - Unix-time
Returns:
the set of block position records with the specified trip id, service date, and time range

getBlockLocationRecordsForVehicleAndTimeRange

public List<BlockLocationRecord> getBlockLocationRecordsForVehicleAndTimeRange(org.onebusaway.gtfs.model.AgencyAndId vehicleId,
                                                                               long fromTime,
                                                                               long toTime)
Specified by:
getBlockLocationRecordsForVehicleAndTimeRange in interface BlockLocationRecordDao
Returns:
the set of trip position records with the specified vehicle id and time range

getBlockLocationRecords

public List<BlockLocationRecord> getBlockLocationRecords(org.onebusaway.gtfs.model.AgencyAndId blockId,
                                                         org.onebusaway.gtfs.model.AgencyAndId tripId,
                                                         org.onebusaway.gtfs.model.AgencyAndId vehicleId,
                                                         long serviceDate,
                                                         long fromTime,
                                                         long toTime,
                                                         int recordLimit)
Description copied from interface: BlockLocationRecordDao
The mega-query method. Supply what you can.

Specified by:
getBlockLocationRecords in interface BlockLocationRecordDao
recordLimit - TODO
Returns:


Copyright © 2012 OneBusAway. All Rights Reserved.