com.atomizesoftware.spin.data.dao.CargoDAOComponent

CargoDAOImpl

class CargoDAOImpl extends DAO[Cargo] with CargoDAO

Linear Supertypes
CargoDAO, DAO[Cargo], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. CargoDAOImpl
  2. CargoDAO
  3. DAO
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CargoDAOImpl()

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[Cargo]

    Returns all models from the table

    Returns all models from the table

    Definition Classes
    DAO
  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. def audit(id: Long, action: String, oldModel: Option[Cargo])(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

    Definition Classes
    DAO
  7. def cargosInsideOf(containerId: Long, depth: Int = 1)(implicit session: scala.slick.jdbc.JdbcBackend.Session): List[Cargo]

    Returns all the cargos that are inside of the container with the provided id.

    Returns all the cargos that are inside of the container with the provided id.

    returns

    a List of cargos.

    Definition Classes
    CargoDAOImplCargoDAO
  8. def cargosWhereLocationIdEquals(locationId: Long, include: String = "")(implicit session: scala.slick.jdbc.JdbcBackend.Session): List[Cargo]

    Gets the com.atomizesoftware.spin.models.Cargos that are in a given location and its children.

    Gets the com.atomizesoftware.spin.models.Cargos that are in a given location and its children. The cargos that are parked in the given location and its children.

    returns

    a list of cargos in the location

    Definition Classes
    CargoDAOImplCargoDAO
  9. def cargosWhereParentIdEquals(parentId: Long)(implicit session: scala.slick.jdbc.JdbcBackend.Session): List[Cargo]

    Gets the com.atomizesoftware.spin.models.Cargos with a given parent.

    Gets the com.atomizesoftware.spin.models.Cargos with a given parent. The Cargos that are children of the given parent.

    returns

    a list of cargos with the given parent.

    Definition Classes
    CargoDAOImplCargoDAO
  10. def cargosWithSyncTimestampGreaterOrEqualThan(syncTimestamp: Long, include: String = "")(implicit session: scala.slick.jdbc.JdbcBackend.Session): List[Cargo]

    Gets the com.atomizesoftware.spin.models.Cargos based on the given SyncTimestamp The cargos that have the a SyncTimestamp greater or equal than the given.

    Gets the com.atomizesoftware.spin.models.Cargos based on the given SyncTimestamp The cargos that have the a SyncTimestamp greater or equal than the given.

    returns

    a list of cargos to be sent to mobile device.

    Definition Classes
    CargoDAOImplCargoDAO
  11. def clone(): AnyRef

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

    Definition Classes
    CargoDAOImplDAO
  13. lazy val columnNamesForSelect: String

    Definition Classes
    DAO
  14. lazy val columnsNamesWithReferences: List[String]

    Definition Classes
    DAO
  15. lazy val columnsTypes: List[Class[_]]

    Definition Classes
    DAO
  16. val db: scala.slick.jdbc.JdbcBackend.Database

    Definition Classes
    DAO
  17. 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

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

    Definition Classes
    DAO
  18. final def eq(arg0: AnyRef): Boolean

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

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

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

    Finds the model with the given id.

    Finds the model with the given id.

    Definition Classes
    DAO
  22. def getByIdWithFilters(id: Long, filter: String = "", filterOr: String = "")(implicit session: scala.slick.jdbc.JdbcBackend.Session): Option[Cargo]

    Finds the model with the given id and filters.

    Finds the model with the given id and filters.

    Definition Classes
    DAO
  23. def getByIdWithFiltersAndReferences(id: Long, filter: String = "", filterOr: String = "", references: String = "")(implicit session: scala.slick.jdbc.JdbcBackend.Session): Option[Cargo]

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

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

    Definition Classes
    DAO
  24. def getByIdWithReferences(id: Long, references: String = "")(implicit session: scala.slick.jdbc.JdbcBackend.Session): Option[Cargo]

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

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

    Definition Classes
    DAO
  25. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  26. implicit val getResult: GetResult[Cargo]

    Definition Classes
    DAO
  27. 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.

    Definition Classes
    DAO
  28. def hashCode(): Int

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

    Definition Classes
    DAO
  30. lazy val idColumnName: String

    Definition Classes
    DAO
  31. def insert(model: Cargo)(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

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

    Definition Classes
    CargoDAOImplDAO
  32. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  33. val logger: Logger

    Definition Classes
    DAO
  34. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  37. def partialUpdate(model: Cargo)(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

    Definition Classes
    DAO
  38. lazy val qualifiedColumnsNames: List[String]

    Definition Classes
    DAO
  39. lazy val qualifiedColumnsNamesWithAlias: List[String]

    Definition Classes
    DAO
  40. 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

    Definition Classes
    DAO
  41. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  42. lazy val table: Table[Cargo]

    The table where this DAO will operate.

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

    Definition Classes
    DAO
  43. lazy val tableInfo: TableInfo

    Definition Classes
    DAO
  44. lazy val tableName: String

    Definition Classes
    DAO
  45. def toString(): String

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

    Updates all values of the model, except the Id.

    Updates all values of the model, except the Id.

    Definition Classes
    DAO
  47. final def wait(): Unit

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

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

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

    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" ))

    Definition Classes
    DAO

Inherited from CargoDAO

Inherited from DAO[Cargo]

Inherited from AnyRef

Inherited from Any

Ungrouped