Пример #1
0
 @Override
 protected void map(Project project, PreparedStatement stmt) throws SQLException {
   // id
   stmt.setInt(1, seq.get(Sequence.PROJECT, project.id));
   // ref_id
   stmt.setString(2, project.id);
   // name
   stmt.setString(3, project.name);
   // description
   stmt.setString(4, project.description);
   // f_category
   if (Category.isNull(project.categoryid)) stmt.setNull(5, java.sql.Types.INTEGER);
   else stmt.setInt(5, seq.get(Sequence.CATEGORY, project.categoryid));
   // creation_date
   stmt.setDate(6, project.creationdate);
   // functional_unit
   stmt.setString(7, project.functionalunit);
   // last_modification_date
   stmt.setDate(8, project.lastmodificationdate);
   // goal
   stmt.setString(9, project.goal);
   // f_author
   if (project.f_author == null) stmt.setNull(10, java.sql.Types.INTEGER);
   else stmt.setInt(10, seq.get(Sequence.ACTOR, project.f_author));
   // f_impact_method
   stmt.setNull(11, java.sql.Types.INTEGER);
   // f_nwset
   stmt.setNull(12, java.sql.Types.INTEGER);
   stmt.setLong(13, System.currentTimeMillis());
   stmt.setLong(14, 4294967296L);
 }
Пример #2
0
 @Override
 protected void map(Source source, PreparedStatement stmt) throws SQLException {
   stmt.setInt(1, seq.get(Sequence.SOURCE, source.id));
   stmt.setString(2, source.id);
   stmt.setString(3, source.description);
   if (Category.isNull(source.categoryid)) stmt.setNull(4, java.sql.Types.INTEGER);
   else stmt.setInt(4, seq.get(Sequence.CATEGORY, source.categoryid));
   stmt.setString(5, source.name);
   stmt.setInt(6, source.year);
   stmt.setString(7, source.textreference);
   stmt.setString(8, source.doi);
   stmt.setLong(9, System.currentTimeMillis());
   stmt.setLong(10, 4294967296L);
 }