com.atomizesoftware.spin.data.dao

DAO

abstract class DAO[T] extends AnyRef

Implements the standard behavior and features of a Data Access Object(DAO).

A DAO object always has a one-to-one relation with a Table instance

Linear Supertypes
AnyRef, Any
Known Subclasses
CargoDAO, CargoDAOImpl, CargoTypeDAO, CargoTypeDAOImpl, CompanyDAO, CompanyDAOImpl, ContainerDAO, ContainerDAOImpl, ContainerTypeDAO, ContainerTypeDAOImpl, ContractDAO, ContractDAOImpl, CustomerDAO, CustomerDAOImpl, CustomsStatusDAO, CustomsStatusDAOImpl, DeviceDAO, DeviceDAOImpl, DocumentAssociationDAO, DocumentAssociationDAOImpl, DocumentDAO, DocumentDAOImpl, DocumentFileDAO, DocumentFileDAOImpl, DocumentTypeDAO, DocumentTypeDAOImpl, EquipmentDAO, EquipmentDAOImpl, EquipmentTypeDAO, EquipmentTypeDAOImpl, GPSDAO, GPSDAOImpl, GroupDAO, GroupDAOImpl, GroupLocationDAO, GroupLocationDAOImpl, GroupMenuDAO, GroupMenuDAOImpl, GroupMovementTypeDAO, GroupMovementTypeDAOImpl, GroupPermissionDAO, GroupPermissionDAOImpl, IncidentTypeDAO, IncidentTypeDAOImpl, InvoicingStatusDAO, InvoicingStatusDAOImpl, ItemStatusDAO, ItemStatusDAOImpl, KVSDAO, KVSDAOImpl, LanguageDAO, LanguageDAOImpl, LocationDAO, LocationDAOImpl, LocationPathDAO, LocationPathDAOImpl, LocationTypeDAO, LocationTypeDAOImpl, MenuDAO, MenuDAOImpl, MovableItemDAO, MovableItemDAOImpl, MovableItemSnapshotDAO, MovableItemSnapshotDAOImpl, MovableItemTypeDAO, MovableItemTypeDAOImpl, MovementDAO, MovementDAOImpl, MovementStatusDAO, MovementStatusDAOImpl, MovementTypeDAO, MovementTypeDAOImpl, NumberStandardDAO, NumberStandardDAOImpl, OrderDAO, OrderDAOImpl, OrderStatusDAO, OrderStatusDAOImpl, OrderTypeDAO, OrderTypeDAOImpl, ParameterDAO, ParameterDAOImpl, ParameterTypeDAO, ParameterTypeDAOImpl, PermissionDAO, PermissionDAOImpl, PriceDAO, PriceDAOImpl, ReportDAO, ReportDAOImpl, ServiceLevelAgreementDAO, ServiceLevelAgreementDAOImpl, ShapeDAO, ShapeDAOImpl, SupplierDAO, SupplierDAOImpl, TagAssociationDAO, TagAssociationDAOImpl, TagDAO, TagDAOImpl, UserDAO, UserDAOImpl, UserDefinedFieldsDefinitionDAO, UserDefinedFieldsDefinitionDAOImpl, UserGroupDAO, UserGroupDAOImpl, UserMovementTypeDAO, UserMovementTypeDAOImpl
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DAO
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DAO(dataModel: DataModel)(implicit arg0: ClassTag[T])

