|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
AdminAutofetch | Administrative control of Autofetch during runtime. |
AdminLogging | Administrative control over transaction logging at 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 | Represents a Conjunction or a Disjunction. |
Page<T> | Represents a Page of results that is part of a PagingList. |
PagingList<T> | Used to page through a query result rather than fetching all the results in a single query. |
Query<T> | Object relational query for finding a List, Set, Map or single entity bean. |
QueryListener<T> | Provides a mechanism for processing a query one bean at a time. |
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. |
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 Summary | |
---|---|
Ebean | This Ebean object is effectively a singleton that holds a map of registered
EbeanServer s. |
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". |
InvalidValue | Invalid value returned from validation rules. |
JoinConfig | Defines the configuration options for a "query join" or a "lazy loading join". |
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. |
TxScope | Holds the definition of how a transactional method should run. |
ValuePair | Holds two values as the result of a difference comparison. |
Enum Summary | |
---|---|
AdminLogging.LogFileSharing | Defines if transactions share a single log file or each have their own transaction log file. |
AdminLogging.LogLevel | The transaction logging level. |
AdminLogging.LogLevelStmt | Statement logging level. |
AdminLogging.LogLevelTxnCommit | A log level for transaction begin, commit and rollback events. |
LikeType | Used to specify the type of like matching used. |
Query.Type | The type of query result. |
TxIsolation | The Transaction Isolation levels. |
TxType | Used to define the transactional scope for executing a method. |
Exception Summary | |
---|---|
ValidationException | Exception thrown when a validation rule fails when saving a bean. |
Core API (see Ebean and EbeanServer).
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);
|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |