ContentAssistProposals which stores the valid proposals.
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 | Class and Description |
|---|---|
| private static class | |
| private static class | DefaultContentAssistProposals.Result
This contains the result of inserting a proposal into a JPQL query at a given position. |
| Modifier and Type | Field and Description |
|---|---|
| private String | classNamePrefix
The prefix that is used to filter the list of class names. |
| private ContentAssistProposals. | classType
The class type helps to filter the various types of classes, i.e. anonymous, member, interface are never allowed. |
| private String | columnNamePrefix
TODO |
| private Set | entities
The set of possible abstract schema types. |
| private Map | enumProposals
TODO |
| private ContentAssistExtension | extension
This extension can be used to provide additional support to JPQL content assist that is outside the scope of providing proposals related to JPA metadata. |
| private Set | identificationVariables
The set of possible identification variables. |
| private Set | identifiers
The set of possible JPQL identifiers. |
| private JPQLGrammar | jpqlGrammar
The |
| private static final Map | LONGUEST_IDENTIFIERS
A JPQL identifier that is mapped to its longest counterpart. |
| private Set | |
| private static final Map | ORDERED_IDENTIFIERS
A JPQL identifier that is mapped to the list of counterparts used to find them in the query. |
| private Map | rangeIdentificationVariables
The identification variables mapped to their abstract schema types. |
| private String | tableName
TODO |
| private String | tableNamePrefix
TODO |
| Access | Constructor and Description |
|---|---|
| public | DefaultContentAssistProposals(JPQLGrammar
The jpqlGrammar, ContentAssistExtension JPQLGrammar that defines how the JPQL query was parsedThis extension can be used to provide additional support to JPQL content
assist that is outside the scope of providing proposals related to JPA metadata. It adds
support for providing suggestions related to class names, enum constants, table names, column
names extension)Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| public Iterable | abstractSchemaTypes()
Implements org. |
| public void | |
| public void | addEnumConstant(IType
The enumType, String IType of the enum typeThe enum constant to be added as a valid proposal enumConstant)Adds the constants of the given enum constant as a valid proposal. |
| public void | addIdentificationVariable(String
The identification variable that is a valid proposal identificationVariable)Adds the given identification variable as a proposal. |
| public void | addIdentifier(String
The JPQL identifier that is a valid proposal identifier)Adds the given JPQL identifier as a proposal. |
| public void | addMapping(IMapping
The mapping)IMapping of the state field, association field or collection fieldAdds the given |
| public void | addMappings(Collection<IMapping>
The mappings)mappings of the state fields, association fields or
collection fieldsAdds the given |
| public void | addRangeIdentificationVariable(String
The range identification variable mapping the abstract schema name identificationVariable, IEntity The abstract type name that identifies the type of the variable entity)Adds the given range identification variable that is mapping the given abstract schema type. |
| public DefaultContentAssistProposals. | buildEscapedQuery(String
The JPQL query to modify with the given proposal jpqlQuery, String The proposal to insert into the query proposal, int The position of insertion position, boolean Flag that determines if the partial word following the cursor should be left
intact or should be replaced by the proposal insert)Implements org. |
| private static Map | |
| private static Map | |
| public int[] | Returns: The start and end positionsThis parser can be used to retrieve words from the cursor position wordParser, String The proposal to be inserted into the query proposal, boolean Flag that determines if the proposal is simply inserted or it should also replace
the partial word following the position of the cursor insert)Calculates the start and end position for correctly inserting the proposal into the query. |
| public DefaultContentAssistProposals. | buildQuery(String
The JPQL query to modify with the given proposal jpqlQuery, String The proposal to insert into the query proposal, int The position of insertion position, boolean Flag that determines if the partial word following the cursor should be left
intact or should be replaced by the proposal insert)Implements org. |
| public ResultQuery | buildXmlQuery(String
The JPQL query to modify with the given proposal, which should be the non-
converted string, i.e. any escaped characters should not be converted jpqlQuery, String The proposal to insert into the query proposal, int The position of insertion, which was derived from the parsed tree representation
of the JPQL query position, boolean Flag that determines if the partial word following the cursor should be left
intact or should be replaced by the proposal insert)Implements org. |
| public Iterable | classNames()
Implements org. |
| public Iterable | columnNames()
Implements org. |
| public Iterable | enumConstant()
Implements org. |
| public IEntity | getAbstractSchemaType(String
The identification variable that, if defined as a range variable,
will be mapped to a managed type identificationVariable)Implements org. |
| public String | Returns: The prefix that is used to filter the list of class names ornull if it
was not set for the cursor position within the JPQL queryReturns the prefix that will be used to filter the list of possible class names. |
| public ContentAssistProposals. | |
| public String | Returns: The prefix that is used to filter the list of columns names, which isnull
if it has not been set along with the table nameReturns the prefix that will be used by |
| public JPQLGrammar | |
| public IdentifierRole | getIdentifierRole(String
The JPQL identifier to retrieve its role identifier)Implements org. |
| public String | Returns: The name of the table for which its column names should be retrieve as possible proposalsReturns the table name that will be used by |
| public String | Returns: The prefix that is used to filter the list of table names ornull if it
was not set for the cursor position within the JPQL queryReturns the prefix that will be used to filter the list of possible table names. |
| public boolean | hasProposals()
Implements org. |
| public Iterable | identificationVariables()
Implements org. |
| public Iterable | identifiers()
Implements org. |
| protected void | |
| public boolean | Returns: true if the given proposal is a column name; false otherwiseThe proposal that is being inserted into the JPQL query proposal)Determines whether the given proposal is a column name (which should be unqualified). |
| public boolean | Returns: true if the given proposal is a unqualified enum constant name;
false otherwiseThe proposal that is being inserted into the JPQL query proposal)Determines whether the given proposal is an enum constant name (which should be unqualified). |
| public boolean | Returns: true if the given proposal is a mapping name; false otherwiseThe proposal that is being inserted into the JPQL query proposal)Determines whether the given proposal is a mapping name. |
| public String | Returns: Either the given proposal if it's not a JPQL identifier or it does not have a longer form or the longest version of the JPQL identifierThe proposal to retrieve its longest form if one is associated with it proposal)Returns the longest possible JPQL identifier that is related to the given proposal if the proposal is a JPQL identifier and contains multiple words. |
| public Iterable | mappings()
Implements org. mappings, which can be state fields,
association fields and/or collection fields depending on the location used to retrieve the
possible proposals.
|
| protected void | removeIdentifier(String
The identifier that was added but actually needs to be removed identifier)Removes the given JPQL identifier. |
| public void | setClassNamePrefix(String
The prefix that is used to filter the list of class names prefix, ContentAssistProposals.Determines how to filter the various types of classes classTypeAdds the given prefix that will be used to filter the list of possible class names. |
| public void | setTableName(String
The name of the table for which its column names should be retrieve as
possible proposals tableName, String The prefix that is used to filter the list of columns names, which is never
prefix)null but can be an empty stringSets the table name and a prefix that will be used to filter the names of the table's columns. |
| public void | setTableNamePrefix(String
The prefix that is used to filter the list of columns names tableNamePrefix)Adds the given prefix that will be used to filter the list of possible columns names. |
| public int | |
| public Iterable | tableNames()
Implements org. |
| public String |