/** * @param s Box definition in PostgreSQL syntax * @exception SQLException if definition is invalid */ public PGbox(String s) throws SQLException { this(); setValue(s); }
/** * Required constructor. */ public PGbox() { setType("box"); }
return new PGbox(rawValue.asString()); } catch (final SQLException e) { LOGGER.error("Failed to parse point {}, {}", rawValue.asString(), e);
PGbox pgBox = new PGbox(); pgBox.setByteValue((byte[]) paramValues[index], 0); return "'" + pgBox.toString() + "'::box";
@Override protected Box toObject(PGbox value) { Box obj=new Box(); obj.setValue(value.getValue()); return obj; }
@Override protected PGbox newInstance() { return new PGbox(); }
/** * @param s Box definition in PostgreSQL syntax * @throws SQLException if definition is invalid */ public PGbox(String s) throws SQLException { this(); setValue(s); }
@Override protected Box toObjectFromString(String value) { String val=(String)value; try { PGbox pgObject=new PGbox(val); return toObject(pgObject); } catch(SQLException e) { throw new RuntimeException(e); } }
/** * Required constructor */ public PGbox() { setType("box"); }
/** * @param s Box definition in PostgreSQL syntax * @exception SQLException if definition is invalid */ public PGbox(String s) throws SQLException { this(); setValue(s); }
@Override public void nullSafeSet(PreparedStatement preparedStatement, Object value, int i, SharedSessionContractImplementor sessionImplementor) throws HibernateException, SQLException { Box rect = (Box) value; if (value == null) { preparedStatement.setNull(i, java.sql.Types.OTHER); } else { preparedStatement.setObject(i, new PGbox(rect.getP1().getX(), rect.getP1().getY(), rect.getP2().getX(), rect.getP2().getY())); } }
/** * Required constructor */ public PGbox() { setType("box"); }
/** * @param s Box definition in PostgreSQL syntax * @exception SQLException if definition is invalid */ public PGbox(String s) throws SQLException { this(); setValue(s); }
@Override protected PGbox toDbType(Box obj) { return new PGbox(obj.getPoints()[0].getX() , obj.getPoints()[0].getY() , obj.getPoints()[1].getX() , obj.getPoints()[1].getY() ); }
/** * Required constructor */ public PGbox() { setType("box"); }
@Override protected void setValue(PGbox obj, String value) throws SQLException { obj.setValue(value); }
return new PGbox(rawValue.asString()); } catch (final SQLException e) { LOGGER.error("Failed to parse point {}, {}", rawValue.asString(), e);