Details
-
New Feature
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
Description
HstQuery interface allows for queries for certain node types and its subtypes yes/no. Or for a list of names types. If you want to combine type A and its subtypes plus type B (no subtype of A), then you have to create your own list of type A. A HstFilterUtils could help building this list. It could contain the following code.
NodeTypeManager ntMgr = session.getWorkspace().getNodeTypeManager();
NodeTypeIterator allTypes = ntMgr.getAllNodeTypes();
while (allTypes.hasNext()) {
NodeType nt = allTypes.nextNodeType();
if (nt.isNodeType("myproject:base"))
}
Filter orFilter = query.createFilter()
orFilter.addEqualTo("jcr:primaryType", "hippostd:gallery);