Class JDBCParameterBuildingVisitor
- java.lang.Object
-
- org.linuxforhealth.fhir.model.visitor.DefaultVisitor
-
- org.linuxforhealth.fhir.persistence.jdbc.util.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 invokegetResult
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 Summary
Fields Modifier and Type Field Description static java.lang.String
EXCEPTION_MSG
static java.lang.String
EXCEPTION_MSG_NAME_ONLY
-
Fields inherited from class org.linuxforhealth.fhir.model.visitor.DefaultVisitor
visitChildren
-
-
Constructor Summary
Constructors Constructor Description JDBCParameterBuildingVisitor(java.lang.String resourceType, SearchParameter searchParameter)
Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<ExtractedParameterValue>
getResult()
boolean
visit(java.lang.String elementName, int elementIndex, Location.Position position)
boolean
visit(java.lang.String elementName, int elementIndex, Address address)
Delegates to#visit(elementName, elementIndex, Element)
boolean
visit(java.lang.String elementName, int elementIndex, Boolean _boolean)
Delegates to#visit(elementName, elementIndex, Element)
boolean
visit(java.lang.String elementName, int elementIndex, Canonical canonical)
Delegates to#visit(elementName, elementIndex, Uri)
boolean
visit(java.lang.String elementName, int elementIndex, Code code)
Delegates to#visit(elementName, elementIndex, String)
boolean
visit(java.lang.String elementName, int elementIndex, CodeableConcept codeableConcept)
Delegates to#visit(elementName, elementIndex, Element)
boolean
visit(java.lang.String elementName, int elementIndex, Coding coding)
Delegates to#visit(elementName, elementIndex, Element)
boolean
visit(java.lang.String elementName, int elementIndex, ContactPoint contactPoint)
Delegates to#visit(elementName, elementIndex, Element)
boolean
visit(java.lang.String elementName, int elementIndex, Date date)
Delegates to#visit(elementName, elementIndex, Element)
boolean
visit(java.lang.String elementName, int elementIndex, DateTime dateTime)
Delegates to#visit(elementName, elementIndex, Element)
boolean
visit(java.lang.String elementName, int elementIndex, Decimal decimal)
Delegates to#visit(elementName, elementIndex, Element)
boolean
visit(java.lang.String elementName, int elementIndex, Extension extension)
Delegates to#visit(elementName, elementIndex, Element)
boolean
visit(java.lang.String elementName, int elementIndex, HumanName humanName)
Delegates to#visit(elementName, elementIndex, Element)
boolean
visit(java.lang.String elementName, int elementIndex, Id id)
Delegates to#visit(elementName, elementIndex, String)
boolean
visit(java.lang.String elementName, int elementIndex, Identifier identifier)
Delegates to#visit(elementName, elementIndex, Element)
boolean
visit(java.lang.String elementName, int elementIndex, Instant instant)
Delegates to#visit(elementName, elementIndex, Element)
boolean
visit(java.lang.String elementName, int elementIndex, Integer integer)
Delegates to#visit(elementName, elementIndex, Element)
boolean
visit(java.lang.String elementName, int elementIndex, Money money)
Delegates to#visit(elementName, elementIndex, Element)
boolean
visit(java.lang.String elementName, int elementIndex, Period period)
Delegates to#visit(elementName, elementIndex, Element)
boolean
visit(java.lang.String elementName, int elementIndex, Quantity quantity)
Delegates to#visit(elementName, elementIndex, Element)
boolean
visit(java.lang.String elementName, int elementIndex, Range range)
Delegates to#visit(elementName, elementIndex, Element)
boolean
visit(java.lang.String elementName, int elementIndex, Reference reference)
Delegates to#visit(elementName, elementIndex, Element)
boolean
visit(java.lang.String elementName, int elementIndex, String value)
Delegates to#visit(elementName, elementIndex, Element)
boolean
visit(java.lang.String elementName, int elementIndex, Timing timing)
Delegates to#visit(elementName, elementIndex, BackboneElement)
boolean
visit(java.lang.String elementName, int elementIndex, Uri uri)
Delegates to#visit(elementName, elementIndex, Element)
boolean
visit(java.lang.String elementName, int elementIndex, Visitable visitable)
Subclasses can override this method to provide a default action for all visit methods.-
Methods inherited from class org.linuxforhealth.fhir.model.visitor.DefaultVisitor
postVisit, postVisit, preVisit, preVisit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitEnd, visitEnd, visitEnd, visitStart, visitStart, visitStart
-
-
-
-
Field Detail
-
EXCEPTION_MSG
public static final java.lang.String EXCEPTION_MSG
- See Also:
- Constant Field Values
-
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 typesearchParameter
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- 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 interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- Returns:
- true if the children of this extension should be visited; otherwise false
-
-