org.springframework.jdbc.support.SqlValue Java Examples

The following examples show how to use org.springframework.jdbc.support.SqlValue. 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 File: StatementCreatorUtils.java    From spring-analysis-note with 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 File: StatementCreatorUtils.java    From java-technology-stack with 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 File: StatementCreatorUtils.java    From lams with 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
Source File: StatementCreatorUtils.java    From spring4-understanding with 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();
			}
		}
	}
}
 
Example #5
Source File: StatementCreatorUtils.java    From effectivejava with 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();
			}
		}
	}
}