All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.skyway.spring.util.dao.call.NamedSqlParameterValue Maven / Gradle / Ivy

The newest version!
/**
* Copyright 2007 - 2011 Skyway Software, Inc.
*/
package org.skyway.spring.util.dao.call;

import org.springframework.jdbc.core.SqlParameter;

/**
 * Represents an input parameter with a logical name
 * and a value.
 * 
 * NOTE: The SqlParameterValue class provided by Spring 
 * provides a means of setting a value but it does not
 * provide a means of setting the name. 
 * 
 */
public class NamedSqlParameterValue extends SqlParameter {
	private Object value;
	
	public NamedSqlParameterValue(String name) {
		this(name, null);
	}
	
	/**
	 * We pass the superclass 0 for the SQL type.  We don't really
	 * use it.  Any calls use the SqlParameter's that are constructed
	 * from the database meta data.
	 */
	public NamedSqlParameterValue(String name, Object value) {
		super(name, 0);
		this.value = value;
	}

	public NamedSqlParameterValue(String name, int sqlType, String typeName, Object value) {
		super(name, sqlType, typeName);
		this.value = value;
	}
	
	public Object getValue() {
		return value;
	}

	public void setValue(Object value) {
		this.value = value;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy