String alt = jobSchema.getAlternateColumn(jobSchema.jobTable, "error_summaryMessage"); if (alt != null) alt = jobSchema.getAlternateColumn(jobSchema.jobTable, "error_type"); if (alt != null) alt = jobSchema.getAlternateColumn(jobSchema.jobTable, "error_documentURL"); if (alt != null)
private int setString(PreparedStatement ps, int col, String tableName, String columnName, String value, StringBuilder sb) throws SQLException Integer limit = jobSchema.getColumnLength(tableName, columnName);
/** * Get the string value from the specified column. The default implementation * simply calls rs.getString(columnName) which should work in most cases. * Applications could override this method to check additional alternate * columns, for example if the value of some strings might be stored in a * TEXT type column instead of a VARCHAR column. * * @param rs * @param tableName * @param columnName * @return * @throws SQLException */ protected String getString(ResultSet rs, String tableName, String columnName) throws SQLException { String value = rs.getString(columnName); if (value == null) { String extCol = jobSchema.getAlternateColumn(tableName, columnName); if ( extCol != null ) value = rs.getString(extCol); } return value; }
/** * The standard postgresql database configuration. Jobs are stored in a * table named uws.Jobs, params and results are stored in a * table named uws.JobDetail. * * @return */ @Override protected JobSchema getJobSchema() { return new JobSchema("uws.Job", "uws.JobDetail", false); }