Interface ContentAssistExtension


  • public interface ContentAssistExtension
    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.

    Version:
    2.5
    See Also:
    AbstractJPQLQueryHelper.buildContentAssistProposals(int, ContentAssistExtension)
    Author:
    Pascal Filion
    Since:
    2.5
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Iterable<java.lang.String> classNames​(java.lang.String prefix, ContentAssistProposals.ClassType type)
      Returns the fully qualified class names filtered by the given prefix and type.
      java.lang.Iterable<java.lang.String> columnNames​(java.lang.String tableName, java.lang.String prefix)
      Returns the names of the given table's columns.
      java.lang.Iterable<java.lang.String> tableNames​(java.lang.String prefix)
      Returns the names of the database tables filtered by the given prefix.
    • Field Detail

    • Method Detail

      • classNames

        java.lang.Iterable<java.lang.String> classNames​(java.lang.String prefix,
                                                        ContentAssistProposals.ClassType type)
        Returns the fully qualified class names filtered by the given prefix and type.
        Parameters:
        prefix - The prefix is used to filter, it can be an empty string but never null
        type - Determines how to filter the various types of classes
        Returns:
        The filtered fully qualified class names
      • columnNames

        java.lang.Iterable<java.lang.String> columnNames​(java.lang.String tableName,
                                                         java.lang.String prefix)
        Returns the names of the given table's columns.
        Parameters:
        tableName - The name of the table to retrieve the name of its columns, which is never null
        prefix -
        Returns:
        The column names
      • tableNames

        java.lang.Iterable<java.lang.String> tableNames​(java.lang.String prefix)
        Returns the names of the database tables filtered by the given prefix.
        Parameters:
        prefix - The prefix is used to filter, it can be an empty string but never null
        Returns:
        The filtered table names