Value Members

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

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Definition Classes
    AnyRef → Any
  4. def all(implicit session: scala.slick.jdbc.JdbcBackend.Session): List[T]

    Returns all models from the table

  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. def audit(id: Long, action: String, oldModel: Option[T])(implicit session: scala.slick.jdbc.JdbcBackend.Session, currentUser: AuthenticatedUser): Unit

    Records the changes a user made to a model

    Records the changes a user made to a model

    After inserting or deleting a model, a record with the new and old values is inserted into the audit table. After an update or partial update the changed columns are calculated and a record with those changes is inserted into the audit table.

    id

    of the changed model

    action

    made over the model

    oldModel

    unmodified model

  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. lazy val columnNamesForInsert: String

  9. lazy val columnNamesForSelect: String

  10. lazy val columnsNamesWithReferences: List[String]

  11. lazy val columnsTypes: List[Class[_]]

  12. val db: scala.slick.jdbc.JdbcBackend.Database

  13. def delete(id: Long)(implicit session: scala.slick.jdbc.JdbcBackend.Session, currentUser: AuthenticatedUser): Boolean

    Deletes the model and returns 1 if succeeds and 0 if it doesn't

  14. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def getById(id: Long)(implicit session: scala.slick.jdbc.JdbcBackend.Session): Option[T]

    Finds the model with the given id.

  18. def getByIdWithFilters(id: Long, filter: String = "", filterOr: String = "")(implicit session: scala.slick.jdbc.JdbcBackend.Session): Option[T]

    Finds the model with the given id and filters.

  19. def getByIdWithFiltersAndReferences(id: Long, filter: String = "", filterOr: String = "", references: String = "")(implicit session: scala.slick.jdbc.JdbcBackend.Session): Option[T]

    Finds the model with the given filters and id and returns it with the specified references

  20. def getByIdWithReferences(id: Long, references: String = "")(implicit session: scala.slick.jdbc.JdbcBackend.Session): Option[T]

    Finds the model with the given id and returns it with the specified references

  21. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  22. implicit val getResult: GetResult[T]

  23. def getTotalRecordNumber(and: String = "", or: String = "", search: String = "", include: String = "")(implicit session: scala.slick.jdbc.JdbcBackend.Session): Long

    Returns the total record count of a result of a specific select statement with joins, where and search statements.

    Returns the total record count of a result of a specific select statement with joins, where and search statements.

    and

    expression of format column:value,column:value to apply as an AND expression, filtering the result set

    search

    if not empty, perform a full text search over the result set.

  24. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  25. lazy val idColumn: String

  26. lazy val idColumnName: String

  27. def insert(model: T)(implicit session: scala.slick.jdbc.JdbcBackend.Session, currentUser: AuthenticatedUser): Option[Long]

    Inserts a model in the corresponding table and, if succeeded, returns the new pk value

  28. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  29. val logger: Logger

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

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

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

    Definition Classes
    AnyRef
  33. def partialUpdate(model: T)(implicit session: scala.slick.jdbc.JdbcBackend.Session, currentUser: AuthenticatedUser): Boolean

    Only updates the values of the model specified in the fields sequence.

    Only updates the values of the model specified in the fields sequence.

    Zips the column names and values and then filters them in order to update only the fields specified in the parameter.

    model

    to with values to update

  34. lazy val qualifiedColumnsNames: List[String]

  35. lazy val qualifiedColumnsNamesWithAlias: List[String]

  36. def select[R](include: String = "", and: String = "", or: String = "", search: String = "", orderBy: String = "", timeZoneId: String = "", pageOffset: Int = 0, pageSize: Int = 0)(implicit rconv: GetResult[R], s: scala.slick.jdbc.JdbcBackend.Session): StaticQuery[Unit, R]

    Builds a complex SQL SELECT statement, with optional LEFT JOINS, filterStr, search and sort

    Builds a complex SQL SELECT statement, with optional LEFT JOINS, filterStr, search and sort

    include

    list of tables to include in the query. By specifying this parameter to a non-empty list, it will originate a SQL SELECT statement with LEFT JOINs, one per linked table

    and

    expression of format column:value,column:value to apply as an AND expression, filtering the result set

    or

    expression of format column:value, column:value to apply as an OR expression, expanding the result set

    search

    if not empty, perform a full text search over the result set. The search expression follows the following syntax: a space is AND, a + is OR, * is wildcard

    orderBy

    expression of format column:asc,column:desc to apply as an ORDER BY expression

    timeZoneId

    desired time zone at which the timestamp columns should be converted

    pageOffset

    pages the result set, starting at the position defined by this parameter

    pageSize

    returns this amount of records, starting at the position defined by pageOffset

  37. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  38. lazy val table: Table[T]

    The table where this DAO will operate.

    The table where this DAO will operate. This is inferred by the type T

  39. lazy val tableInfo: TableInfo

  40. lazy val tableName: String

  41. def toString(): String

    Definition Classes
    AnyRef → Any
  42. def update(model: T)(implicit session: scala.slick.jdbc.JdbcBackend.Session, currentUser: AuthenticatedUser): Boolean

    Updates all values of the model, except the Id.

  43. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. def where(whereClause: String, parameters: Map[String, Any] = Map(), explicitIncludes: String = "")(implicit rconv: GetResult[T], s: scala.slick.jdbc.JdbcBackend.Session): StaticQuery[Unit, T]

    Builds a database independent SELECT query with a free text WHERE clause, using named parameters.

    Builds a database independent SELECT query with a free text WHERE clause, using named parameters. All needed LEFT JOINs are infered from the whereClause and are added to the final query, in a totally transparent way to the user (developer).

    whereClause

    any SQL syntax that usually follows the WHERE keyword. References to other tables or self should be enclosed in curly braces ({}). The reference in curly braces will bee properly quoted according to the database idiom and it will be replaced by the correct table name or alias, following the DAO convention (Container_0_1, AS Container_49_Number). Query parameters are denoted by a colon character followed by a name. Example: {Container.Number}=:containerNumber

    parameters

    a Map where the key is a parameter name and the value the parameter value

    Example: val query = movementDAO.where(""" {Driver.IdentificationDocument}=:driverDocument AND {MovementStatus.Code}=:movementStatusCode AND {MovementType.Code}=:movementTypeCode """, parameters = Map( "driverDocument" -> "9803605", "movementStatusCode" -> "COMPLETED", "movementTypeCode" -> "TRUCK_GATE_IN" ))

Inherited from AnyRef

Inherited from Any

Ungrouped