Interface CollectionReferenceAliases


  • public interface CollectionReferenceAliases
    • Method Detail

      • getCollectionTableAlias

        String getCollectionTableAlias()
        Obtain the table alias used for the collection table of the CollectionReference.
        Returns:
        The collection table alias.
      • getElementTableAlias

        String getElementTableAlias()
        Obtain the alias of the table that contains the collection element values.

        Unlike in the legacy Loader case, CollectionReferences in the LoadPlan code refer to both the collection and the elements *always*. In Loader the elements were handled by EntityPersister associations entries for one-to-many and many-to-many. In LoadPlan we need to describe the collection table/columns as well as the entity element table/columns. For "basic collections" and one-to-many collections, the "element table" and the "collection table" are actually the same. For the many-to-many case this will be different and we need to track it separately.

        Returns:
        The element table alias. Only different from getCollectionTableAlias() in the case of many-to-many.
      • getCollectionColumnAliases

        CollectionAliases getCollectionColumnAliases()
        Obtain the aliases for the columns related to the collection structure such as the FK, index/key, or identifier (idbag).
        Returns:
        The collection column aliases.
      • getEntityElementAliases

        EntityReferenceAliases getEntityElementAliases()
        Obtain the entity reference aliases for the element values when the element of the collection is an entity.
        Returns:
        The entity reference aliases for the entity element; null if the collection element is not an entity.