Spring Framework AbstractSqlParameterSource - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework AbstractSqlParameterSource class.

This code example shows how to use the following methods:hasValue, getSqlType
This code example shows how to use the following methods:
This code example shows how to use the following methods:
package org.sagebionetworks.repo.model.dbo; 
 
import org.springframework.jdbc.core.namedparam.AbstractSqlParameterSource;
 
public class SinglePrimaryKeySqlParameterSource extends AbstractSqlParameterSource {
	private final Object value;
	private String lastParamName = null;
 
	public SinglePrimaryKeySqlParameterSource(Object value) {
		this.value = value;
	} 
 
	public boolean hasValue(String paramName) {
		checkParamName(paramName);
		return true; 
	} 
 
	public Object getValue(String paramName) {
		checkParamName(paramName);
		return value;

4
CodeRank
This code example shows how to use the following methods:
 */ 
public class TupleSqlParameterSource extends AbstractSqlParameterSource {
 
	private Tuple tuple;
 
	public TupleSqlParameterSource(Tuple item) {
		Assert.notNull(item, "An item is required");
		this.tuple = item;
	} 
 
	/* 
	 * (non-Javadoc) 
	 *  
	 * @see org.springframework.jdbc.core.namedparam.SqlParameterSource#hasValue(String paramName) 
	 */ 
	@Override 
	public boolean hasValue(String paramName) {
		return tuple.hasFieldName(paramName);
	} 
 
4
CodeRank