Interface SubqueryInitiator<T>

    • Method Detail

      • getParentQueryBuilder

        CommonQueryBuilder<?> getParentQueryBuilder()
        Returns the parent query builder.
        Returns:
        The parent query builder
        Since:
        1.3.0
      • from

        SubqueryBuilder<T> from​(String correlationPath)
        Like from(String, String) with the alias equivalent to the camel cased result of the class of the correlation parent.
        Parameters:
        correlationPath - The correlation path which should be queried
        Returns:
        A new subquery builder
        Since:
        1.2.0
      • from

        SubqueryBuilder<T> from​(String correlationPath,
                                String alias)
        Creates a new subquery builder with the given correlation path in the FROM clause with the given alias.
        Parameters:
        correlationPath - The correlation path which should be queried
        alias - The alias for the entity
        Returns:
        A new subquery builder
        Since:
        1.2.0
      • from

        SubqueryBuilder<T> from​(Class<?> entityClass,
                                String alias)
        Creates a new subquery builder with the given entity class as entity in the FROM clause with the given alias.
        Specified by:
        from in interface FromBaseBuilder<T>
        Parameters:
        entityClass - The entity class which should be the entity
        alias - The alias for the entity
        Returns:
        A new subquery builder
      • from

        SubqueryBuilder<T> from​(javax.persistence.metamodel.EntityType<?> entityType)
        Like from(EntityType, String) with the alias equivalent to the camel cased result of what EntityType.getName() of the entity class returns.
        Specified by:
        from in interface FromBaseBuilder<T>
        Parameters:
        entityType - The entity type which should be queried
        Returns:
        A new subquery builder
        Since:
        1.3.0
      • from

        SubqueryBuilder<T> from​(javax.persistence.metamodel.EntityType<?> entityType,
                                String alias)
        Creates a new subquery builder with the entity class on which the query should be based on with the given alias.
        Specified by:
        from in interface FromBaseBuilder<T>
        Parameters:
        entityType - The entity type which should be queried
        alias - The alias for the entity
        Returns:
        A new subquery builder
        Since:
        1.3.0
      • fromOld

        SubqueryBuilder<T> fromOld​(Class<?> entityClass)
        Like from(Class) but explicitly queries the data before any side effects happen because of CTEs.
        Specified by:
        fromOld in interface FromBaseBuilder<T>
        Parameters:
        entityClass - The entity class which should be queried
        Returns:
        A new subquery builder
        Since:
        1.2.0
      • fromOld

        SubqueryBuilder<T> fromOld​(Class<?> entityClass,
                                   String alias)
        Like from(Class, String) but explicitly queries the data before any side effects happen because of CTEs.
        Specified by:
        fromOld in interface FromBaseBuilder<T>
        Parameters:
        entityClass - The entity class which should be queried
        alias - The alias for the entity
        Returns:
        A new subquery builder
        Since:
        1.2.0
      • fromNew

        SubqueryBuilder<T> fromNew​(Class<?> entityClass)
        Like from(Class) but explicitly queries the data after any side effects happen because of CTEs.
        Specified by:
        fromNew in interface FromBaseBuilder<T>
        Parameters:
        entityClass - The entity class which should be queried
        Returns:
        A new subquery builder
        Since:
        1.2.0
      • fromNew

        SubqueryBuilder<T> fromNew​(Class<?> entityClass,
                                   String alias)
        Like from(Class, String) but explicitly queries the data after any side effects happen because of CTEs.
        Specified by:
        fromNew in interface FromBaseBuilder<T>
        Parameters:
        entityClass - The entity class which should be queried
        alias - The alias for the entity
        Returns:
        A new subquery builder
        Since:
        1.2.0
      • fromValues

        SubqueryBuilder<T> fromValues​(Class<?> valueClass,
                                      String alias,
                                      int valueCount)
        Creates a new subquery builder with a VALUES clause for values of the given value class in the from clause. This introduces a parameter named like the given alias. To set the values invoke ParameterHolder.setParameter(String, Object) or Query.setParameter(String, Object) with the alias and a collection.
        Specified by:
        fromValues in interface FromBaseBuilder<T>
        Parameters:
        valueClass - The class of the basic or managed type for which to create a VALUES clause
        alias - The alias for the entity
        valueCount - The number of values to use for the values clause
        Returns:
        A new subquery builder
        Since:
        1.2.0
      • fromValues

        SubqueryBuilder<T> fromValues​(Class<?> entityBaseClass,
                                      String attributeName,
                                      String alias,
                                      int valueCount)
        Creates a new subquery builder with a VALUES clause for values of the type as determined by the given entity attribute to the from clause. This introduces a parameter named like the given alias. To set the values invoke ParameterHolder.setParameter(String, Object) or Query.setParameter(String, Object) with the alias and a collection.
        Specified by:
        fromValues in interface FromBaseBuilder<T>
        Parameters:
        entityBaseClass - The entity class on which the attribute is located
        attributeName - The attribute name within the entity class which to use for determining the values type
        alias - The alias for the entity
        valueCount - The number of values to use for the values clause
        Returns:
        The new subquery builder
        Since:
        1.3.0
      • fromIdentifiableValues

        SubqueryBuilder<T> fromIdentifiableValues​(Class<?> valueClass,
                                                  String alias,
                                                  int valueCount)
        Creates a new subquery builder with a VALUES clause for values of the given value class in the from clause. This introduces a parameter named like the given alias. In contrast to fromValues(Class, String, int) this will only bind the id attribute. To set the values invoke ParameterHolder.setParameter(String, Object) or Query.setParameter(String, Object) with the alias and a collection.
        Specified by:
        fromIdentifiableValues in interface FromBaseBuilder<T>
        Parameters:
        valueClass - The class of the identifiable type for which to create a VALUES clause
        alias - The alias for the entity
        valueCount - The number of values to use for the values clause
        Returns:
        A new subquery builder
        Since:
        1.2.0