The EclipseLink expression framework provides methods through the following classes:
The Expression
class provides most general functions, such as toUpperCase
.
The ExpressionMath
class supplies mathematical methods.
This division of functionality enables EclipseLink expressions to provide similar mathematical functionality to the java.lang.Math
class, but keeps both the Expression
and ExpressionMath
classes from becoming unnecessarily complex.
Expressions offer the following advantages over SQL when you access a database:
Expressions are easier to maintain because the database is abstracted.
Changes to descriptors or database tables do not affect the querying structures in the application.
Expressions enhance readability by standardizing the Query
interface so that it looks similar to traditional Java calling conventions.
Expressions allow read queries to transparently query between two classes that share a relationship. If these classes are stored in multiple tables in the database, EclipseLink automatically generates the appropriate join statements to return information from both tables.
Expressions simplify complex operations.