Package org.bedework.eventreg.db
Class EventregDb
java.lang.Object
org.bedework.eventreg.db.EventregDb
- All Implemented Interfaces:
Serializable,org.bedework.util.logging.Logged
This class manages the Event registration database.
- Author:
- Mike Douglass
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected TimestampWhen we were created for debuggingprotected booleanprotected org.bedework.util.hibernate.HibSessionCurrent hibernate session - exists only across one user interaction -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the item.voidprotected voidprotected voidbooleanclose()booleanclose(boolean ignoreErrors) protected voidvoidDelete the dbitem.protected voidgetByEvent(String href) Registrations for an event.Registrations for a user.Registrations for a user.getCalSuiteForm(String formName, String calsuite) getCalSuiteForms(String calsuite) getChanges(String ts) static org.bedework.eventreg.db.EventregDb.IdBatchgetIdBatch(EventregProperties sysInfo) org.bedework.util.logging.BwLoggerlonggetRegistrantCount(String eventHref) longgetRegTicketCount(String eventHref) longgetTicketCount(String eventHref) getUserRegistration(String eventHref, String user) longgetUserTicketCount(String eventHref, String user) getWaiting(String eventHref) longgetWaitingTicketCount(String eventHref) booleanisOpen()booleanopen()protected voidbooleanrollback()protected voidvoidsetSysInfo(EventregProperties sysInfo) voidUpdate the persisted state of the item.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bedework.util.logging.Logged
audit, debug, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, getLogLevel, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, trace, trace, trace, warn
-
Field Details
-
open
protected boolean open -
objTimestamp
When we were created for debugging -
sess
protected org.bedework.util.hibernate.HibSession sessCurrent hibernate session - exists only across one user interaction
-
-
Constructor Details
-
EventregDb
public EventregDb()
-
-
Method Details
-
getNextRegistrationId
- Returns:
- next id
- Throws:
Throwable
-
setSysInfo
-
open
- Returns:
- true if we had to open it. False if already open
- Throws:
Throwable
-
isOpen
public boolean isOpen()- Returns:
- true for open
-
rollback
- Returns:
- true if we had did rollback.
- Throws:
Throwable
-
close
public boolean close()- Returns:
- false if error occurred
-
close
public boolean close(boolean ignoreErrors) - Parameters:
ignoreErrors-- Returns:
- false if error occurred
-
addChange
- Parameters:
c-- Throws:
Throwable
-
getChanges
- Parameters:
ts- - timestamp value - get changes after this- Returns:
- - list of changes since ts
- Throws:
Throwable
-
getAllRegistrations
- Returns:
- list of registrations
- Throws:
Throwable
-
getByid
Registrations for a user.- Parameters:
id-- Returns:
- a matching registration
- Throws:
Throwable
-
getByUser
Registrations for a user.- Parameters:
user-- Returns:
- a matching registrations
- Throws:
Throwable
-
getUserRegistration
- Parameters:
eventHref-user-- Returns:
- registration or null
- Throws:
Throwable
-
getByEvent
Registrations for an event.- Parameters:
href-- Returns:
- a matching registrations
- Throws:
Throwable
-
getRegistrantCount
- Parameters:
eventHref-- Returns:
- number of registration entries for that event
- Throws:
Throwable
-
getRegTicketCount
- Parameters:
eventHref-- Returns:
- number of registrations not on the waiting list for the event
- Throws:
Throwable
-
getWaitingTicketCount
- Parameters:
eventHref- href of event- Returns:
- number of tickets requested on the waiting list for the event
- Throws:
Throwable- on fatal error
-
getWaiting
- Parameters:
eventHref-- Returns:
- registrations on the waiting list for the event
- Throws:
Throwable
-
getTicketCount
- Parameters:
eventHref-- Returns:
- total number of registration entries for that event, including waiting list
- Throws:
Throwable
-
getUserTicketCount
- Parameters:
eventHref-user-- Returns:
- number of registration entries for that event and user
- Throws:
Throwable
-
getCalSuiteForms
- Throws:
Throwable
-
getCalSuiteForm
- Throws:
Throwable
-
add
Add the item.- Parameters:
val- the dbitem- Throws:
Exception
-
update
Update the persisted state of the item.- Parameters:
val- the dbitem- Throws:
Exception
-
delete
Delete the dbitem.- Parameters:
val- the dbitem- Throws:
Throwable
-
checkOpen
- Throws:
Throwable
-
openSession
- Throws:
Throwable
-
closeSession
- Throws:
Exception
-
beginTransaction
- Throws:
Throwable
-
endTransaction
- Throws:
Throwable
-
rollbackTransaction
- Throws:
Throwable
-
getIdBatch
public static org.bedework.eventreg.db.EventregDb.IdBatch getIdBatch(EventregProperties sysInfo) throws Throwable - Throws:
Throwable
-
getLogger
public org.bedework.util.logging.BwLogger getLogger()- Specified by:
getLoggerin interfaceorg.bedework.util.logging.Logged
-