/** * @see org.hibernate.type.NullableType#sqlType() */ public int sqlType() { return Hibernate.STRING.sqlType(); }
public int[] sqlTypes() { return new int[]{ Hibernate.FLOAT.sqlType() }; } }
public int[] sqlTypes() { return new int[]{ Hibernate.INTEGER.sqlType() }; } }
public int[] sqlTypes() { return new int[]{ Hibernate.STRING.sqlType() }; } }
/** * @see org.hibernate.type.NullableType#sqlType() */ public int sqlType() { return Hibernate.STRING.sqlType(); }
public int[] sqlTypes() { return new int[]{ Hibernate.STRING.sqlType() }; } }
public void nullSafeSet(final PreparedStatement st, final Object value, final int index) throws HibernateException, SQLException { if (value == null) { st.setNull(index, Hibernate.STRING.sqlType()); } else { st.setString(index, ((MultilineString)value).getString()); } }
public void nullSafeSet(final PreparedStatement st, final Object value, final int index) throws HibernateException, SQLException { if (value == null) { st.setNull(index, Hibernate.FLOAT.sqlType()); } else { st.setFloat(index, ((Percentage)value).floatValue()); } }
public void nullSafeSet(final PreparedStatement st, final Object value, final int index) throws HibernateException, SQLException { if (value == null) { st.setNull(index, Hibernate.TIME.sqlType()); } else { Time nofTime = (Time)value; java.sql.Time sqlTime = new java.sql.Time( nofTime.dateValue().getTime() ); st.setTime(index, sqlTime); } }
public void nullSafeSet(final PreparedStatement st, final Object value, final int index) throws HibernateException, SQLException { if (value == null) { st.setNull(index, Hibernate.INTEGER.sqlType()); } else { st.setInt(index, ((Color)value).intValue()); } }
public void nullSafeSet(final PreparedStatement st, final Object value, final int index) throws HibernateException, SQLException { if (value == null) { st.setNull(index, Hibernate.LONG.sqlType()); } else { st.setLong(index, ((TimeStamp)value).longValue()); } }
public void nullSafeSet(final PreparedStatement st, final Object value, final int index) throws HibernateException, SQLException { if (value == null) { st.setNull(index, Hibernate.STRING.sqlType()); } else { st.setString(index, ServiceUtil.id(value)); } }
public void nullSafeSet(final PreparedStatement statement, final Object value, final int index, final SessionImplementor session) throws SQLException { if (value==null) { statement.setNull(index, Hibernate.BIG_DECIMAL.sqlType()); statement.setNull(index+1, Hibernate.STRING.sqlType()); } else { Money amount = (Money) value; statement.setBigDecimal( index, amount.getAmount() ); statement.setString( index+1, amount.getCurrency() ); } }
public void nullSafeSet(final PreparedStatement st, final Object value, final int index) throws HibernateException, SQLException { if (value == null) { st.setNull(index, Hibernate.DATE.sqlType()); } else { Date nofDate = (Date)value; java.sql.Date sqlDate = new java.sql.Date( nofDate.dateValue().getTime() ); st.setDate(index, sqlDate); } }
public void nullSafeSet(final PreparedStatement st, final Object value, final int index) throws HibernateException, SQLException { if (value == null) { st.setNull(index, Hibernate.DATE.sqlType()); } else { DateTime dateTime = (DateTime)value; java.sql.Date sqlDate = new java.sql.Date( dateTime.dateValue().getTime() ); st.setDate(index, sqlDate); } }
public void nullSafeSet(final PreparedStatement st, final Object value, final int index) throws HibernateException, SQLException { if (value == null) { st.setNull(index, Hibernate.STRING.sqlType()); } else { st.setString(index, ((Password) value).getPassword()); } }
public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { try { if (value == null) { st.setNull(index, type.sqlType()); } else { Object identifier = identifierMethod.invoke(value, new Object[0]); type.set(st, identifier, index); } } catch (Exception e) { throw new HibernateException("Exception while invoking identifierMethod '" + identifierMethod.getName() + "' of " + "enumeration class '" + enumClass + "'", e); } }
public void testNullSafeSetIsNull() throws Exception { final MockControl<PreparedStatement> control = MockControl.createControl(PreparedStatement.class); final PreparedStatement ps = (PreparedStatement) control.getMock(); ps.setNull(1, Hibernate.DATE.sqlType()); control.replay(); // finished recording final DateType type = new DateType(); type.nullSafeSet(ps, null, 1); control.verify(); }
public void testNullSafeSetIsNull() throws Exception { final MockControl<PreparedStatement> control = MockControl.createControl(PreparedStatement.class); final PreparedStatement ps = (PreparedStatement) control.getMock(); ps.setNull(1, Hibernate.INTEGER.sqlType()); control.replay(); // finished recording final ColorType type = new ColorType(); type.nullSafeSet(ps, null, 1); control.verify(); }
public void testNullSafeSetIsNull() throws Exception { final MockControl<PreparedStatement> control = MockControl.createControl(PreparedStatement.class); final PreparedStatement ps = (PreparedStatement) control.getMock(); ps.setNull(1, Hibernate.TIME.sqlType()); control.replay(); // finished recording final TimeType type = new TimeType(); type.nullSafeSet(ps, null, 1); control.verify(); }