Designed for use with org.
as well as org., to be
passed in as a parameter value wrapping the target content value. Can be
combined with org. for
specifying a SQL type, e.g.
new SqlParameterValue(Types.BLOB, new SqlBinaryValue(myContent)).
With most database drivers, the type hint is not actually necessary.
SqlCharacterValue, org.springframework.jdbc.core.SqlParameterValue
| Modifier and Type | Field and Description |
|---|---|
| private final Object | |
| private final long |
| Access | Constructor and Description |
|---|---|
| public | SqlBinaryValue(byte[]
the content as a byte array bytes)Create a new |
| public | SqlBinaryValue(InputStream
the content stream stream, long the length of the content length)Create a new |
| public | SqlBinaryValue(InputStreamSource
the resource to obtain a content stream from resource, long the length of the content length)Create a new |
| public | SqlBinaryValue(Resource
the resource to obtain a content stream from resource)Create a new |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| public void | setTypeValue(PreparedStatement
the PreparedStatement to work on ps, int the index of the parameter for which we need to set the value paramIndex, int the SQL type of the parameter we are setting sqlType, String the type name of the parameter (optional) typeName)Implements org. |
| content | back to summary |
|---|---|
| private final Object content | |
| length | back to summary |
|---|---|
| private final long length | |
| SqlBinaryValue | back to summary |
|---|---|
| public SqlBinaryValue(byte[] bytes) Create a new
| |
| SqlBinaryValue | back to summary |
|---|---|
| public SqlBinaryValue(InputStream stream, long length) Create a new
| |
| SqlBinaryValue | back to summary |
|---|---|
| public SqlBinaryValue(InputStreamSource resource, long length) Create a new Consider specifying a
| |
| SqlBinaryValue | back to summary |
|---|---|
| public SqlBinaryValue(Resource resource) Create a new The length will get derived from
| |
| setByteArray | back to summary |
|---|---|
| private void setByteArray(PreparedStatement ps, int paramIndex, int sqlType, byte[] bytes) throws SQLException | |
| setInputStream | back to summary |
|---|---|
| private void setInputStream(PreparedStatement ps, int paramIndex, int sqlType, InputStream is, long length) throws SQLException | |
| setTypeValue | back to summary |
|---|---|
| public void setTypeValue(PreparedStatement ps, int paramIndex, int sqlType, String typeName) throws SQLException Implements org. Doc from org. Set the type value on the given PreparedStatement.
| |