set(SqlChar data) { if (data == null || data.isNull()) { setNull(); } else { clear(); put(data.value, 0, data.length); } return; } // set
set(SqlChar data) { if (data.isNull()) { setNull(); } else { /* ** The character data is stored in a byte array in ** the host character-set. A simple binary stream ** will produce the desired output. Note that we ** need to follow the SqlChar convention and extend ** the data to the optional limit. */ data.extend(); setStream(getBinary(data.value, 0, data.length)); } return; } // set
/* ** Name: set ** ** Description: ** Assign a new data value as a copy of an existing ** SQL data object. If the input is NULL, a NULL ** data value results. ** ** Input: ** data The SQL data to be copied. ** ** Output: ** None. ** ** Returns: ** void. ** ** History: ** 1-Dec-03 (gordy) ** Created. */ public void set(SqlChar data) { if (data == null || data.isNull()) setNull(); else { clear(); put(data.value, 0, data.length); } return; }
/* ** Name: set ** ** Description: ** Assign a new data value as a copy of a SqlChar data ** value. The data value will be NULL if the input value ** is null, otherwise non-NULL. ** ** Input: ** data SqlChar data value to copy. ** ** Output: ** None. ** ** Returns: ** void. ** ** History: ** 1-Dec-03 (gordy) ** Created. */ public void set(SqlChar data) { if (data.isNull()) setNull(); else { /* ** The character data is stored in a byte array in ** the host character-set. A simple binary stream ** will produce the desired output. Note that we ** need to follow the SqlChar convention and extend ** the data to the optional limit. */ data.extend(); setStream(getBinary(data.value, 0, data.length)); } return; }