/** * Construct a new context object with default options. A database connection is opened. * No user is authenticated. */ public Context() { this.mode = Mode.READ_WRITE; init(); }
protected Context(EventService eventService, DBConnection dbConnection) { this.mode = Mode.READ_WRITE; this.eventService = eventService; this.dbConnection = dbConnection; init(); }
/** * Construct a new context object with the given mode enabled. A database connection is opened. * No user is authenticated. * * @param mode The mode to use when opening the context. */ public Context(Mode mode) { this.mode = mode; init(); }