Class JpaEntityDefinition
- java.lang.Object
-
- com.evolveum.midpoint.repo.sql.query2.definition.JpaDataNodeDefinition
-
- com.evolveum.midpoint.repo.sql.query2.definition.JpaEntityDefinition
-
- All Implemented Interfaces:
Visitable
,DebugDumpable
public class JpaEntityDefinition extends JpaDataNodeDefinition implements DebugDumpable, Visitable
- Author:
- lazyman, mederly
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
JpaEntityDefinition.LinkDefinitionHandler
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Constructor Description JpaEntityDefinition(Class jpaClass, Class jaxbClass)
-
Method Summary
-
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
-
-
-
-
Method Detail
-
addDefinition
public void addDefinition(JpaLinkDefinition definition)
-
sortDefinitions
public void sortDefinitions()
-
findDataNodeDefinition
public <D extends JpaDataNodeDefinition> DataSearchResult<D> findDataNodeDefinition(ItemPath path, ItemDefinition itemDefinition, Class<D> type, PrismContext prismContext) throws QueryException
Resolves the whole ItemPath- Parameters:
path
- ItemPath to resolve. Non-empty!itemDefinition
- Definition of the final path segment, if it's "any" property.type
- Type of definition to be found- Returns:
- If successful, returns correct definition + empty path. If unsuccessful, return null.
- Throws:
QueryException
-
findDataNodeDefinition
public <D extends JpaDataNodeDefinition> DataSearchResult<D> findDataNodeDefinition(ItemPath path, ItemDefinition itemDefinition, Class<D> type, JpaEntityDefinition.LinkDefinitionHandler handler, PrismContext prismContext) throws QueryException
- Throws:
QueryException
-
setSuperclassDefinition
public void setSuperclassDefinition(JpaEntityDefinition superclassDefinition)
-
getSuperclassDefinition
public JpaEntityDefinition getSuperclassDefinition()
-
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
-
isAssignableFrom
public boolean isAssignableFrom(JpaEntityDefinition specificEntityDefinition)
-
isAbstract
public boolean isAbstract()
-
debugDump
public String debugDump(int indent)
- Specified by:
debugDump
in interfaceDebugDumpable
-
-