Class JpaEntityPointerDefinition

  • All Implemented Interfaces:
    Visitable, DebugDumpable

    public class JpaEntityPointerDefinition
    extends JpaDataNodeDefinition
    Special placeholder to allow for cross-references: entity definition that points to another entity. Currently, the process of resolving allows to point to root entity definitions here only. As a hack, we implement self pointers (e.g. RAssignment.metadata->RAssignment) also for non-root entities, provided they are resolved on creation. (The reason of using JpaEntityPointerDefinition there is just to break navigation cycles e.g. when using a visitor.)
    Author:
    mederly
    • Constructor Detail

      • JpaEntityPointerDefinition

        public JpaEntityPointerDefinition​(Class jpaClass)
      • JpaEntityPointerDefinition

        public JpaEntityPointerDefinition​(JpaEntityDefinition alreadyResolved)
    • Method Detail

      • setResolvedEntityDefinition

        public void setResolvedEntityDefinition​(JpaEntityDefinition resolvedEntityDefinition)
      • nextLinkDefinition

        public DataSearchResult<?> nextLinkDefinition​(ItemPath path,
                                                      ItemDefinition itemDefinition,
                                                      PrismContext prismContext)
                                               throws QueryException
        Description copied from class: JpaDataNodeDefinition
        Tries to find "next step" in the translation process for a given ItemPath.
        Specified by:
        nextLinkDefinition in class JpaDataNodeDefinition
        Parameters:
        path - A path to be resolved. Always non-null and non-empty. Should produce at least one transition.
        itemDefinition - Item definition for the item being sought. Needed only for "any" items.
        Returns:
        - Normally it returns the search result containing next item definition (entity, collection, ...) in the chain and the unresolved remainder of the path. The transition may be empty ("self") e.g. for metadata or construction. - If the search was not successful, returns null.
        Throws:
        QueryException
      • debugDump

        public String debugDump​(int indent)
      • accept

        public void accept​(Visitor visitor)
      • isResolved

        public boolean isResolved()