edu.sc.seis.fissuresUtil.hibernate
Class EventDB

java.lang.Object
  extended by edu.sc.seis.fissuresUtil.hibernate.AbstractHibernateDB
      extended by edu.sc.seis.fissuresUtil.hibernate.EventDB

public class EventDB
extends AbstractHibernateDB


Field Summary
protected  java.lang.String eventByName
           
protected  java.lang.String eventByTimeAndDepth
           
protected  java.lang.String finderQueryAroundDateline
           
protected  java.lang.String finderQueryAvoidDateline
           
protected  java.lang.String finderQueryBase
           
protected  java.lang.String getIdenticalEventString
           
protected  java.lang.String getLastEventString
           
static float INCONCEIVABLY_LARGE_DEPTH
           
static float INCONCEIVABLY_LARGE_MAGNITUDE
           
static float INCONCEIVABLY_SMALL_DEPTH
           
static float INCONCEIVABLY_SMALL_MAGNITUDE
           
 
Fields inherited from class edu.sc.seis.fissuresUtil.hibernate.AbstractHibernateDB
DEBUG_SESSION_CREATION, DEBUG_SESSION_CREATION_SECONDS
 
Constructor Summary
protected EventDB()
           
 
Method Summary
 void delete(CacheEvent event)
           
 java.util.List<CacheEvent> getAll()
           
 CacheEvent[] getByName(java.lang.String name)
           
 java.lang.String[] getCatalogs()
           
 java.lang.String[] getCatalogsFor(java.lang.String contributor)
           
 java.lang.String[] getContributors()
           
 CacheEvent getEvent(int dbid)
           
protected  java.lang.Class getEventClass()
          override to use queries on subclasses of CacheEvent.
 CacheEvent[] getEventsByTimeAndDepthRanges(edu.iris.Fissures.model.MicroSecondDate minTime, edu.iris.Fissures.model.MicroSecondDate maxTime, double minDepth, double maxDepth)
           
 CacheEvent getIdenticalEvent(CacheEvent e)
           
 CacheEvent getLastEvent()
           
 java.util.List<CacheEvent> getSimilarEvents(CacheEvent event, edu.iris.Fissures.model.TimeInterval timeTolerance, edu.iris.Fissures.model.QuantityImpl positionTolerance)
           
static EventDB getSingleton()
           
protected  void initQueryStrings()
           
protected  void internUnit(CacheEvent event)
           
 long put(CacheEvent event)
           
 java.util.List<CacheEvent> query(EventFinderQuery q)
           
 
Methods inherited from class edu.sc.seis.fissuresUtil.hibernate.AbstractHibernateDB
commit, createSession, deploySchema, flush, getReadOnlySession, getSession, getUnitCache, intern, internUnit, internUnit, isSessionOpen, rollback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

getLastEventString

protected java.lang.String getLastEventString

finderQueryBase

protected java.lang.String finderQueryBase

finderQueryAvoidDateline

protected java.lang.String finderQueryAvoidDateline

finderQueryAroundDateline

protected java.lang.String finderQueryAroundDateline

getIdenticalEventString

protected java.lang.String getIdenticalEventString

eventByTimeAndDepth

protected java.lang.String eventByTimeAndDepth

eventByName

protected java.lang.String eventByName

INCONCEIVABLY_SMALL_MAGNITUDE

public static final float INCONCEIVABLY_SMALL_MAGNITUDE
See Also:
Constant Field Values

INCONCEIVABLY_LARGE_MAGNITUDE

public static final float INCONCEIVABLY_LARGE_MAGNITUDE
See Also:
Constant Field Values

INCONCEIVABLY_SMALL_DEPTH

public static final float INCONCEIVABLY_SMALL_DEPTH
See Also:
Constant Field Values

INCONCEIVABLY_LARGE_DEPTH

public static final float INCONCEIVABLY_LARGE_DEPTH
See Also:
Constant Field Values
Constructor Detail

EventDB

protected EventDB()
Method Detail

initQueryStrings

protected void initQueryStrings()

getAll

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

getByName

public CacheEvent[] getByName(java.lang.String name)

query

public java.util.List<CacheEvent> query(EventFinderQuery q)

getEvent

public CacheEvent getEvent(int dbid)
                    throws NotFound
Throws:
NotFound

put

public long put(CacheEvent event)

delete

public void delete(CacheEvent event)

getLastEvent

public CacheEvent getLastEvent()
                        throws NotFound
Throws:
NotFound

getIdenticalEvent

public CacheEvent getIdenticalEvent(CacheEvent e)

getCatalogs

public java.lang.String[] getCatalogs()

getContributors

public java.lang.String[] getContributors()

getCatalogsFor

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

getSimilarEvents

public java.util.List<CacheEvent> getSimilarEvents(CacheEvent event,
                                                   edu.iris.Fissures.model.TimeInterval timeTolerance,
                                                   edu.iris.Fissures.model.QuantityImpl positionTolerance)
                                            throws NotFound
Throws:
NotFound

getEventsByTimeAndDepthRanges

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

getSingleton

public static EventDB getSingleton()

getEventClass

protected java.lang.Class getEventClass()
override to use queries on subclasses of CacheEvent. For example SOD uses StatefulEvent.


internUnit

protected void internUnit(CacheEvent event)