public Object toJava(final Object object) { if ((object == null) || (_convertTo == null)) { return object; } return _convertTo.convert(object); } }
public Object toSQL(final Object object) { if ((object == null) || (_convertFrom == null)) { return object; } return _convertFrom.convert(object); }
private Object idToSQL(final int index, final Object object) { if ((object == null) || (_leftFrom[index] == null)) { return object; } return _leftFrom[index].convert(object); }
/** * Method to translate java data types to sql data types. * * @param object Object to be translated to sql data type. * @return Object converted to sql data type. */ protected Object toSQL(final Object object) { if ((object == null) || (_convertFrom == null)) { return object; } return _convertFrom.convert(object); }
private Object ridToSQL(final int index, final Object object) { if ((object == null) || (_rightFrom[index] == null)) { return object; } return _rightFrom[index].convert(object); }
protected Object idToJava(final int index, final Object object) { if ((object == null) || (_ids[index].getConvertTo() == null)) { return object; } return _ids[index].getConvertTo().convert(object); }
protected Object toJava(final int field, final int column, final Object object) { SQLColumnInfo col = _fields[field].getColumnInfo()[column]; if ((object == null) || (col.getConvertTo() == null)) { return object; } return col.getConvertTo().convert(object); }
value = (T) _convertTo.convert(value); } catch (ClassCastException except) { String errorMessage =
return _convertFrom.convert(value); } catch (ClassCastException except) { throw new IllegalArgumentException(Messages.format("mapping.wrongConvertor", value.getClass().getName()));
return (T) _convertFrom.convert(value); } catch (ClassCastException except) { String errorMessage = Messages.format("mapping.wrongConvertor", value.getClass().getName());
value = _convertTo.convert(value); } catch ( ClassCastException except ) { throw new IllegalArgumentException( Messages.format( "mapping.wrongConvertor", value.getClass().getName() ) );