public interface ContentAssistProposals
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.
Modifier and Type | Interface and Description |
---|---|
static class |
ContentAssistProposals.ClassType
This enumeration determines the type of classes returned by
classNames() . |
static interface |
ContentAssistProposals.EnumProposals
Holds onto the
IType of the enum type and the list of possible enum constants. |
Modifier and Type | Method and Description |
---|---|
java.lang.Iterable<IEntity> |
abstractSchemaTypes()
Returns the collection of possible abstract schema types.
|
ResultQuery |
buildEscapedQuery(java.lang.String jpqlQuery,
java.lang.String proposal,
int position,
boolean insert)
Creates a new JPQL query by inserting the given proposal at the given position.
|
ResultQuery |
buildQuery(java.lang.String jpqlQuery,
java.lang.String proposal,
int position,
boolean insert)
Creates a new JPQL query by inserting the given proposal at the given position.
|
ResultQuery |
buildXmlQuery(java.lang.String jpqlQuery,
java.lang.String proposal,
int position,
boolean insert)
Creates a new JPQL query by inserting the given proposal at the given position.
|
java.lang.Iterable<java.lang.String> |
classNames()
Returns the filtered list of possible class names.
|
java.lang.Iterable<java.lang.String> |
columnNames()
Returns the filtered list of possible column names.
|
java.lang.Iterable<ContentAssistProposals.EnumProposals> |
enumConstant()
Returns the filtered list of possible enum constant names.
|
IEntity |
getAbstractSchemaType(java.lang.String identificationVariable)
Retrieves the abstract schema type that is mapped with the given identification variable.
|
ContentAssistProposals.ClassType |
getClassType() |
IdentifierRole |
getIdentifierRole(java.lang.String identifier)
Returns the role of the given JPQL identifier.
|
boolean |
hasProposals()
Determines whether there is at least one proposals.
|
java.lang.Iterable<java.lang.String> |
identificationVariables()
Returns the collection of possible identification variables.
|
java.lang.Iterable<java.lang.String> |
identifiers()
Returns the collection of possible JPQL identifiers.
|
java.lang.Iterable<IMapping> |
mappings()
Returns the collection of possible
mappings , which can be state fields,
association fields and/or collection fields depending on the location used to retrieve the
possible proposals. |
java.lang.Iterable<java.lang.String> |
tableNames()
Returns the filtered list of possible table names.
|
java.lang.Iterable<IEntity> abstractSchemaTypes()
entities
defined in the persistence contextResultQuery buildEscapedQuery(java.lang.String jpqlQuery, java.lang.String proposal, int position, boolean insert)
The replacement will also handle compound JPQL identifiers when updating the JPQL query.
Example: If the cursor is within "IS NOT N|" and the proposal is "IS NOT NULL", then "IS NOT" will not be added twice. If the word to replace is "IS NULL" and the proposal is "IS NOT NULL", then "NOT" will be inserted between "IS" and "NULL".
jpqlQuery
- The JPQL query to modify with the given proposalproposal
- The proposal to insert into the queryposition
- The position of insertioninsert
- Flag that determines if the partial word following the cursor should be left
intact or should be replaced by the proposalResultQuery buildQuery(java.lang.String jpqlQuery, java.lang.String proposal, int position, boolean insert)
The replacement will also handle compound JPQL identifiers when updating the JPQL query.
Example: If the cursor is within "IS NOT N|" and the proposal is "IS NOT NULL", then "IS NOT" will not be added twice. If the word to replace is "IS NULL" and the proposal is "IS NOT NULL", then "NOT" will be inserted between "IS" and "NULL".
jpqlQuery
- The JPQL query to modify with the given proposalproposal
- The proposal to insert into the queryposition
- The position of insertioninsert
- Flag that determines if the partial word following the cursor should be left
intact or should be replaced by the proposalResultQuery buildXmlQuery(java.lang.String jpqlQuery, java.lang.String proposal, int position, boolean insert)
The replacement will also handle compound JPQL identifiers when updating the JPQL query.
Example: If the cursor is within "IS NOT N|" and the proposal is "IS NOT NULL", then "IS NOT" will not be added twice. If the word to replace is "IS NULL" and the proposal is "IS NOT NULL", then "NOT" will be inserted between "IS" and "NULL".
jpqlQuery
- The JPQL query to modify with the given proposal, which should be the non-
converted string, i.e. any escaped characters should not be convertedproposal
- The proposal to insert into the queryposition
- The position of insertion, which was derived from the parsed tree representation
of the JPQL queryinsert
- Flag that determines if the partial word following the cursor should be left
intact or should be replaced by the proposaljava.lang.Iterable<java.lang.String> classNames()
ConstructorExpression
java.lang.Iterable<java.lang.String> columnNames()
java.lang.Iterable<ContentAssistProposals.EnumProposals> enumConstant()
IEntity getAbstractSchemaType(java.lang.String identificationVariable)
identificationVariable
- The identification variable that, if defined as a range variable,
will be mapped to a managed typenull
if the given variable is mapped to something else or not mapped to anythingContentAssistProposals.ClassType getClassType()
IdentifierRole getIdentifierRole(java.lang.String identifier)
identifier
- The JPQL identifier to retrieve its roleIdentifierRole
for the given JPQL identifier or null
if no
role was defined or if the given string is not a valid JPQL identifierboolean hasProposals()
true
if there is at least one proposal; otherwise false
java.lang.Iterable<java.lang.String> identificationVariables()
java.lang.Iterable<java.lang.String> identifiers()
java.lang.Iterable<IMapping> mappings()
mappings
, which can be state fields,
association fields and/or collection fields depending on the location used to retrieve the
possible proposals.mappings
java.lang.Iterable<java.lang.String> tableNames()