edu.sc.seis.sod.hibernate

## Class StatefulEventDB

- java.lang.Object
- - edu.sc.seis.sod.hibernate.StatefulEventDB

-     public class StatefulEventDB
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `TIME_ORDER`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `StatefulEventDB()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `commit()`
    `void` | `flush()`
    `java.util.List` | `get(java.lang.String statii, java.lang.String order, boolean ascending)`
    `java.util.List<StatefulEvent>` | `getAll()`
    `java.util.List<StatefulEvent>` | `getAll(Status status)`
    `edu.sc.seis.fissuresUtil.cache.CacheEvent[]` | `getByName(java.lang.String name)`
    `java.lang.String[]` | `getCatalogs()`
    `java.lang.String[]` | `getCatalogsFor(java.lang.String contributor)`
    `java.lang.String[]` | `getContributors()`
    `StatefulEvent` | `getEvent(int dbid)`
    `java.util.List<StatefulEvent>` | `getEventInTimeRange(edu.sc.seis.fissuresUtil.time.MicroSecondTimeRange range)`
    `java.util.List<StatefulEvent>` | `getEventInTimeRange(edu.sc.seis.fissuresUtil.time.MicroSecondTimeRange range, Status status)`
    `java.util.List<StatefulEvent>` | `getEventInTimeRangeRegardlessOfStatus(edu.sc.seis.fissuresUtil.time.MicroSecondTimeRange range)`
    `StatefulEvent[]` | `getEventsByTimeAndDepthRanges(edu.iris.Fissures.model.MicroSecondDate minTime, edu.iris.Fissures.model.MicroSecondDate maxTime, double minDepth, double maxDepth)`
    `StatefulEvent` | `getIdenticalEvent(edu.sc.seis.fissuresUtil.cache.CacheEvent e)`
    `StatefulEvent` | `getLastEvent()`
    `StatefulEvent` | `getNext(Standing standing)` next successful event to process.
    `int` | `getNumEventsOfStatus(Standing standing)`
    `int` | `getNumWaiting()`
    `org.hibernate.Session` | `getSession()`
    `static StatefulEventDB` | `getSingleton()`
    `long` | `put(StatefulEvent event)`
    `java.util.List<StatefulEvent>` | `query(edu.sc.seis.fissuresUtil.flow.querier.EventFinderQuery q)`
    `void` | `restartCompletedEvents()`
    `void` | `rollback()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### TIME_ORDER

          public static final java.lang.String TIME_ORDER

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### StatefulEventDB

          protected StatefulEventDB()

  - ### Method Detail

    - #### put

          public long put(StatefulEvent event)

    - #### getAll

          public java.util.List<StatefulEvent> getAll()

    - #### getAll

          public java.util.List<StatefulEvent> getAll(Status status)

    - #### getNumEventsOfStatus

          public int getNumEventsOfStatus(Standing standing)

    - #### getEvent

          public StatefulEvent getEvent(int dbid)
                                 throws edu.sc.seis.fissuresUtil.database.NotFound

      Throws:
        `edu.sc.seis.fissuresUtil.database.NotFound`

    - #### getEventInTimeRange

          public java.util.List<StatefulEvent> getEventInTimeRange(edu.sc.seis.fissuresUtil.time.MicroSecondTimeRange range)

    - #### getEventInTimeRange

          public java.util.List<StatefulEvent> getEventInTimeRange(edu.sc.seis.fissuresUtil.time.MicroSecondTimeRange range,
                                                                   Status status)

    - #### getEventInTimeRangeRegardlessOfStatus

          public java.util.List<StatefulEvent> getEventInTimeRangeRegardlessOfStatus(edu.sc.seis.fissuresUtil.time.MicroSecondTimeRange range)

    - #### query

          public java.util.List<StatefulEvent> query(edu.sc.seis.fissuresUtil.flow.querier.EventFinderQuery q)

    - #### getLastEvent

          public StatefulEvent getLastEvent()
                                     throws edu.sc.seis.fissuresUtil.database.NotFound

      Throws:
        `edu.sc.seis.fissuresUtil.database.NotFound`

    - #### getEventsByTimeAndDepthRanges

          public StatefulEvent[] getEventsByTimeAndDepthRanges(edu.iris.Fissures.model.MicroSecondDate minTime,
                                                               edu.iris.Fissures.model.MicroSecondDate maxTime,
                                                               double minDepth,
                                                               double maxDepth)

    - #### getNumWaiting

          public int getNumWaiting()

    - #### getNext

          public StatefulEvent getNext(Standing standing)

      next successful event to process. Returns null if no more events.

    - #### getIdenticalEvent

          public StatefulEvent getIdenticalEvent(edu.sc.seis.fissuresUtil.cache.CacheEvent e)

    - #### get

          public java.util.List get(java.lang.String statii,
                                    java.lang.String order,
                                    boolean ascending)

    - #### flush

          public void flush()

    - #### commit

          public void commit()

    - #### rollback

          public void rollback()

    - #### getSession

          public org.hibernate.Session getSession()

    - #### restartCompletedEvents

          public void restartCompletedEvents()

    - #### getSingleton

          public static StatefulEventDB getSingleton()

    - #### getByName

          public edu.sc.seis.fissuresUtil.cache.CacheEvent[] getByName(java.lang.String name)

    - #### getCatalogs

          public java.lang.String[] getCatalogs()

    - #### getContributors

          public java.lang.String[] getContributors()

    - #### getCatalogsFor

          public java.lang.String[] getCatalogsFor(java.lang.String contributor)