This trait can be added to existing Mapper fields to make them use AjaxUtils.editable for field display.
A trait that defines foreign key references
The base (not Typed) trait that defines a field that is mapped to a column or more than 1 column (e.g., MappedPassword) in the database
Represents a query criterion using a parameterized SQL string.
Represents a query criterion using a parameterized SQL string. Parameters are substituted in order. For Date/Time types, passing a java.util.Date will result in a Timestamp parameter. If you want a specific SQL Date/Time type, use the corresponding java.sql.Date, java.sql.Time, or java.sql.Timestamp classes.
This trait automatically adds CRUD (Create, read, update and delete) operations to an existing MetaMapper object.
This trait automatically adds CRUD (Create, read, update and delete) operations to an existing MetaMapper object. Various methods can be overridden to customize which operations are available to a user and how things are displayed. For example, you can disable deletion of entities by overriding deleteMenuLoc to Empty.
Note: Compilation will fail if you try to mix this into a Mapper instead of the associated MetaMapper. You have been warned.
Mix this in to your extended session singleton to set the cookie path to the context path for your application.
Mix this in to your extended session singleton to set the cookie path to the context path for your application. This is useful if you have multiple applications on a single application server and want to ensure their cookies don't cross-pollinate.
Example usage:
case class AppExtendedSession extends ProtoExtendedSession[AppExtendedSession] object MetaAppExtendedSession extends MetaProtoExtendedSession[AppExtendedSession] with ContextPathExtendedCookie
A trait you can mix into a Mapper class that gives you a createdat column
Mix this trait into your Mapper instance to get createdAt and updatedAt fields.
Mix this trait into a BaseMappedField and it will be indexed
Mix with MappedLong to give a default time of millis
Represents a generic user-specified index on the given columns.
Represents a generic user-specified index on the given columns. The user provides a function to generate the SQL needed to create the index based on the table and columns. Validation is required since this is raw SQL being run on the database server.
A specialization of CRUDify for LongKeyedMetaMappers.
Add this trait to a Mapper to add support for many-to-many relationships
A field that holds the birth year for the user
Represents a date without hour, minute or second fields.
Represents a date without hour, minute or second fields. The underlying type is java.util.Date to keep things simple, but be aware that the hour, minute and second values will most likely be discarded when this is saved to the database.
MappedTime
MappedDateTime
A field that maps to a decimal value.
A field that maps to a decimal value. Decimal precision and rounding are controlled via the context parameter. The default value is zero.
Note:
Using MathContext.UNLIMITED, whether explicitly or implicitly, means
that no precision or scaling will be used for the SQL field definition; the
default scale for DECIMAL is zero per the SQL standard, but the precision
for DECIMAL is vendor-specific. For example, PostgreSQL uses maximum precision
if it's not specified, but SQL Server uses a default precision of 18.
Warning: Do not use unnamed Enumerations with 2.8.1 as this will cause too many items to be displayed in the dropdown.
Warning: Do not use unnamed Enumerations with 2.8.1 as this will cause too many items to be displayed in the dropdown.
See https://issues.scala-lang.org/browse/SI-3687 for details
The strongly typed field that's mapped to a column (or many columns) in the database.
The strongly typed field that's mapped to a column (or many columns) in the database. FieldType is the type of the field and OwnerType is the Owner of the field
The Trait that defines a field that is mapped to a foreign key
A Mapped field that is Nullable in the database.
A Mapped field that is Nullable in the database. Will return Empty box for NULL values and Full for non-null values
Just like MappedString, except it's defaultValue is "" and the length is auto-cropped to fit in the column
Represents a time with hour, minute and second fields.
Represents a time with hour, minute and second fields. The underlying type is java.util.Date to keep things simple, but be aware that the date portion of the values will most likely be discarded when this is saved to the database.
MappedDate
MappedDateTime
ProtoUser is bare bones.
ProtoUser is bare bones. MetaProtoUser contains a bunch more fields including a validated flag, locale, timezone, etc.
Mix this trait into the the Mapper singleton for User and you get a bunch of user functionality including password reset, etc.
This is the supertrait of all traits that can be mixed into a MappedField.
This is the supertrait of all traits that can be mixed into a MappedField. All methods should be abstract. They will be made concrete in implementations.
Add this trait to a Mapper for managed one-to-many support For example: class Contact extends LongKeyedMapper[Contact] with OneToMany[Long, Contact] { ...
Add this trait to a Mapper for managed one-to-many support For example: class Contact extends LongKeyedMapper[Contact] with OneToMany[Long, Contact] { ... }
the type of the primary key
the mapper type
This QueryParam can be put in a query and will cause the given foreign key field to be precached.
This QueryParam can be put in a query and will cause the given foreign key field to be precached.
- the field to precache
- true if the query is deterministic. Will be more efficient. false if the query is not deterministic. In this case, a SELECT * FROM FK_TABLE WHERE primary_key in (xxx) will be generated
The root trait for defining the session cookie path for extended sessions that defines the default session cookie path: "/".
ProtoUser is a base class that gives you a "User" that has a first name, last name, email, etc.
If this trait is mixed into a validation function, the validation for a field will stop if this validation function returns an error
Represents a unique index on the given columns
A trait you can mix into a Mapper class that gives you an updatedat column
Mix this trait into a MappedString and it will add maximum length validation to the MappedString
Rules and functions shared by all Mappers
Given a list of MetaMappers, make sure the database has the right schema
Given a list of MetaMappers, make sure the database has the right schema