Package

salat

dao

Permalink

package dao

Visibility
  1. Public
  2. All

Type Members

  1. trait BaseDAOMethods[ObjectType <: AnyRef, ID] extends AnyRef

    Permalink
  2. trait ConcreteSubclassDAO extends AnyRef

    Permalink

    When you use a single collection to contain an entire type hierarchy, then use this trait to make sure that type hints are appended to find, count and update queries.

    When you use a single collection to contain an entire type hierarchy, then use this trait to make sure that type hints are appended to find, count and update queries. (Please note you need to make sure your indexes on this shared collection take your type hint fields into account!)

    In addition, when you use the concrete subclass DAO to insert, update and save objects, a type hint will be appended to the serialized object.

  3. trait DAO[ObjectType <: AnyRef, ID] extends BaseDAOMethods[ObjectType, ID]

    Permalink

    Base DAO class.

    Base DAO class.

    Where WriteConcern is not specified as a parameter on an operation which modifies or removes documents from the collection, then the default write concern of the collection is assumed.

    ObjectType

    class to be persisted

    ID

    _id type

  4. trait ModelCompanion[ObjectType <: AnyRef, ID] extends BaseDAOMethods[ObjectType, ID] with Logging

    Permalink

    Play framework style model companion

    Play framework style model companion

     package model
    
    import salat.annotations._
    import com.mongodb.casbah.Imports._
    import salat.dao.{ SalatDAO, ModelCompanion }
    
    object MyModel extends ModelCompanion[MyModel, ObjectId] {
      val collection = MongoConnection()("my_db")("my_model_coll")
      val dao = new SalatDAO[MyModel, ObjectId](collection = collection) {}
    }
    
    case class MyModel(@Key("_id") id: ObjectId,
                       x: String,
                       y: Int,
                       z: List[Double])
    ObjectType

    type of object to be serialized

    ID

    type of object id to be serialized

  5. case class MutilValidateError(ts: Traversable[Throwable]) extends Error with Product with Serializable

    Permalink
  6. abstract class SalatDAO[ObjectType <: AnyRef, ID] extends DAO[ObjectType, ID] with Logging

    Permalink

    Sample DAO implementation.

    Sample DAO implementation.

    ObjectType

    class to be persisted

    ID

    _id type

  7. abstract class SalatDAOError extends RuntimeException

    Permalink
  8. abstract class SalatDAOQueryError extends RuntimeException

    Permalink
  9. case class SalatDAOUpdateError(whichDAO: String, collection: com.mongodb.casbah.TypeImports.MongoCollection, query: DBObject, o: DBObject, wc: WriteConcern, cause: LegacyErrorOrMongoException, upsert: Boolean, multi: Boolean) extends RuntimeException with Product with Serializable

    Permalink
  10. case class SalatInsertError(description: String, collection: com.mongodb.casbah.TypeImports.MongoCollection, wc: WriteConcern, cause: LegacyErrorOrMongoException, dbos: List[DBObject]) extends SalatDAOError with Product with Serializable

    Permalink
  11. case class SalatMongoCursor[T <: AnyRef](_grater: Grater[T], underlying: DBCursor)(implicit evidence$9: Manifest[T]) extends SalatMongoCursorBase[T] with Iterator[T] with Product with Serializable

    Permalink
  12. trait SalatMongoCursorBase[T <: AnyRef] extends Logging

    Permalink

    Unfortunately, MongoCursorBase is typed to DBObject, but....

    Unfortunately, MongoCursorBase is typed to DBObject, but.... Ripped off from casbah-mapper. https://github.com/maxaf/casbah-mapper/blob/master/src/main/scala/mapper/MappedCollection.scala

  13. case class SalatRemoveError(description: String, collection: com.mongodb.casbah.TypeImports.MongoCollection, wc: WriteConcern, cause: LegacyErrorOrMongoException, dbos: List[DBObject]) extends SalatDAOError with Product with Serializable

    Permalink
  14. case class SalatRemoveQueryError(whichDAO: String, collection: com.mongodb.casbah.TypeImports.MongoCollection, query: DBObject, wc: WriteConcern, cause: LegacyErrorOrMongoException) extends SalatDAOQueryError with Product with Serializable

    Permalink
  15. case class SalatSaveError(description: String, collection: com.mongodb.casbah.TypeImports.MongoCollection, wc: WriteConcern, cause: LegacyErrorOrMongoException, dbos: List[DBObject]) extends SalatDAOError with Product with Serializable

    Permalink
  16. abstract class Validates[T] extends AnyRef

    Permalink
  17. abstract class ValidatingSalatDAO[ObjectType <: AnyRef, ID] extends SalatDAO[ObjectType, ID]

    Permalink
  18. case class ValidationError[T](t: T, iter: Iterable[Throwable]) extends Error with Product with Serializable

    Permalink

Value Members

  1. object SalatDAOError extends Serializable

    Permalink
    Attributes
    protected
  2. object SalatDAOUpdateError extends Serializable

    Permalink
  3. object SalatInsertError extends Serializable

    Permalink
  4. object SalatRemoveError extends Serializable

    Permalink
  5. object SalatRemoveQueryError extends Serializable

    Permalink
  6. object SalatSaveError extends Serializable

    Permalink

Ungrouped