Code example for PreparedStatement

Methods: setDate, setNull

0
   */ 
  public void set(PreparedStatement ps,int index,Object value,int typeCode,JdaTypeConverterMap converterMap)throws SQLException{
  	try{ 
	  	Date parameter =(Date)JdaTypeConvertFactory.convert(value,this.getPersisterType(),converterMap);
	  	if(parameter== null)
	  		ps.setNull(index,typeCode);
	  	else 
	  		ps.setDate(index,new java.sql.Date(parameter.getTime()));
  	} catch (Throwable e) {
	 		throw new JdaException(null,e);
	  }	 
  } 
}