com.evolveum.midpoint.common
Class QueryUtil

java.lang.Object
  extended by com.evolveum.midpoint.common.QueryUtil

public class QueryUtil
extends java.lang.Object

Author:
semancik

Constructor Summary
QueryUtil()
           
 
Method Summary
static org.w3c.dom.Element createAndFilter(org.w3c.dom.Document doc, org.w3c.dom.Element... conditions)
           
static QueryType createAttributeQuery(PrismProperty<?> attribute, javax.xml.namespace.QName objectClass, ResourceType resourceType, PrismContext prismContext)
           
static org.w3c.dom.Element createEqualFilter(org.w3c.dom.Document doc, XPathHolder xpath, java.lang.Object object)
          Creates "equal" filter segment for single-valued properties based on DOM representation.
static org.w3c.dom.Element createEqualFilter(org.w3c.dom.Document doc, XPathHolder xpath, javax.xml.namespace.QName propertyName, javax.xml.namespace.QName value)
          Creates "equal" filter segment for single-valued properties with QName content.
static org.w3c.dom.Element createEqualFilter(org.w3c.dom.Document doc, XPathHolder xpath, javax.xml.namespace.QName properyName, java.lang.String value)
          Creates "equal" filter segment for single-valued properties with string content.
static org.w3c.dom.Element createEqualFilterFromElements(org.w3c.dom.Document doc, XPathHolder xpath, java.util.List<?> values, PrismContext prismContext)
          Creates "equal" filter segment for multi-valued properties based on DOM representation.
static org.w3c.dom.Element createEqualRefFilter(org.w3c.dom.Document doc, XPathHolder xpath, javax.xml.namespace.QName propertyName, java.lang.String oid)
          Creates "equal" filter for object reference.
static ObjectQuery createNameQuery(ObjectType object)
           
static ObjectQuery createNameQuery(PolyString name, PrismContext prismContext)
           
static ObjectQuery createNameQuery(PolyStringType name, PrismContext prismContext)
           
static org.w3c.dom.Element createOrFilter(org.w3c.dom.Document doc, org.w3c.dom.Element... conditions)
           
static QueryType createQuery(org.w3c.dom.Element filter)
           
static QueryType createResourceAndAccountQuery(ResourceType resource, javax.xml.namespace.QName objectClass, java.lang.String accountType)
           
static QueryType createResourceAndAccountQuery(java.lang.String resourceOid, javax.xml.namespace.QName objectClass, java.lang.String accountType)
           
static org.w3c.dom.Element createSubstringFilter(org.w3c.dom.Document document, XPathHolder xpath, javax.xml.namespace.QName propertyName, java.lang.String searchText)
           
static org.w3c.dom.Element createTypeFilter(org.w3c.dom.Document doc, java.lang.String uri)
          Deprecated. 
static java.lang.String dump(QueryType query)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryUtil

public QueryUtil()
Method Detail

createTypeFilter

@Deprecated
public static org.w3c.dom.Element createTypeFilter(org.w3c.dom.Document doc,
                                                              java.lang.String uri)
Deprecated. 


createEqualFilterFromElements

public static org.w3c.dom.Element createEqualFilterFromElements(org.w3c.dom.Document doc,
                                                                XPathHolder xpath,
                                                                java.util.List<?> values,
                                                                PrismContext prismContext)
                                                         throws SchemaException
Creates "equal" filter segment for multi-valued properties based on DOM representation.

Parameters:
doc -
xpath - property container xpath. may be null.
values -
Returns:
"equal" filter segment (as DOM)
Throws:
javax.xml.bind.JAXBException
SchemaException

createEqualFilter

public static org.w3c.dom.Element createEqualFilter(org.w3c.dom.Document doc,
                                                    XPathHolder xpath,
                                                    java.lang.Object object)
                                             throws SchemaException
Creates "equal" filter segment for single-valued properties based on DOM representation. Parameter object is either DOM or JAXB element

Throws:
SchemaException

createEqualFilter

public static org.w3c.dom.Element createEqualFilter(org.w3c.dom.Document doc,
                                                    XPathHolder xpath,
                                                    javax.xml.namespace.QName properyName,
                                                    java.lang.String value)
                                             throws SchemaException
Creates "equal" filter segment for single-valued properties with string content.

Parameters:
doc -
xpath - property container xpath. may be null.
value -
Returns:
"equal" filter segment (as DOM)
Throws:
javax.xml.bind.JAXBException
SchemaException

createSubstringFilter

public static org.w3c.dom.Element createSubstringFilter(org.w3c.dom.Document document,
                                                        XPathHolder xpath,
                                                        javax.xml.namespace.QName propertyName,
                                                        java.lang.String searchText)
                                                 throws SchemaException
Throws:
SchemaException

createEqualFilter

public static org.w3c.dom.Element createEqualFilter(org.w3c.dom.Document doc,
                                                    XPathHolder xpath,
                                                    javax.xml.namespace.QName propertyName,
                                                    javax.xml.namespace.QName value)
                                             throws SchemaException
Creates "equal" filter segment for single-valued properties with QName content.

Parameters:
doc -
xpath - property container xpath. may be null.
value -
Returns:
"equal" filter segment (as DOM)
Throws:
javax.xml.bind.JAXBException
SchemaException

createEqualRefFilter

public static org.w3c.dom.Element createEqualRefFilter(org.w3c.dom.Document doc,
                                                       XPathHolder xpath,
                                                       javax.xml.namespace.QName propertyName,
                                                       java.lang.String oid)
                                                throws SchemaException
Creates "equal" filter for object reference.

Parameters:
doc -
xpath - property container xpath. may be null.
propertyName - name of the reference property (e.g. "resourceRef")
oid - OID of the referenced object
Returns:
"equal" filter segment (as DOM)
Throws:
javax.xml.bind.JAXBException
SchemaException

createOrFilter

public static org.w3c.dom.Element createOrFilter(org.w3c.dom.Document doc,
                                                 org.w3c.dom.Element... conditions)

createAndFilter

public static org.w3c.dom.Element createAndFilter(org.w3c.dom.Document doc,
                                                  org.w3c.dom.Element... conditions)

createNameQuery

public static ObjectQuery createNameQuery(PolyStringType name,
                                          PrismContext prismContext)
                                   throws SchemaException
Throws:
SchemaException

createNameQuery

public static ObjectQuery createNameQuery(PolyString name,
                                          PrismContext prismContext)
                                   throws SchemaException
Throws:
SchemaException

createNameQuery

public static ObjectQuery createNameQuery(ObjectType object)
                                   throws SchemaException
Throws:
SchemaException

createQuery

public static QueryType createQuery(org.w3c.dom.Element filter)

createResourceAndAccountQuery

public static QueryType createResourceAndAccountQuery(ResourceType resource,
                                                      javax.xml.namespace.QName objectClass,
                                                      java.lang.String accountType)
                                               throws SchemaException
Throws:
SchemaException

createResourceAndAccountQuery

public static QueryType createResourceAndAccountQuery(java.lang.String resourceOid,
                                                      javax.xml.namespace.QName objectClass,
                                                      java.lang.String accountType)
                                               throws SchemaException
Throws:
SchemaException

createAttributeQuery

public static QueryType createAttributeQuery(PrismProperty<?> attribute,
                                             javax.xml.namespace.QName objectClass,
                                             ResourceType resourceType,
                                             PrismContext prismContext)
                                      throws SchemaException
Throws:
SchemaException

dump

public static java.lang.String dump(QueryType query)


Copyright © 2012 evolveum. All Rights Reserved.