Package com.avaje.ebean

Core API (see Ebean and EbeanServer).


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 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".
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.

Package com.avaje.ebean Description

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 = 
        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();
        ArrayList orderLines = new ArrayList();

        // add a line to the order
        Product prodRef = Ebean.getReference(Product.class, 41);
        OrderLine line = new OrderLine();

        // save the order and its lines in a single transaction
        // NB: assumes CascadeType.PERSIST is set on the order lines association;

        // 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);
        // save the contact back to the HR database; 

Copyright © 2010. All Rights Reserved.