Returns all models from the table
Returns all models from the table
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.
of the changed model
made over the model
unmodified model
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
Finds the model with the given id.
Finds the model with the given id.
Finds the model with the given id and filters.
Finds the model with the given id and filters.
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
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
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.
expression of format column:value,column:value to apply as an AND expression, filtering the result set
if not empty, perform a full text search over the result set.
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
Gets a com.atomizesoftware.spin.models.ParameterType by its code.
Gets a com.atomizesoftware.spin.models.ParameterType by its code.
a parameter type if one is found, None otherwise.
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.
to with values to update
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
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
expression of format column:value,column:value to apply as an AND expression, filtering the result set
expression of format column:value, column:value to apply as an OR expression, expanding the result set
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
expression of format column:asc,column:desc to apply as an ORDER BY expression
desired time zone at which the timestamp columns should be converted
pages the result set, starting at the position defined by this parameter
returns this amount of records, starting at the position defined by pageOffset
The table where this DAO will operate.
The table where this DAO will operate. This is inferred by the type T
Updates all values of the model, except the Id.
Updates all values of the model, except the Id.
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).
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
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" ))