Top Description Fields Methods
org.eclipse.persistence.jpa.jpql.tools

public Interface ContentAssistExtension

Imports
org.eclipse.persistence.jpa.jpql.tools.ContentAssistProposals.ClassType, org.eclipse.persistence.jpa.jpql.tools.utility.iterable.EmptyIterable

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. It adds support for providing suggestions related to class names, enum constants, table names, column names.

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.

Author
Pascal Filion
Since
2.5
Version
2.5
See Also
AbstractJPQLQueryHelper#buildContentAssistProposals(int, ContentAssistExtension)

Field Summary

Modifier and TypeField and Description
public static final ContentAssistExtension
NULL_HELPER

The null instance of ContentAssistExtension.

Method Summary

Modifier and TypeMethod and Description
public Iterable<String>

Returns:

The filtered fully qualified class names
classNames
(String
The prefix is used to filter, it can be an empty string but never null
prefix
,
ContentAssistProposals.ClassType
Determines how to filter the various types of classes
type
)

Returns the fully qualified class names filtered by the given prefix and type.

public Iterable<String>

Returns:

The column names
columnNames
(String
The name of the table to retrieve the name of its columns, which is never null
tableName
,
String prefix)

Returns the names of the given table's columns.

public Iterable<String>

Returns:

The filtered table names
tableNames
(String
The prefix is used to filter, it can be an empty string but never null
prefix
)

Returns the names of the database tables filtered by the given prefix.

Field Detail

NULL_HELPERback to summary
public static final ContentAssistExtension NULL_HELPER

The null instance of ContentAssistExtension.

Method Detail

classNamesback to summary
public Iterable<String> classNames(String prefix, ContentAssistProposals.ClassType type)

Returns the fully qualified class names filtered by the given prefix and type.

Parameters
prefix:String

The prefix is used to filter, it can be an empty string but never null

type:ContentAssistProposals.ClassType

Determines how to filter the various types of classes

Returns:Iterable<String>

The filtered fully qualified class names

columnNamesback to summary
public Iterable<String> columnNames(String tableName, String prefix)

Returns the names of the given table's columns.

Parameters
tableName:String

The name of the table to retrieve the name of its columns, which is never null

Returns:Iterable<String>

The column names

tableNamesback to summary
public Iterable<String> tableNames(String prefix)

Returns the names of the database tables filtered by the given prefix.

Parameters
prefix:String

The prefix is used to filter, it can be an empty string but never null

Returns:Iterable<String>

The filtered table names