com.outr.query.orm

MappedTable

abstract class MappedTable[T] extends Table with Listenable

MappedTable is the base-class used for mapping a class to a table.

Linear Supertypes
Listenable, Table, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MappedTable
  2. Listenable
  3. Table
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MappedTable(datastore: Datastore, tableProperties: TableProperty*)(implicit manifest: Manifest[T])

  2. new MappedTable(datastore: Datastore, name: String, tableProperties: TableProperty*)(implicit manifest: Manifest[T])

Abstract Value Members

  1. abstract def object2Row(value: T, onlyChanges: Boolean = true): MappedObject[T]

    Converts the supplied object to a MappedObject representing the modified object (during persistence) along with the column values to send to the database.

    Converts the supplied object to a MappedObject representing the modified object (during persistence) along with the column values to send to the database.

    value

    the instance to be converted to row representation

    onlyChanges

    true if only the changed values should be supplied

    returns

    MappedObject[T]

  2. abstract def primaryKeysFor(value: T): List[ColumnValue[_]]

    Retrieves a list of ColumnValue entries representing the primary keys for this table and their values based upon the supplied instance.

    Retrieves a list of ColumnValue entries representing the primary keys for this table and their values based upon the supplied instance.

    value

    the instance to get the primary keys from

    returns

    List of primary keys tied to columns

  3. abstract def q: Query

    Generates a query that will pull back all necessary fields and joins to represent the instance.

  4. abstract def result2Object(result: QueryResult): T

    Responsible method for converting a QueryResult into an instance of T.

    Responsible method for converting a QueryResult into an instance of T.

    result

    representation of result as an object T

    returns

    T

  5. abstract def updateWithId(t: T, id: Int): T

    Updates the supplied instance with a new id and returns the updated instance.

    Updates the supplied instance with a new id and returns the updated instance.

    t

    the instance to assign an id to

    id

    the id to be assigned

    returns

    a copy of the instance with the new id

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def *: List[Column[_]]

    Definition Classes
    Table
  5. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  6. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  7. def addColumn[T](column: Column[T]): ListBuffer[Column[_]]

    Attributes
    protected[com.outr.query]
    Definition Classes
    Table
  8. def addForeignColumn[T](column: Column[T]): ListBuffer[Column[_]]

    Attributes
    protected[com.outr.query]
    Definition Classes
    Table
  9. def as(alias: String): TableAlias

    Definition Classes
    Table
  10. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  11. lazy val autoIncrement: Option[Column[_]]

    Definition Classes
    Table
  12. implicit def bigDecimalConverter: BigDecimalConverter.type

    Definition Classes
    Table
  13. implicit def blobConverter: BlobConverter.type

    Definition Classes
    Table
  14. implicit def booleanConverter: BooleanConverter.type

    Definition Classes
    Table
  15. def byId(primaryKey: Any): Option[T]

    Retrieves an instance by id.

    Retrieves an instance by id.

    primaryKey

    the primary key to look up the instance

    returns

    Option[T]

  16. implicit def byteArrayConverter: ByteArrayConverter.type

    Definition Classes
    Table
  17. def cached(key: Any): Option[T]

  18. lazy val clazz: EnhancedClass

  19. def clearCached(key: Any): Unit

  20. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. def column[T](name: String, converter: ColumnConverter[T], properties: ColumnProperty*)(implicit manifest: Manifest[T]): Column[T]

    Definition Classes
    Table
  22. def column[T](name: String, properties: ColumnProperty*)(implicit converter: ColumnConverter[T], manifest: Manifest[T]): Column[T]

    Definition Classes
    Table
  23. def columns: List[Column[_]]

    Definition Classes
    Table
  24. def columnsByName[T](names: String*): Seq[Column[T]]

    Definition Classes
    Table
  25. def delete(t: T): Boolean

    Deletes the supplied instance.

    Deletes the supplied instance.

    t

    the instance to delete

    returns

    true if the delete was successful - will only be false if "deleting" event processor returns None

  26. val deleted: UnitProcessor[T]

    Fired immediately after successful delete.

  27. val deleting: ModifiableOptionProcessor[T]

    Fired immediately before deleting an object from the database.

    Fired immediately before deleting an object from the database. The instance may be modified or None returned to avoid deletion.

  28. implicit def doubleConverter: DoubleConverter.type

    Definition Classes
    Table
  29. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  30. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  31. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  32. lazy val foreignKeys: List[Column[_]]

    Definition Classes
    Table
  33. def get[P <: TableProperty](propertyName: String): Option[P]

    Definition Classes
    Table
  34. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  35. def getColumn[T](name: String): Option[Column[T]]

    Definition Classes
    Table
  36. def has(propertyName: String): Boolean

    Definition Classes
    Table
  37. def has(property: TableProperty): Boolean

    Definition Classes
    Table
  38. def hasId(instance: T): Boolean

    True if the supplied instance has an id assigned (meaning it has been persisted).

  39. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  40. def idFor[C](instance: T): Option[ColumnValue[C]]

    Returns an optional ColumnValue[C] for the supplied instance based on whether it has been persisted.

  41. def insert(t: T): T

    Inserts the supplied instance into the datastore.

    Inserts the supplied instance into the datastore.

    t

    the instance to insert

    returns

    updated instance reflecting any changes resulting from the insert

  42. val inserted: UnitProcessor[T]

    Fired immediate after successful insert.

  43. val inserting: ModifiableProcessor[T]

    Fired immediately before inserting a new object into the database.

    Fired immediately before inserting a new object into the database. The instance may be modified in the response.

  44. implicit def intConverter: IntConverter.type

    Definition Classes
    Table
  45. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  46. def listen[Event, Response, Result](name: String, priority: Priority, modes: ListenMode*)(f: (Event) ⇒ Response)(implicit eventManifest: Manifest[Event]): FunctionalListener[Event, Response]

    Definition Classes
    Listenable
  47. val listeners: Listeners

    Definition Classes
    Listenable
  48. implicit def longConverter: LongConverter.type

    Definition Classes
    Table
  49. implicit val manifest: Manifest[T]

  50. lazy val many2Many: List[Column[_]]

    Definition Classes
    Table
  51. lazy val many2One: List[Column[_]]

    Definition Classes
    Table
  52. def merge(t: T): T

    Merges the instance into the database.

    Merges the instance into the database. If a row already exists matching the primary keys of the instance it will be replaced, otherwise the record will be inserted.

    t

    the instance to merge

    returns

    updated instance reflecting any changes resulting from the merge

  53. val merged: UnitProcessor[T]

    Fired immediate after successful merge.

  54. val merging: ModifiableProcessor[T]

    Fired immediately before merging a new object into the database.

    Fired immediately before merging a new object into the database. The instance may be modified in the response.

  55. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  56. final def notify(): Unit

    Definition Classes
    AnyRef
  57. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  58. lazy val one2Many: List[Column[_]]

    Definition Classes
    Table
  59. lazy val one2One: List[Column[_]]

    Definition Classes
    Table
  60. def persist(t: T): T

    Inserts or updates the supplied instance based on whether an id is assigned to the instance.

    Inserts or updates the supplied instance based on whether an id is assigned to the instance.

    t

    the instance to persist

    returns

    updated instance reflecting any changes resulting from the persist

  61. val persisted: ModifiableProcessor[T]

    Fired immediate after successful persisting.

    Fired immediate after successful persisting. Persisted is called after insert, merge, and update.

  62. val persisting: ModifiableProcessor[T]

    Fired immediately before persisting an object to the database.

    Fired immediately before persisting an object to the database. The instance may be modified in the response. Persisting is called before insert, merge, and update.

  63. lazy val primaryKeys: List[Column[_]]

    Definition Classes
    Table
  64. def prop[P <: TableProperty](propertyName: String): P

    Definition Classes
    Table
  65. def properties: Iterable[TableProperty]

    Definition Classes
    Table
  66. def props(properties: TableProperty*): Table

    Definition Classes
    Table
  67. val queried: ModifiableProcessor[T]

    Fired immediately after querying an instance.

    Fired immediately after querying an instance. Listeners have the ability to modify the resulting instance.

  68. def query(query: Query): ORMResultsIterator[T]

    Queries the datastore for results based upon the supplied query.

    Queries the datastore for results based upon the supplied query.

    query

    the query to utilize

    returns

    iterator to cycle through instances derived from query result rows

  69. implicit def stringConverter: StringConverter.type

    Definition Classes
    Table
  70. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  71. lazy val tableName: String

    Definition Classes
    Table
  72. implicit val thisListenable: Listenable

    Definition Classes
    Listenable
  73. implicit def thisTable: Table

    Definition Classes
    Table
  74. implicit def timestampConverter: TimestampConverter.type

    Definition Classes
    Table
  75. def toString(): String

    Definition Classes
    Table → AnyRef → Any
  76. def update(t: T): T

    Updates the provided instance to the database.

    Updates the provided instance to the database.

    t

    the instance to update

    returns

    updated instance reflecting any changes resulting from the update to the database

  77. def updateCached(key: Any, instance: T): Unit

  78. val updated: UnitProcessor[T]

    Fired immediately after successful update.

  79. val updating: ModifiableProcessor[T]

    Fired immediately before updating an object in the database.

    Fired immediately before updating an object in the database. The instance may be modified in the response.

  80. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  81. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  82. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  83. implicit def wrappedStringConverter: WrappedStringConverter.type

    Definition Classes
    Table

Inherited from Listenable

Inherited from Table

Inherited from AnyRef

Inherited from Any

Ungrouped