List of usage examples for org.springframework.dao EmptyResultDataAccessException hashCode
@HotSpotIntrinsicCandidate public native int hashCode();
From source file:com.joliciel.jochre.boundaries.BoundaryDaoJdbc.java
@Override public Split loadSplit(int splitId) { NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource()); String sql = "SELECT " + SELECT_SPLIT + " FROM ocr_split WHERE split_id=:split_id"; MapSqlParameterSource paramSource = new MapSqlParameterSource(); paramSource.addValue("split_id", splitId); LOG.debug(sql);/*www .jav a 2s . co m*/ logParameters(paramSource); Split split = null; try { split = (Split) jt.queryForObject(sql, paramSource, new SplitMapper(this.getBoundaryServiceInternal())); } catch (EmptyResultDataAccessException ex) { ex.hashCode(); } return split; }
From source file:com.joliciel.jochre.security.SecurityDaoJdbc.java
@Override public User loadUser(int userId) { NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource()); String sql = "SELECT " + SELECT_USER + " FROM ocr_user WHERE user_id=:user_id"; MapSqlParameterSource paramSource = new MapSqlParameterSource(); paramSource.addValue("user_id", userId); LOG.info(sql);//ww w . j a va2 s. c o m logParameters(paramSource); User user = null; try { user = (User) jt.queryForObject(sql, paramSource, new UserMapper(this.getSecurityServiceInternal())); } catch (EmptyResultDataAccessException ex) { ex.hashCode(); } return user; }
From source file:com.joliciel.jochre.security.SecurityDaoJdbc.java
@Override public User findUser(String username) { NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource()); String sql = "SELECT " + SELECT_USER + " FROM ocr_user WHERE user_username=:user_username"; MapSqlParameterSource paramSource = new MapSqlParameterSource(); paramSource.addValue("user_username", username); LOG.info(sql);/* ww w. j av a2s.c o m*/ logParameters(paramSource); User user = null; try { user = (User) jt.queryForObject(sql, paramSource, new UserMapper(this.getSecurityServiceInternal())); } catch (EmptyResultDataAccessException ex) { ex.hashCode(); } return user; }
From source file:com.joliciel.jochre.security.SecurityDaoJdbc.java
@Override public Parameters loadParameters(int parametersId) { NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource()); String sql = "SELECT " + SELECT_PARAM + " FROM ocr_param WHERE param_id=:param_id"; MapSqlParameterSource paramSource = new MapSqlParameterSource(); paramSource.addValue("param_id", parametersId); LOG.info(sql);/* w w w . ja va2 s.c om*/ logParameters(paramSource); Parameters parameters = null; try { parameters = (Parameters) jt.queryForObject(sql, paramSource, new ParametersMapper(this.getSecurityServiceInternal())); } catch (EmptyResultDataAccessException ex) { ex.hashCode(); } return parameters; }
From source file:com.joliciel.jochre.doc.DocumentDaoJdbc.java
@Override public JochrePage loadJochrePage(int jochrePageId) { NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource()); String sql = "SELECT " + SELECT_PAGE + " FROM ocr_page WHERE page_id=:page_id"; MapSqlParameterSource paramSource = new MapSqlParameterSource(); paramSource.addValue("page_id", jochrePageId); LOG.info(sql);//from w ww. j a va 2s.c o m logParameters(paramSource); JochrePage jochrePage = null; try { jochrePage = (JochrePage) jt.queryForObject(sql, paramSource, new JochrePageMapper(this.getDocumentServiceInternal())); } catch (EmptyResultDataAccessException ex) { ex.hashCode(); } return jochrePage; }
From source file:com.joliciel.jochre.doc.DocumentDaoJdbc.java
@Override public JochreDocument loadJochreDocument(int jochreDocumentId) { NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource()); String sql = "SELECT " + SELECT_DOCUMENT + " FROM ocr_document WHERE doc_id=:doc_id"; MapSqlParameterSource paramSource = new MapSqlParameterSource(); paramSource.addValue("doc_id", jochreDocumentId); LOG.info(sql);// www . j ava 2 s . co m logParameters(paramSource); JochreDocument jochreDocument = null; try { jochreDocument = (JochreDocument) jt.queryForObject(sql, paramSource, new JochreDocumentMapper(this.getDocumentServiceInternal())); } catch (EmptyResultDataAccessException ex) { ex.hashCode(); } return jochreDocument; }
From source file:com.joliciel.jochre.doc.DocumentDaoJdbc.java
@Override public Author loadAuthor(int authorId) { NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource()); String sql = "SELECT " + SELECT_AUTHOR + " FROM ocr_author WHERE author_id=:author_id"; MapSqlParameterSource paramSource = new MapSqlParameterSource(); paramSource.addValue("author_id", authorId); LOG.info(sql);/*from ww w . j a v a2 s. co m*/ logParameters(paramSource); Author author = null; try { author = (Author) jt.queryForObject(sql, paramSource, new AuthorMapper(this.getDocumentServiceInternal())); } catch (EmptyResultDataAccessException ex) { ex.hashCode(); } return author; }
From source file:com.joliciel.jochre.graphics.GraphicsDaoJdbc.java
@Override public Shape loadShape(int shapeId) { NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource()); String sql = "SELECT " + SELECT_SHAPE + " FROM ocr_shape WHERE shape_id=:shape_id"; MapSqlParameterSource paramSource = new MapSqlParameterSource(); paramSource.addValue("shape_id", shapeId); LOG.debug(sql);// w w w . j a v a2s . c o m logParameters(paramSource); Shape shape = null; try { shape = (Shape) jt.queryForObject(sql, paramSource, new ShapeMapper(this.getGraphicsServiceInternal())); } catch (EmptyResultDataAccessException ex) { ex.hashCode(); } return shape; }
From source file:com.joliciel.jochre.graphics.GraphicsDaoJdbc.java
@Override public JochreImage loadJochreImage(int imageId) { NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource()); String sql = "SELECT " + SELECT_IMAGE + " FROM ocr_image WHERE image_id=:image_id"; MapSqlParameterSource paramSource = new MapSqlParameterSource(); paramSource.addValue("image_id", imageId); LOG.debug(sql);//from w w w .ja v a2 s. co m logParameters(paramSource); JochreImage image = null; try { image = (JochreImage) jt.queryForObject(sql, paramSource, new JochreImageMapper(this.getGraphicsServiceInternal())); } catch (EmptyResultDataAccessException ex) { ex.hashCode(); } return image; }
From source file:com.joliciel.jochre.graphics.GraphicsDaoJdbc.java
@Override public RowOfShapes loadRowOfShapes(int rowId) { NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource()); String sql = "SELECT " + SELECT_ROW + " FROM ocr_row WHERE row_id=:row_id"; MapSqlParameterSource paramSource = new MapSqlParameterSource(); paramSource.addValue("row_id", rowId); LOG.debug(sql);//from w w w. jav a2 s. co m logParameters(paramSource); RowOfShapes row = null; try { row = (RowOfShapes) jt.queryForObject(sql, paramSource, new RowOfShapesMapper(this.getGraphicsServiceInternal())); } catch (EmptyResultDataAccessException ex) { ex.hashCode(); } return row; }