/** * Move the physical binary data to this SQL parameter row. * @param resultset The resultset to get the SQL data from. * @param iColumn the column in the resultset that has my data. * @exception SQLException From SQL calls. */ public void moveSQLToField(ResultSet resultset, int iColumn) throws SQLException { boolean bResult = false; if (DBConstants.TRUE.equals(this.getRecord().getTable().getDatabase().getProperties().get(SQLParams.BIT_TYPE_SUPPORTED))) bResult = resultset.getBoolean(iColumn); else bResult = resultset.getByte(iColumn) == 0 ? false: true; if (resultset.wasNull()) this.setString(Constants.BLANK, false, DBConstants.READ_MOVE); // Null value else this.setState(bResult, false, DBConstants.READ_MOVE); } /**
/** * Move the physical binary data to this SQL parameter row. * @param resultset The resultset to get the SQL data from. * @param iColumn the column in the resultset that has my data. * @exception SQLException From SQL calls. */ public void moveSQLToField(ResultSet resultset, int iColumn) throws SQLException { boolean bResult = false; if (DBConstants.TRUE.equals(this.getRecord().getTable().getDatabase().getProperties().get(SQLParams.BIT_TYPE_SUPPORTED))) bResult = resultset.getBoolean(iColumn); else bResult = resultset.getByte(iColumn) == 0 ? false: true; if (resultset.wasNull()) this.setString(Constants.BLANK, false, DBConstants.READ_MOVE); // Null value else this.setState(bResult, false, DBConstants.READ_MOVE); } /**
/** * Move the physical binary data to this SQL parameter row. * @param statement The SQL prepare statement. * @param iType the type of SQL statement. * @param iParamColumn The column in the prepared statement to set the data. * @exception SQLException From SQL calls. */ public void getSQLFromField(PreparedStatement statement, int iType, int iParamColumn) throws SQLException { if (this.isNull()) statement.setNull(iParamColumn, Types.BIT); else { String strBitSupported = DBConstants.TRUE; if (this.getRecord() != null) if (this.getRecord().getTable() != null) if (this.getRecord().getTable().getDatabase().getProperties() != null) strBitSupported = (String)this.getRecord().getTable().getDatabase().getProperties().get(SQLParams.BIT_TYPE_SUPPORTED); if (DBConstants.TRUE.equals(strBitSupported)) statement.setBoolean(iParamColumn, this.getState()); else statement.setByte(iParamColumn, (this.getState() ? (byte)1 : (byte)0)); } } /**
/** * Move the physical binary data to this SQL parameter row. * @param resultset The resultset to get the SQL data from. * @param iColumn the column in the resultset that has my data. * @exception SQLException From SQL calls. */ public void moveSQLToField(ResultSet resultset, int iColumn) throws SQLException { boolean bResult = false; if (DBConstants.TRUE.equals(this.getRecord().getTable().getDatabase().getProperties().get(SQLParams.BIT_TYPE_SUPPORTED))) bResult = resultset.getBoolean(iColumn); else bResult = resultset.getByte(iColumn) == 0 ? false: true; if (resultset.wasNull()) this.setString(Constants.BLANK, false, DBConstants.READ_MOVE); // Null value else this.setState(bResult, false, DBConstants.READ_MOVE); } /**
/** * Move the physical binary data to this SQL parameter row. * @param statement The SQL prepare statement. * @param iType the type of SQL statement. * @param iParamColumn The column in the prepared statement to set the data. * @exception SQLException From SQL calls. */ public void getSQLFromField(PreparedStatement statement, int iType, int iParamColumn) throws SQLException { if (this.isNull()) statement.setNull(iParamColumn, Types.BIT); else { String strBitSupported = DBConstants.TRUE; if (this.getRecord() != null) if (this.getRecord().getTable() != null) if (this.getRecord().getTable().getDatabase().getProperties() != null) strBitSupported = (String)this.getRecord().getTable().getDatabase().getProperties().get(SQLParams.BIT_TYPE_SUPPORTED); if (DBConstants.TRUE.equals(strBitSupported)) statement.setBoolean(iParamColumn, this.getState()); else statement.setByte(iParamColumn, (this.getState() ? (byte)1 : (byte)0)); } } /**
/** * Move the physical binary data to this SQL parameter row. * @param statement The SQL prepare statement. * @param iType the type of SQL statement. * @param iParamColumn The column in the prepared statement to set the data. * @exception SQLException From SQL calls. */ public void getSQLFromField(PreparedStatement statement, int iType, int iParamColumn) throws SQLException { if (this.isNull()) statement.setNull(iParamColumn, Types.BIT); else { String strBitSupported = DBConstants.TRUE; if (this.getRecord() != null) if (this.getRecord().getTable() != null) if (this.getRecord().getTable().getDatabase().getProperties() != null) strBitSupported = (String)this.getRecord().getTable().getDatabase().getProperties().get(SQLParams.BIT_TYPE_SUPPORTED); if (DBConstants.TRUE.equals(strBitSupported)) statement.setBoolean(iParamColumn, this.getState()); else statement.setByte(iParamColumn, (this.getState() ? (byte)1 : (byte)0)); } } /**