Module io.ebean.querybean
Package io.ebean.typequery
package io.ebean.typequery
Provides type safe query criteria support for Ebean ORM queries.
'Query beans' like QCustomer are generated using the avaje-ebeanorm-typequery-generator
for each entity bean type and can then be used to build queries with type safe criteria.
Example - usage of QCustomer
Date fiveDaysAgo = ...
List<Customer> customers =
new QCustomer()
// name is a known property of type string so
// it has relevant expressions such as like, startsWith etc
.name.ilike("rob")
// status is a specific Enum type is equalTo() in() etc
.status.equalTo(Customer.Status.GOOD)
// registered is a date type with after(), before() etc
.registered.after(fiveDaysAgo)
// contacts is an associated bean containing specific
// properties and in this case we use email which is a string type
.contacts.email.endsWith("@foo.com")
.orderBy()
.name.asc()
.registered.desc()
.findList();
-
ClassDescriptionUsed to denote a query bean that has already been enhanced.Marks generated query bean source code.IQueryBean<T,
R extends IQueryBean<T, R>> Query bean for strongly typed query construction and execution.PArray<R,E> Array property with E as the element type.PBaseComparable<R,T> Base property for all comparable types.PBaseDate<R,T extends Comparable> Base property for date and date time types.PBaseNumber<R,T extends Comparable> Base property for number types.PBaseString<R,T> Base for property types that store as String Varchar types.PBaseTime<R,T extends Comparable> Base property for time types.PBaseValueEqual<R,T> Base property for types that primarily have equal to.PBigDecimal<R>BigDecimal property.PBigInteger<R>BigInteger property.PBoolean<R>Boolean property.PByteArray<R>Byte array property (byte[]).PCalendar<R>Calendar property.PCidr<R>Cidr property.PClass<R>Class property.PCurrency<R>Currency property.PDayOfWeek<R>DayOfWeek property.PDouble<R>Double property.PDuration<R>Duration property.PEnum<R,E> Enum property.PFile<R>File property.PFloat<R>Float property.PInet<R>Inet property.PInetAddress<R>InetAddress property.PInstant<R>Instant property.PInteger<R>Integer property.Joda DateMidnight property.Joda DateTime property.Joda LocalDate property.Joda LocalDateTime property.Joda LocalTime property.PJson<R>JSON document type.PLocalDate<R>LocalDate property.LocalDateTime property.PLocale<R>Locale property.PLocalTime<R>LocalTime property.PLong<R>Long property.PMonth<R>LocalDateTime property.PMonthDay<R>MonthDay property.OffsetDateTime property.POffsetTime<R>OffsetTime property.PScalar<R,D> Property for classes that are serialized/deserialized by ScalarType/AttributeConverter.PScalarComparable<R,D extends Comparable<D>> Property for classes that are serialized/deserialized by ScalarType/AttributeConverter.PShort<R>Short property.PSqlDate<R>Java sql Date property.PString<R>String property.PTime<R>Time property.PTimestamp<R>Property for java sql Timestamp.PTimeZone<R>TimeZone property.PUri<R>URI property.PUrl<R>URL property.PUtilDate<R>Java util Date property.PUuid<R>UUID property.PYear<R>Year property.PYearMonth<R>YearMonth property.ZonedDateTime property.PZoneId<R>ZoneId property.PZoneOffset<R>ZoneOffset property.Base root query bean providing common features for all root query beans.TQAssoc<T,R> Base type for associated beans.TQAssocBean<T,R, QB> Base type for associated beans that are not embeddable.TQAssocMany<T,R, QB> Expressions for Query Bean ToMany relationships.Helper for adding a path prefix to a property.TQProperty<R,T> A property used in type query.TQPropertyBase<R,T> Base scalar property.Used to denote a type query bean.