Java Code Examples for org.springframework.jdbc.support.SqlValue

The following examples show how to use org.springframework.jdbc.support.SqlValue. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: spring-analysis-note   Source File: StatementCreatorUtils.java    License: MIT License 5 votes vote down vote up
/**
 * Clean up all resources held by parameter values which were passed to an
 * execute method. This is for example important for closing LOB values.
 * @param paramValues parameter values supplied. May be {@code null}.
 * @see DisposableSqlTypeValue#cleanup()
 * @see org.springframework.jdbc.core.support.SqlLobValue#cleanup()
 */
public static void cleanupParameters(@Nullable Collection<?> paramValues) {
	if (paramValues != null) {
		for (Object inValue : paramValues) {
			if (inValue instanceof DisposableSqlTypeValue) {
				((DisposableSqlTypeValue) inValue).cleanup();
			}
			else if (inValue instanceof SqlValue) {
				((SqlValue) inValue).cleanup();
			}
		}
	}
}
 
Example 2
Source Project: java-technology-stack   Source File: StatementCreatorUtils.java    License: MIT License 5 votes vote down vote up
/**
 * Clean up all resources held by parameter values which were passed to an
 * execute method. This is for example important for closing LOB values.
 * @param paramValues parameter values supplied. May be {@code null}.
 * @see DisposableSqlTypeValue#cleanup()
 * @see org.springframework.jdbc.core.support.SqlLobValue#cleanup()
 */
public static void cleanupParameters(@Nullable Collection<?> paramValues) {
	if (paramValues != null) {
		for (Object inValue : paramValues) {
			if (inValue instanceof DisposableSqlTypeValue) {
				((DisposableSqlTypeValue) inValue).cleanup();
			}
			else if (inValue instanceof SqlValue) {
				((SqlValue) inValue).cleanup();
			}
		}
	}
}
 
Example 3
Source Project: lams   Source File: StatementCreatorUtils.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Clean up all resources held by parameter values which were passed to an
 * execute method. This is for example important for closing LOB values.
 * @param paramValues parameter values supplied. May be {@code null}.
 * @see DisposableSqlTypeValue#cleanup()
 * @see org.springframework.jdbc.core.support.SqlLobValue#cleanup()
 */
public static void cleanupParameters(Collection<?> paramValues) {
	if (paramValues != null) {
		for (Object inValue : paramValues) {
			if (inValue instanceof DisposableSqlTypeValue) {
				((DisposableSqlTypeValue) inValue).cleanup();
			}
			else if (inValue instanceof SqlValue) {
				((SqlValue) inValue).cleanup();
			}
		}
	}
}
 
Example 4
/**
 * Clean up all resources held by parameter values which were passed to an
 * execute method. This is for example important for closing LOB values.
 * @param paramValues parameter values supplied. May be {@code null}.
 * @see DisposableSqlTypeValue#cleanup()
 * @see org.springframework.jdbc.core.support.SqlLobValue#cleanup()
 */
public static void cleanupParameters(Collection<?> paramValues) {
	if (paramValues != null) {
		for (Object inValue : paramValues) {
			if (inValue instanceof DisposableSqlTypeValue) {
				((DisposableSqlTypeValue) inValue).cleanup();
			}
			else if (inValue instanceof SqlValue) {
				((SqlValue) inValue).cleanup();
			}
		}
	}
}
 
Example 5
Source Project: effectivejava   Source File: StatementCreatorUtils.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Clean up all resources held by parameter values which were passed to an
 * execute method. This is for example important for closing LOB values.
 * @param paramValues parameter values supplied. May be {@code null}.
 * @see DisposableSqlTypeValue#cleanup()
 * @see org.springframework.jdbc.core.support.SqlLobValue#cleanup()
 */
public static void cleanupParameters(Collection<?> paramValues) {
	if (paramValues != null) {
		for (Object inValue : paramValues) {
			if (inValue instanceof DisposableSqlTypeValue) {
				((DisposableSqlTypeValue) inValue).cleanup();
			}
			else if (inValue instanceof SqlValue) {
				((SqlValue) inValue).cleanup();
			}
		}
	}
}