Skip Headers

# Reading All Objects With a Session Query

Previous

Next

The `readAllObjects` method retrieves a `Vector` of objects from the database and does not put the returned objects in order. If the query does not find any matching objects, it returns an empty `Vector`.

Specify the class for the query. You can also include an expression to define more complex search criteria, as illustrated in Example: readAllObjects Using an Expression.

readAllObjects Using an Expression

    // Returns a Vector of employees whose employee salary is greater than 10000
    Vector employees = session.readAllObjects(Employee.class,new ExpressionBuilder.get("salary").greaterThan(10000));