- public PubFailRecord(String[] pp) throws ParseException {\r
- super(pp);\r
- this.contentLengthReceived = Long.parseLong(pp[8]);\r
- this.sourceIP = pp[9];\r
- this.user = pp[10];\r
- this.error = pp[11];\r
- }\r
- public PubFailRecord(ResultSet rs) throws SQLException {\r
- super(rs);\r
- // Note: because this record should be "rare" these fields are mapped to unconventional fields in the DB\r
- this.contentLengthReceived = rs.getLong("CONTENT_LENGTH_2");\r
- this.sourceIP = rs.getString("REMOTE_ADDR");\r
- this.user = rs.getString("USER");\r
- this.error = rs.getString("FEED_FILEID");\r
- }\r
- public long getContentLengthReceived() {\r
- return contentLengthReceived;\r
- }\r
- public String getSourceIP() {\r
- return sourceIP;\r
- }\r
- public String getUser() {\r
- return user;\r
- }\r
- public String getError() {\r
- return error;\r
- }\r
- @Override\r
- public void load(PreparedStatement ps) throws SQLException {\r
- ps.setString(1, "pbf"); // field 1: type\r
- super.load(ps); // loads fields 2-8\r
- ps.setString( 9, getError());\r
- ps.setString(10, getSourceIP());\r
- ps.setString(11, getUser());\r
- ps.setNull (12, Types.INTEGER);\r
- ps.setNull (13, Types.INTEGER);\r
- ps.setNull (14, Types.VARCHAR);\r
- ps.setNull (15, Types.INTEGER);\r
- ps.setNull (16, Types.INTEGER);\r
- ps.setNull (17, Types.VARCHAR);\r
- ps.setLong (19, getContentLengthReceived());\r
- }\r
+ @Override\r
+ public void load(PreparedStatement ps) throws SQLException {\r
+ ps.setString(1, "pbf"); // field 1: type\r
+ super.load(ps); // loads fields 2-8\r
+ ps.setString(9, getError());\r
+ ps.setString(10, getSourceIP());\r
+ ps.setString(11, getUser());\r
+ ps.setNull(12, Types.INTEGER);\r
+ ps.setNull(13, Types.INTEGER);\r
+ ps.setNull(14, Types.VARCHAR);\r
+ ps.setNull(15, Types.INTEGER);\r
+ ps.setNull(16, Types.INTEGER);\r
+ ps.setNull(17, Types.VARCHAR);\r
+ ps.setLong(19, getContentLengthReceived());\r
+ }\r