+(defcomponent mewa-slot-presentation ()
+ ((slot-name :accessor slot-name
+ :initarg :slot-name
+ :documentation
+ "The name of the slot being accessed")
+ (fill-gaps-only-p :accessor fill-gaps-only-p
+ :initarg :fill-gaps-only-p
+ :initform nil
+ :documentation
+ "When nil, the instance is syncronised with the database.
+When T, only the default value for primary keys and the joins are updated."))
+ (:documentation "The superclass of all Mewa slot presentations"))
+
+;;;; this has to be in the eval when i would think
+(eval-when (:compile-toplevel :load-toplevel :execute)
+ (defun generate-slot-presentation-definition-for-type (type)
+ (let* ((u-name (intern (format nil "~A-SLOT-PRESENTATION" type)))
+ (sp-name (intern (format nil "MEWA-~A" u-name)))
+ (t-name (intern (format nil "MEWA-~A" type))))
+ `(defslot-presentation ,sp-name (,u-name mewa-slot-presentation)
+ ()
+ (:type-name ,t-name)))))
+
+(defmacro define-base-mewa-presentations (&body types)
+ "Define the mewa-slot-presentations by subclassing the base UCW ones"
+ `(progn ,@(mapcar #'generate-slot-presentation-definition-for-type
+ types)))
+
+;;;then actually define the base presentations :
+(define-base-mewa-presentations
+ boolean
+ string
+ number
+ integer
+ currency)