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();
-
Class Summary Class Description PArray<R,E> Array property with E as the element type.PBaseCompareable<R,T> Base property for all comparable types.PBaseDate<R,D 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.PBaseValueEqual<R,T> Base property for types that primarily have equal to.PBigDecimal<R> BigDecimal property.PBigInteger<R> BigInteger property.PBoolean<R> Boolean property.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> BigDecimal 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.PJodaDateMidnight<R> Joda DateMidnight property.PJodaDateTime<R> Joda DateTime property.PJodaLocalDate<R> Joda LocalDate property.PJodaLocalDateTime<R> Joda LocalDateTime property.PJodaLocalTime<R> Joda LocalTime property.PJson<R> JSON document type.PLocalDate<R> LocalDate property.PLocalDateTime<R> LocalDateTime property.PLocale<R> Locale property.PLocalTime<R> LocalTime property.PLong<R> Long property.PMonth<R> LocalDateTime property.PMonthDay<R> MonthDay property.POffsetDateTime<R> 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.PZoneId<R> ZoneId property.PZoneOffset<R> ZoneOffset property.TQAssocBean<T,R> Base type for associated beans.TQPath Helper for adding a path prefix to a property.TQProperty<R> A property used in type query.TQPropertyBase<R> Base scalar property.TQRootBean<T,R> Base root query bean providing common features for all root query beans. -
Annotation Types Summary Annotation Type Description AlreadyEnhancedMarker Used to denote a query bean that has already been enhanced.Generated Marks generated query bean source code.TypeQueryBean Used to denote a type query bean.