List of usage examples for java.sql Types SMALLINT
int SMALLINT
To view the source code for java.sql Types SMALLINT.
Click Source Link
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type SMALLINT
.
From source file:net.sourceforge.msscodefactory.cfsecurity.v2_0.CFSecurityOracle.CFSecurityOracleISOLanguageTable.java
public void deleteISOLanguageByCountryIdx(CFSecurityAuthorization Authorization, Short argISOCountryId) { final String S_ProcName = "deleteISOLanguageByCountryIdx"; ResultSet resultSet = null;/*from ww w . ja v a2 s . c o m*/ try { Connection cnx = schema.getCnx(); String sql = "begin call " + schema.getLowerSchemaDbName() + ".dl_iso_langbycountryidx( ?, ?, ?, ?, ?" + ", " + "?" + " ); end"; if (stmtDeleteByCountryIdx == null) { stmtDeleteByCountryIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtDeleteByCountryIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByCountryIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByCountryIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByCountryIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByCountryIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (argISOCountryId != null) { stmtDeleteByCountryIdx.setShort(argIdx++, argISOCountryId.shortValue()); } else { stmtDeleteByCountryIdx.setNull(argIdx++, java.sql.Types.SMALLINT); } int rowsUpdated = stmtDeleteByCountryIdx.executeUpdate(); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskOracle.CFAsteriskOracleISOLanguageTable.java
public void deleteISOLanguageByCountryIdx(CFSecurityAuthorization Authorization, Short argISOCountryId) { final String S_ProcName = "deleteISOLanguageByCountryIdx"; ResultSet resultSet = null;/*from w ww . j av a 2 s . co m*/ try { Connection cnx = schema.getCnx(); String sql = "begin call " + schema.getLowerDbSchemaName() + ".dl_iso_langbycountryidx( ?, ?, ?, ?, ?" + ", " + "?" + " ); end"; if (stmtDeleteByCountryIdx == null) { stmtDeleteByCountryIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtDeleteByCountryIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByCountryIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByCountryIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByCountryIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByCountryIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (argISOCountryId != null) { stmtDeleteByCountryIdx.setShort(argIdx++, argISOCountryId.shortValue()); } else { stmtDeleteByCountryIdx.setNull(argIdx++, java.sql.Types.SMALLINT); } int rowsUpdated = stmtDeleteByCountryIdx.executeUpdate(); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } }
From source file:net.sourceforge.msscodefactory.cffreeswitch.v2_1.CFFswOracle.CFFswOracleISOLanguageTable.java
public void deleteISOLanguageByCountryIdx(CFFswAuthorization Authorization, Short argISOCountryId) { final String S_ProcName = "deleteISOLanguageByCountryIdx"; ResultSet resultSet = null;// w w w .j a va2s . c om try { Connection cnx = schema.getCnx(); String sql = "begin call " + schema.getLowerDbSchemaName() + ".dl_iso_langbycountryidx( ?, ?, ?, ?, ?" + ", " + "?" + " ); end"; if (stmtDeleteByCountryIdx == null) { stmtDeleteByCountryIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtDeleteByCountryIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByCountryIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByCountryIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByCountryIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByCountryIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (argISOCountryId != null) { stmtDeleteByCountryIdx.setShort(argIdx++, argISOCountryId.shortValue()); } else { stmtDeleteByCountryIdx.setNull(argIdx++, java.sql.Types.SMALLINT); } int rowsUpdated = stmtDeleteByCountryIdx.executeUpdate(); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstOracle.CFAstOracleISOLanguageTable.java
public void deleteISOLanguageByCountryIdx(CFAstAuthorization Authorization, Short argISOCountryId) { final String S_ProcName = "deleteISOLanguageByCountryIdx"; ResultSet resultSet = null;/* www. j av a 2s . c om*/ try { Connection cnx = schema.getCnx(); String sql = "begin call " + schema.getLowerSchemaDbName() + ".dl_iso_langbycountryidx( ?, ?, ?, ?, ?" + ", " + "?" + " ); end"; if (stmtDeleteByCountryIdx == null) { stmtDeleteByCountryIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtDeleteByCountryIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByCountryIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByCountryIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByCountryIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByCountryIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (argISOCountryId != null) { stmtDeleteByCountryIdx.setShort(argIdx++, argISOCountryId.shortValue()); } else { stmtDeleteByCountryIdx.setNull(argIdx++, java.sql.Types.SMALLINT); } int rowsUpdated = stmtDeleteByCountryIdx.executeUpdate(); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_1.CFAstOracle.CFAstOracleISOLanguageTable.java
public void deleteISOLanguageByCountryIdx(CFAstAuthorization Authorization, Short argISOCountryId) { final String S_ProcName = "deleteISOLanguageByCountryIdx"; ResultSet resultSet = null;// www. j av a 2 s . c o m try { Connection cnx = schema.getCnx(); String sql = "begin call " + schema.getLowerDbSchemaName() + ".dl_iso_langbycountryidx( ?, ?, ?, ?, ?" + ", " + "?" + " ); end"; if (stmtDeleteByCountryIdx == null) { stmtDeleteByCountryIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtDeleteByCountryIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByCountryIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByCountryIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByCountryIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByCountryIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (argISOCountryId != null) { stmtDeleteByCountryIdx.setShort(argIdx++, argISOCountryId.shortValue()); } else { stmtDeleteByCountryIdx.setNull(argIdx++, java.sql.Types.SMALLINT); } int rowsUpdated = stmtDeleteByCountryIdx.executeUpdate(); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccOracle.CFAccOracleISOLanguageTable.java
public void deleteISOLanguageByCountryIdx(CFAccAuthorization Authorization, Short argISOCountryId) { final String S_ProcName = "deleteISOLanguageByCountryIdx"; ResultSet resultSet = null;//from w w w. j ava 2 s .c o m try { Connection cnx = schema.getCnx(); String sql = "begin call " + schema.getLowerSchemaDbName() + ".dl_iso_langbycountryidx( ?, ?, ?, ?, ?" + ", " + "?" + " ); end"; if (stmtDeleteByCountryIdx == null) { stmtDeleteByCountryIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtDeleteByCountryIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByCountryIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByCountryIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByCountryIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByCountryIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (argISOCountryId != null) { stmtDeleteByCountryIdx.setShort(argIdx++, argISOCountryId.shortValue()); } else { stmtDeleteByCountryIdx.setNull(argIdx++, java.sql.Types.SMALLINT); } int rowsUpdated = stmtDeleteByCountryIdx.executeUpdate(); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } }
From source file:org.jumpmind.symmetric.service.impl.TriggerRouterService.java
public void saveRouter(Router router) { router.setLastUpdateTime(new Date()); router.nullOutBlankFields();/*from www . j a v a 2 s . c o m*/ if (0 == sqlTemplate.update(getSql("updateRouterSql"), new Object[] { router.getTargetCatalogName(), router.getTargetSchemaName(), router.getTargetTableName(), router.getNodeGroupLink().getSourceNodeGroupId(), router.getNodeGroupLink().getTargetNodeGroupId(), router.getRouterType(), router.getRouterExpression(), router.isSyncOnUpdate() ? 1 : 0, router.isSyncOnInsert() ? 1 : 0, router.isSyncOnDelete() ? 1 : 0, router.isUseSourceCatalogSchema() ? 1 : 0, router.getLastUpdateBy(), router.getLastUpdateTime(), router.getRouterId() }, new int[] { Types.VARCHAR, Types.VARCHAR, Types.VARCHAR, Types.VARCHAR, Types.VARCHAR, Types.VARCHAR, Types.VARCHAR, Types.SMALLINT, Types.SMALLINT, Types.SMALLINT, Types.SMALLINT, Types.VARCHAR, Types.TIMESTAMP, Types.VARCHAR })) { router.setCreateTime(router.getLastUpdateTime()); sqlTemplate.update(getSql("insertRouterSql"), new Object[] { router.getTargetCatalogName(), router.getTargetSchemaName(), router.getTargetTableName(), router.getNodeGroupLink().getSourceNodeGroupId(), router.getNodeGroupLink().getTargetNodeGroupId(), router.getRouterType(), router.getRouterExpression(), router.isSyncOnUpdate() ? 1 : 0, router.isSyncOnInsert() ? 1 : 0, router.isSyncOnDelete() ? 1 : 0, router.isUseSourceCatalogSchema() ? 1 : 0, router.getCreateTime(), router.getLastUpdateBy(), router.getLastUpdateTime(), router.getRouterId() }, new int[] { Types.VARCHAR, Types.VARCHAR, Types.VARCHAR, Types.VARCHAR, Types.VARCHAR, Types.VARCHAR, Types.VARCHAR, Types.SMALLINT, Types.SMALLINT, Types.SMALLINT, Types.SMALLINT, Types.TIMESTAMP, Types.VARCHAR, Types.TIMESTAMP, Types.VARCHAR }); } clearCache(); }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxOracle.CFEnSyntaxOracleISOLanguageTable.java
public void deleteISOLanguageByCountryIdx(CFEnSyntaxAuthorization Authorization, Short argISOCountryId) { final String S_ProcName = "deleteISOLanguageByCountryIdx"; ResultSet resultSet = null;//from w w w . j av a 2s .c o m try { Connection cnx = schema.getCnx(); String sql = "begin call " + schema.getLowerDbSchemaName() + ".dl_iso_langbycountryidx( ?, ?, ?, ?, ?" + ", " + "?" + " ); end"; if (stmtDeleteByCountryIdx == null) { stmtDeleteByCountryIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtDeleteByCountryIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByCountryIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByCountryIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByCountryIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByCountryIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (argISOCountryId != null) { stmtDeleteByCountryIdx.setShort(argIdx++, argISOCountryId.shortValue()); } else { stmtDeleteByCountryIdx.setNull(argIdx++, java.sql.Types.SMALLINT); } int rowsUpdated = stmtDeleteByCountryIdx.executeUpdate(); } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } }
From source file:org.apache.sqoop.mapreduce.hcat.SqoopHCatUtilities.java
public static String sqlTypeString(int sqlType) { switch (sqlType) { case Types.BIT: return "BIT"; case Types.TINYINT: return "TINYINT"; case Types.SMALLINT: return "SMALLINT"; case Types.INTEGER: return "INTEGER"; case Types.BIGINT: return "BIGINT"; case Types.FLOAT: return "FLOAT"; case Types.REAL: return "REAL"; case Types.DOUBLE: return "DOUBLE"; case Types.NUMERIC: return "NUMERIC"; case Types.DECIMAL: return "DECIMAL"; case Types.CHAR: return "CHAR"; case Types.VARCHAR: return "VARCHAR"; case Types.LONGVARCHAR: return "LONGVARCHAR"; case Types.DATE: return "DATE"; case Types.TIME: return "TIME"; case Types.TIMESTAMP: return "TIMESTAMP"; case Types.BINARY: return "BINARY"; case Types.VARBINARY: return "VARBINARY"; case Types.LONGVARBINARY: return "LONGVARBINARY"; case Types.NULL: return "NULL"; case Types.OTHER: return "OTHER"; case Types.JAVA_OBJECT: return "JAVA_OBJECT"; case Types.DISTINCT: return "DISTINCT"; case Types.STRUCT: return "STRUCT"; case Types.ARRAY: return "ARRAY"; case Types.BLOB: return "BLOB"; case Types.CLOB: return "CLOB"; case Types.REF: return "REF"; case Types.DATALINK: return "DATALINK"; case Types.BOOLEAN: return "BOOLEAN"; case Types.ROWID: return "ROWID"; case Types.NCHAR: return "NCHAR"; case Types.NVARCHAR: return "NVARCHAR"; case Types.LONGNVARCHAR: return "LONGNVARCHAR"; case Types.NCLOB: return "NCLOB"; case Types.SQLXML: return "SQLXML"; default:// w ww . ja v a2 s . c o m return "<UNKNOWN>"; } }
From source file:net.sourceforge.msscodefactory.cfcrm.v2_1.CFCrmDb2LUW.CFCrmDb2LUWContactURLTable.java
public void deleteContactURLByProtocolIdx(CFCrmAuthorization Authorization, Short argURLProtocolId) { final String S_ProcName = "deleteContactURLByProtocolIdx"; ResultSet resultSet = null;/* w w w . j av a2s . c om*/ try { Connection cnx = schema.getCnx(); final String sql = "CALL sp_delete_ctcurl_by_protocolidx( ?, ?, ?, ?, ?" + ", " + "?" + " )"; if (stmtDeleteByProtocolIdx == null) { stmtDeleteByProtocolIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtDeleteByProtocolIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByProtocolIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtDeleteByProtocolIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtDeleteByProtocolIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtDeleteByProtocolIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); if (argURLProtocolId != null) { stmtDeleteByProtocolIdx.setShort(argIdx++, argURLProtocolId.shortValue()); } else { stmtDeleteByProtocolIdx.setNull(argIdx++, java.sql.Types.SMALLINT); } resultSet = stmtDeleteByProtocolIdx.executeQuery(); if (resultSet.next()) { int deleteFlag = resultSet.getInt(1); if (resultSet.next()) { resultSet.last(); throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect multi-record response, " + resultSet.getRow() + " rows selected"); } } else { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Expected 1 record result set to be returned by delete, not 0 rows"); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } }