Interface | Description |
---|---|
AutoTune |
Administrative control of AutoTune during runtime.
|
BackgroundExecutor |
Background thread pool service for executing of tasks asynchronously.
|
BeanState |
Provides access to the internal state of an entity bean.
|
CallableSql |
For making calls to stored procedures.
|
Database |
Provides the API for fetching and saving beans to a particular database.
|
DocumentStore |
Document storage operations.
|
DtoQuery<T> |
Query for performing native SQL queries that return DTO Bean's.
|
EbeanServer |
Provides the API for fetching and saving beans to a particular Database.
|
ExampleExpression |
Query by Example expression.
|
Expression |
An expression that is part of a WHERE or HAVING clause.
|
ExpressionFactory |
Expression factory for creating standard expressions.
|
ExpressionList<T> |
List of Expressions that make up a where or having clause.
|
ExtendedServer |
The extended API for EbeanServer.
|
FetchGroup<T> |
Defines what part of the object graph to load (select and fetch clauses).
|
FetchGroupBuilder<T> |
Builds a FetchGroup by adding fetch clauses.
|
FetchPath |
Provides paths and properties for an object graph that can be used to control what parts of the object graph
is fetching (select and fetch clauses) and also can be used to control JSON marshalling (what parts of the object
graph are included in the JSON).
|
Filter<T> |
Provides support for filtering and sorting lists of entities without going
back to the database.
|
FutureIds<T> |
FutureIds represents the result of a background query execution for the Id's.
|
FutureList<T> |
FutureList represents the result of a background query execution that will
return a list of entities.
|
FutureRowCount<T> |
Represents the result of a background query execution for the total row count
for a query.
|
Junction<T> |
Represents a Conjunction or a Disjunction.
|
MergeOptions |
Options used to control a merge.
|
PagedList<T> |
Represents a page of results.
|
ProfileLocation |
A location for profiling transactions and queries.
|
Query<T> |
Object relational query for finding a List, Set, Map or single entity bean.
|
QueryIterator<T> |
Used to provide iteration over query results.
|
RawSql |
Used to build object graphs based on a raw SQL statement (rather than
generated by Ebean).
|
RawSqlBuilder |
Builds RawSql instances from a SQL string and column mappings.
|
RowConsumer |
Used with SqlQuery to process potentially large queries reading directly from the JDBC ResultSet.
|
RowMapper<T> |
Used with SqlQuery to map raw JDBC ResultSet to objects.
|
ScriptRunner |
Runs DDL and SQL scripts.
|
SqlQuery |
Query object for performing native SQL queries that return SqlRow or directly read
ResultSet using a RowMapper.
|
SqlRow |
Used to return raw SQL query results.
|
SqlUpdate |
A SqlUpdate for executing insert update or delete statements.
|
Transaction |
The Transaction object.
|
TransactionCallback |
Provides a callback that can be registered with a Transaction.
|
Update<T> |
An Insert Update or Delete statement.
|
UpdateQuery<T> |
An update query typically intended to perform a bulk update of many rows that match the query.
|
Class | Description |
---|---|
BeanFinder<I,T> |
Provides finder functionality for use with "Dependency Injection style" use of Ebean.
|
BeanRepository<I,T> |
Provides finder functionality for use with "Dependency Injection style" use of Ebean.
|
CountedValue<A> |
Holds a distinct value with it's count.
|
DatabaseFactory |
Creates Database instances.
|
DB | |
DocStoreQueueEntry |
Bean holding the details to update the document store.
|
Ebean |
This Ebean object is effectively a singleton that holds a map of registered
EbeanServer s. |
EbeanServerFactory |
Creates EbeanServer instances.
|
EbeanVersion |
Class to determine the ebean version.
|
Expr |
Expression factory for creating standard expressions for WHERE and HAVING
clauses.
|
FetchConfig |
Defines the configuration options for a "query fetch" or a
"lazy loading fetch".
|
Finder<I,T> |
Intended to be used as a base class for 'Finder' implementations that can then
be injected or used as public static fields on the associated entity bean.
|
MergeOptionsBuilder |
Builds a MergeOptions which is immutable and thread safe.
|
Model |
A MappedSuperclass base class that provides convenience methods for inserting, updating and
deleting beans.
|
OrderBy<T> |
Represents an Order By for a Query.
|
OrderBy.Property |
A property and its ascending descending order.
|
Pairs |
Holds a list of value object pairs.
|
Pairs.Entry |
A pair of 2 value objects.
|
TransactionCallbackAdapter |
Adapter that can be extended for easier implementation of TransactionCallback.
|
TxScope |
Holds the definition of how a transactional method should run.
|
ValuePair |
Holds two values as the result of a difference comparison.
|
Version<T> |
Wraps a version of a @History bean.
|
Enum | Description |
---|---|
CacheMode |
Enum to control the different cache modes for queryCache and beanCache.
|
CountDistinctOrder |
Enumeration to use with
Query.setCountDistinct(CountDistinctOrder) . |
DocStoreQueueEntry.Action |
Action to either update or delete a document from the index.
|
Junction.Type |
The type of Junction used in full text expressions.
|
LikeType |
Used to specify the type of like matching used.
|
PersistenceContextScope |
Defines the scope for PersistenceContext.
|
Query.ForUpdate |
For update mode.
|
QueryType |
The type of the query being executed.
|
Exception | Description |
---|---|
AcquireLockException |
Thrown when failing to acquire a pessimistic lock.
|
DataIntegrityException |
Thrown when a foreign key constraint is enforced.
|
DuplicateKeyException |
Thrown when a duplicate is attempted on a unique constraint.
|
PersistenceIOException |
Captures and wraps IOException's occurring during ElasticSearch processing etc.
|
Provides the main API for fetching and persisting beans with eBean.
// EXAMPLE 1: Simple fetch
//========================
// fetch order 10
Order order = Ebean.find(Order.class, 10);
// EXAMPLE 2: Fetch an Object with associations
//=============================================
// fetch Customer 7 including their billing and shipping addresses
Customer customer =
Ebean.find(Customer.class)
.setId(7)
.fetch("billingAddress")
.fetch("shippingAddress")
.findOne();
Address billAddr = customer.getBillingAddress();
Address shipAddr = customer.getShippingAddress();
// EXAMPLE 3: Create and save an Order
//=====================================
// get a Customer reference so we don't hit the database
Customer custRef = Ebean.getReference(Customer.class, 7);
// create a new Order object
Order newOrder = new Order();
newOrder.setStatus(Order.Status.NEW);
newOrder.setCustomer(custRef);
ArrayList orderLines = new ArrayList();
newOrder.setLines(orderLines);
...
// add a line to the order
Product prodRef = Ebean.getReference(Product.class, 41);
OrderLine line = new OrderLine();
line.setProduct(prodRef);
line.setQuantity(10);
orderLines.add(line);
...
// save the order and its lines in a single transaction
// NB: assumes CascadeType.PERSIST is set on the order lines association
Ebean.save(newOrder);
// EXAMPLE 4: Use another database
//=================================
// Get access to the Human Resources EbeanServer/Database
EbeanServer hrServer = Ebean.getServer("HR");
// fetch contact 3 from the HR database
Contact contact = hrServer.find(Contact.class, 3);
contact.setStatus(Contact.Status.INACTIVE);
...
// save the contact back to the HR database
hrServer.save(contact);
Copyright © 2019. All rights reserved.