}
public void nullSafeSet(PreparedStatement st, Object value, int index)
throws HibernateException, SQLException {
WatermarkInfoImpl watermark = (WatermarkInfoImpl) value;
if (watermark == null) {
st.setNull(index, Types.INTEGER);
st.setNull(index + 1, Types.INTEGER);
st.setNull(index + 2, Types.INTEGER);
st.setNull(index + 3, Types.VARCHAR);
} else {
st.setInt(index, watermark.isEnabled()?1:0);
st.setInt(index + 1, watermark.getPosition().getCode());
st.setInt(index + 2, watermark.getTransparency());
st.setString(index + 3, watermark.getURL());
}
}