Class BindVisitor
- java.lang.Object
-
- com.ibm.fhir.database.utils.query.BindVisitor
-
- All Implemented Interfaces:
BindMarkerNodeVisitor
public class BindVisitor extends java.lang.Object implements BindMarkerNodeVisitor
Visitor implementation to bind (set) values for a PreparedStatement.
The bindXX methods translate any SQLException to a DataAccessException which is unchecked - this avoids polluting callers with SQLException for looser coupling.
-
-
Constructor Summary
Constructors Constructor Description BindVisitor(java.sql.PreparedStatement ps, IDatabaseTranslator translator)Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbindBigDecimal(java.math.BigDecimal value)Bind the given value for the idx'th parameter.voidbindDouble(java.lang.Double value)Bind the given value for the idx'th parameter.voidbindInstant(java.time.Instant value)Bind the given value for the idx'th parameter.voidbindInt(java.lang.Integer value)Bind the given value for the idx'th parameter.voidbindLong(java.lang.Long value)Bind the given value for the idx'th parameter.voidbindString(java.lang.String value)Bind the given value for the idx'th parameter.
-
-
-
Constructor Detail
-
BindVisitor
public BindVisitor(java.sql.PreparedStatement ps, IDatabaseTranslator translator)Public constructor- Parameters:
ps-translator-
-
-
Method Detail
-
bindString
public void bindString(java.lang.String value)
Description copied from interface:BindMarkerNodeVisitorBind the given value for the idx'th parameter. The idx value starts at 1, matching the semantics of the PreparedStatement setXX API.- Specified by:
bindStringin interfaceBindMarkerNodeVisitor
-
bindLong
public void bindLong(java.lang.Long value)
Description copied from interface:BindMarkerNodeVisitorBind the given value for the idx'th parameter. The idx value starts at 1, matching the semantics of the PreparedStatement setXX API.- Specified by:
bindLongin interfaceBindMarkerNodeVisitor
-
bindInt
public void bindInt(java.lang.Integer value)
Description copied from interface:BindMarkerNodeVisitorBind the given value for the idx'th parameter. The idx value starts at 1, matching the semantics of the PreparedStatement setXX API.- Specified by:
bindIntin interfaceBindMarkerNodeVisitor
-
bindInstant
public void bindInstant(java.time.Instant value)
Description copied from interface:BindMarkerNodeVisitorBind the given value for the idx'th parameter. The idx value starts at 1, matching the semantics of the PreparedStatement setXX API.- Specified by:
bindInstantin interfaceBindMarkerNodeVisitor
-
bindDouble
public void bindDouble(java.lang.Double value)
Description copied from interface:BindMarkerNodeVisitorBind the given value for the idx'th parameter. The idx value starts at 1, matching the semantics of the PreparedStatement setXX API.- Specified by:
bindDoublein interfaceBindMarkerNodeVisitor
-
bindBigDecimal
public void bindBigDecimal(java.math.BigDecimal value)
Description copied from interface:BindMarkerNodeVisitorBind the given value for the idx'th parameter. The idx value starts at 1, matching the semantics of the PreparedStatement setXX API.- Specified by:
bindBigDecimalin interfaceBindMarkerNodeVisitor
-
-