Class JpaEntityPointerDefinition
- java.lang.Object
-
- com.evolveum.midpoint.repo.sql.query2.definition.JpaDataNodeDefinition
-
- com.evolveum.midpoint.repo.sql.query2.definition.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
-
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Constructor Description JpaEntityPointerDefinition(JpaEntityDefinition alreadyResolved)
JpaEntityPointerDefinition(Class jpaClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(Visitor visitor)
String
debugDump(int indent)
protected String
getDebugDumpClassName()
JpaEntityDefinition
getResolvedEntityDefinition()
boolean
isResolved()
DataSearchResult<?>
nextLinkDefinition(ItemPath path, ItemDefinition itemDefinition, PrismContext prismContext)
Tries to find "next step" in the translation process for a given ItemPath.void
setResolvedEntityDefinition(JpaEntityDefinition resolvedEntityDefinition)
-
Methods inherited from class com.evolveum.midpoint.repo.sql.query2.definition.JpaDataNodeDefinition
getJaxbClass, getJpaClass, getJpaClassName, getShortInfo, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
-
-
-
-
Constructor Detail
-
JpaEntityPointerDefinition
public JpaEntityPointerDefinition(Class jpaClass)
-
JpaEntityPointerDefinition
public JpaEntityPointerDefinition(JpaEntityDefinition alreadyResolved)
-
-
Method Detail
-
getResolvedEntityDefinition
public JpaEntityDefinition getResolvedEntityDefinition()
-
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 classJpaDataNodeDefinition
- 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
-
getDebugDumpClassName
protected String getDebugDumpClassName()
- Specified by:
getDebugDumpClassName
in classJpaDataNodeDefinition
-
debugDump
public String debugDump(int indent)
-
accept
public void accept(Visitor visitor)
-
isResolved
public boolean isResolved()
-
-