Class JDBCParameterBuildingVisitor

  • All Implemented Interfaces:
    Visitor

    public class JDBCParameterBuildingVisitor
    extends DefaultVisitor
    This class is the JDBC persistence layer implementation for transforming SearchParameters into Parameter Data Transfer Objects.

    Call Element.accept with this visitor to add zero to many Parameters to the result list and invoke getResult to get the current list of extracted Parameter objects.

    Note: this class DOES NOT set the resourceType on the underlying JDBC Parameter objects it creates; that is a responsibility of the caller.

    • Field Detail

      • EXCEPTION_MSG_NAME_ONLY

        public static final java.lang.String EXCEPTION_MSG_NAME_ONLY
        See Also:
        Constant Field Values
    • Constructor Detail

      • JDBCParameterBuildingVisitor

        public JDBCParameterBuildingVisitor​(java.lang.String resourceType,
                                            SearchParameter searchParameter)
        Public constructor
        Parameters:
        resourceType - the resource type
        searchParameter - the search parameter
    • Method Detail

      • getResult

        public java.util.List<ExtractedParameterValue> getResult()
        Returns:
        the Parameters extracted from the visited Elements
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             Visitable visitable)
        Description copied from class: DefaultVisitor
        Subclasses can override this method to provide a default action for all visit methods.
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        whether to visit the children of this resource; returns the value of the visitChildren boolean by default
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             Boolean _boolean)
        Description copied from class: DefaultVisitor
        Delegates to #visit(elementName, elementIndex, Element)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this _boolean should be visited; otherwise false
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             Canonical canonical)
        Description copied from class: DefaultVisitor
        Delegates to #visit(elementName, elementIndex, Uri)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this canonical should be visited; otherwise false
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             Code code)
        Description copied from class: DefaultVisitor
        Delegates to #visit(elementName, elementIndex, String)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this code should be visited; otherwise false
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             Date date)
        Description copied from class: DefaultVisitor
        Delegates to #visit(elementName, elementIndex, Element)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this date should be visited; otherwise false
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             DateTime dateTime)
        Description copied from class: DefaultVisitor
        Delegates to #visit(elementName, elementIndex, Element)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this dateTime should be visited; otherwise false
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             Decimal decimal)
        Description copied from class: DefaultVisitor
        Delegates to #visit(elementName, elementIndex, Element)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this decimal should be visited; otherwise false
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             Id id)
        Description copied from class: DefaultVisitor
        Delegates to #visit(elementName, elementIndex, String)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this id should be visited; otherwise false
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             Instant instant)
        Description copied from class: DefaultVisitor
        Delegates to #visit(elementName, elementIndex, Element)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this instant should be visited; otherwise false
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             Integer integer)
        Description copied from class: DefaultVisitor
        Delegates to #visit(elementName, elementIndex, Element)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this integer should be visited; otherwise false
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             String value)
        Description copied from class: DefaultVisitor
        Delegates to #visit(elementName, elementIndex, Element)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this string should be visited; otherwise false
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             Uri uri)
        Description copied from class: DefaultVisitor
        Delegates to #visit(elementName, elementIndex, Element)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this uri should be visited; otherwise false
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             Address address)
        Description copied from class: DefaultVisitor
        Delegates to #visit(elementName, elementIndex, Element)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this address should be visited; otherwise false
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             CodeableConcept codeableConcept)
        Description copied from class: DefaultVisitor
        Delegates to #visit(elementName, elementIndex, Element)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this codeableConcept should be visited; otherwise false
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             Coding coding)
        Description copied from class: DefaultVisitor
        Delegates to #visit(elementName, elementIndex, Element)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this coding should be visited; otherwise false
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             ContactPoint contactPoint)
        Description copied from class: DefaultVisitor
        Delegates to #visit(elementName, elementIndex, Element)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this contactPoint should be visited; otherwise false
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             HumanName humanName)
        Description copied from class: DefaultVisitor
        Delegates to #visit(elementName, elementIndex, Element)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this humanName should be visited; otherwise false
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             Money money)
        Description copied from class: DefaultVisitor
        Delegates to #visit(elementName, elementIndex, Element)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this money should be visited; otherwise false
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             Period period)
        Description copied from class: DefaultVisitor
        Delegates to #visit(elementName, elementIndex, Element)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this period should be visited; otherwise false
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             Quantity quantity)
        Description copied from class: DefaultVisitor
        Delegates to #visit(elementName, elementIndex, Element)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this quantity should be visited; otherwise false
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             Range range)
        Description copied from class: DefaultVisitor
        Delegates to #visit(elementName, elementIndex, Element)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this range should be visited; otherwise false
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             Identifier identifier)
        Description copied from class: DefaultVisitor
        Delegates to #visit(elementName, elementIndex, Element)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this identifier should be visited; otherwise false
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             Reference reference)
        Description copied from class: DefaultVisitor
        Delegates to #visit(elementName, elementIndex, Element)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this reference should be visited; otherwise false
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             Timing timing)
        Description copied from class: DefaultVisitor
        Delegates to #visit(elementName, elementIndex, BackboneElement)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this timing should be visited; otherwise false
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             Location.Position position)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this Location.Position should be visited; otherwise false
      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             Extension extension)
        Description copied from class: DefaultVisitor
        Delegates to #visit(elementName, elementIndex, Element)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this extension should be visited; otherwise false