 (declare get-val-ds get-val-clj)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 (deftype EntityMap [entity]
-  ;; migae.datastore.EntityMap
-  ;; (EntityMap [this content])
-
-  ;; com.google.appengine.api.datastore.Entity
-  ;; (getKey [this] (.getKey this))
 
   java.lang.Iterable
   (iterator [this]

       (if (= (class coll) Entity)
         (EntityMap. coll)
         (log/trace "EXCEPTION assoc!!")))))

;;   ;; ([^clojure.lang.IPersistentVector coll propname val]
;;   ;;  )

;; (defmethod assoc!! Entity
;;   ([^com.google.appengine.api.datastore.Entity coll ^Keyword propname val]
;;      ;; e (Entity. k)]
;;   ([^com.google.appengine.api.datastore.Entity coll ^Keyword propname val & kvs]
;;    (.setProperty coll (subs (str propname) 1) val) ; setProperty returns void
;;    (if kvs
;;      (recur coll (first kvs) (second kvs) (nnext kvs))
;;      coll)))

;; (defmethod assoc!! EntityMap
;;   ([^EntityMap coll ^Keyword propname val]
;;    {:pre {[(nil? (clj/namespace propname))]}
;;    (let [txn (.beginTransaction (datastore))]
;;      ;; e (Entity. k)]
;;      (try
;;        (.setProperty coll (clj/name propname) val)
;;        (.put (datastore) coll)
;;        (.commit txn)
;;        (finally
;;          (if (.isActive txn)
;;            (.rollback txn))))
;;      coll))
;;   ([^com.google.appengine.api.datastore.Entity coll propname val & kvs]
;;    (.setProperty coll (subs (str propname) 1) val) ; setProperty returns void
;;    (if kvs
;;      (recur coll (first kvs) (second kvs) (nnext kvs))
;;      coll)))

;; (def
;;  ^{:arglists '([coll x] [coll x & xs])
;;    :doc "conj[oin]. Returns a new collection with the xs
;;     'added'. (conj nil item) returns (item).  The 'addition' may
;;     happen at different 'places' depending on the concrete type."
;;    :added "1.0"
;;    :static true}
;;  conj (fn ^:static conj
;;         ([coll x] (. clojure.lang.RT (conj coll x)))
;;         ([coll x & xs]
;;          (if xs
;;            (recur (conj coll x) (first xs) (next xs))
;;            (conj coll x)))))

;; (defn into
;;   "Returns a new coll consisting of to-coll with all of the items of
;;   from-coll conjoined."
;;   {:added "1.0"
;;    :static true}
;;   [to from]
;;   (if (instance? clojure.lang.IEditableCollection to)
;;     (with-meta (persistent! (reduce conj! (transient to) from)) (meta to))
;;     (reduce conj to from)))

(defmacro emaps!
  [kind pred]

      ;; (log/trace "created and put entity " e)
      (EntityMap. e))))

(defn key=
  [em1 em2]
  (.equals (.entity em1) (.entity em2)))

(defn assoc!
  "unsafe assoc with save but no txn for DS Entities"
