| 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.
|
| EbeanServer |
Provides the API for fetching and saving beans to a particular DataSource.
|
| 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.
|
| 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.
|
| PagedList<T> |
Represents a page of results.
|
| Query<T> |
Object relational query for finding a List, Set, Map or single entity bean.
|
| QueryEachConsumer<T> |
Used to process a query result one bean at a time via a callback to this
visitor.
|
| QueryEachWhileConsumer<T> |
Used to process a query result one bean at a time via a callback to this
visitor.
|
| QueryIterator<T> |
Used to provide iteration over query results.
|
| SqlFutureList |
The SqlFutureList represents the result of a background SQL query execution.
|
| SqlQuery |
Query object for performing native SQL queries that return SqlRow's.
|
| SqlQueryListener |
Provides a mechanism for processing a SqlQuery one SqlRow at a time.
|
| 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.
|
| TxCallable<T> |
Execute a TxCallable in a Transaction scope.
|
| TxRunnable |
Execute a TxRunnable in a Transaction scope.
|
| Update<T> |
An Insert Update or Delete statement.
|
| Class | Description |
|---|---|
| Ebean |
This Ebean object is effectively a singleton that holds a map of registered
EbeanServers. |
| EbeanServerFactory |
Creates EbeanServer instances.
|
| 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.
|
| Model |
A MappedSuperclass base class that provides convenience methods for inserting, updating and
deleting beans.
|
| Model.Find<I,T> |
Helper object for performing queries.
|
| Model.Finder<I,T> |
A concrete implementation of Find.
|
| OrderBy<T> |
Represents an Order By for a Query.
|
| OrderBy.Property |
A property and its ascending descending order.
|
| RawSql |
Used to build object graphs based on a raw SQL statement (rather than
generated by Ebean).
|
| RawSql.ColumnMapping |
Defines the column mapping for raw sql DB columns to bean properties.
|
| RawSql.ColumnMapping.Column |
A Column of the RawSql that is mapped to a bean property (or ignored).
|
| RawSql.Sql |
Represents the sql part of the query.
|
| RawSqlBuilder |
Builds RawSql instances from a SQL string and column mappings.
|
| 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 |
|---|---|
| LikeType |
Used to specify the type of like matching used.
|
| PersistenceContextScope |
Defines the scope for PersistenceContext.
|
| TxIsolation |
The Transaction Isolation levels.
|
| TxType |
Used to define the transactional scope for executing a method.
|
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")
.findUnique();
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 © 2015. All rights reserved.