Class EclipseLinkSemanticValidator

All Implemented Interfaces:
EclipseLinkExpressionVisitor, ExpressionVisitor

public class EclipseLinkSemanticValidator extends AbstractEclipseLinkSemanticValidator
This validator is responsible to gather the problems found in a JPQL query by validating the content to make sure it is semantically valid for EclipseLink. The grammar is not validated by this visitor.

For instance, the function AVG accepts a state field path. The property it represents has to be of numeric type. AVG(e.name) is parsable but is not semantically valid because the type of name is a string (the property signature is: "private String name").

Note: EclipseLink does not validate types, but leaves it to the database. This is because some databases such as Oracle allow different types to different functions and perform implicit type conversion. i.e. CONCAT('test', 2) returns 'test2'. Also the FUNC function has an unknown type, so should be allowed with any function.

Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

Since:
2.4
Version:
2.5
See Also: