summaryrefslogtreecommitdiff
path: root/src/session-object.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'src/session-object.lisp')
-rw-r--r--src/session-object.lisp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/session-object.lisp b/src/session-object.lisp
new file mode 100644
index 0000000..480cf6f
--- /dev/null
+++ b/src/session-object.lisp
@@ -0,0 +1,18 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+(declaim (optimize (speed 0) (safety 3) (debug 3)))
+
+(in-package :org-ckons-session)
+
+(defclass session-object ()
+ ((*session-key :initarg :*session-key
+ :initform (error 'org-ckons-condition::handled-error :text "Subclasses of `session-object' must supply an initform for the *SESSION-KEY slot.")
+ :accessor *session-key
+ :documentation "The key to the user_session_objects table."))
+ (:documentation "Superclass for all session objects.
+`session-object' is involved in multiple inheritance. Every
+`session-object' is also a `record'. It must have a `*where-expresion'
+of id = ~a."))
+
+(defmethod sanitize-json ((session-object session-object))
+ (setf (*session-key session-object) nil)
+ (call-next-method))