Example usage for org.springframework.dao EmptyResultDataAccessException hashCode

List of usage examples for org.springframework.dao EmptyResultDataAccessException hashCode

Introduction

In this page you can find the example usage for org.springframework.dao EmptyResultDataAccessException hashCode.

Prototype

@HotSpotIntrinsicCandidate
public native int hashCode();

Source Link

Document

Returns a hash code value for the object.

Usage

From source file:com.joliciel.jochre.graphics.GraphicsDaoJdbc.java

@Override
public GroupOfShapes loadGroupOfShapes(int groupId) {
    NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource());
    String sql = "SELECT " + SELECT_GROUP + " FROM ocr_group WHERE group_id=:group_id";
    MapSqlParameterSource paramSource = new MapSqlParameterSource();
    paramSource.addValue("group_id", groupId);

    LOG.debug(sql);//from   w w  w.j  a va  2  s . co m
    logParameters(paramSource);
    GroupOfShapes group = null;
    try {
        group = (GroupOfShapes) jt.queryForObject(sql, paramSource,
                new GroupOfShapesMapper(this.getGraphicsServiceInternal()));
    } catch (EmptyResultDataAccessException ex) {
        ex.hashCode();
    }
    return group;
}

From source file:com.joliciel.jochre.graphics.GraphicsDaoJdbc.java

@Override
public Paragraph loadParagraph(int paragraphId) {
    NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource());
    String sql = "SELECT " + SELECT_PARAGRAPH + " FROM ocr_paragraph WHERE paragraph_id=:paragraph_id";
    MapSqlParameterSource paramSource = new MapSqlParameterSource();
    paramSource.addValue("paragraph_id", paragraphId);

    LOG.debug(sql);/*from ww  w .  j  a  v  a2  s  .  c  om*/
    logParameters(paramSource);
    Paragraph paragraph = null;
    try {
        paragraph = (Paragraph) jt.queryForObject(sql, paramSource,
                new ParagraphMapper(this.getGraphicsServiceInternal()));
    } catch (EmptyResultDataAccessException ex) {
        ex.hashCode();
    }
    return paragraph;
}

From source file:com.joliciel.frenchTreebank.TreebankDaoImpl.java

public Category loadCategory(int categoryId) {
    NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource());
    String sql = "SELECT " + SELECT_CATEGORY + " FROM ftb_category WHERE cat_id=:cat_id";
    MapSqlParameterSource paramSource = new MapSqlParameterSource();
    paramSource.addValue("cat_id", categoryId);

    LOG.info(sql);/* ww w.ja  va  2s  . c om*/
    TreebankDaoImpl.LogParameters(paramSource);
    Category category = null;
    try {
        category = (Category) jt.queryForObject(sql, paramSource, new CategoryMapper());
    } catch (EmptyResultDataAccessException ex) {
        ex.hashCode();
    }
    return category;
}

From source file:com.joliciel.frenchTreebank.TreebankDaoImpl.java

public Category loadCategory(String categoryCode) {
    NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource());
    String sql = "SELECT " + SELECT_CATEGORY + " FROM ftb_category WHERE cat_code=:cat_code";
    MapSqlParameterSource paramSource = new MapSqlParameterSource();
    paramSource.addValue("cat_code", categoryCode);

    LOG.info(sql);//from w ww  .ja va2  s  .c  o m
    TreebankDaoImpl.LogParameters(paramSource);
    Category category = null;
    try {
        category = (Category) jt.queryForObject(sql, paramSource, new CategoryMapper());
    } catch (EmptyResultDataAccessException ex) {
        ex.hashCode();
    }
    return category;
}

From source file:com.joliciel.frenchTreebank.TreebankDaoImpl.java

public Function loadFunction(String functionCode) {
    NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource());
    String sql = "SELECT " + SELECT_FUNCTION + " FROM ftb_function WHERE function_code=:function_code";
    MapSqlParameterSource paramSource = new MapSqlParameterSource();
    paramSource.addValue("function_code", functionCode);

    LOG.info(sql);/*from  w  w  w  .j  ava2s  .c o m*/
    TreebankDaoImpl.LogParameters(paramSource);
    Function function = null;
    try {
        function = (Function) jt.queryForObject(sql, paramSource, new FunctionMapper());
    } catch (EmptyResultDataAccessException ex) {
        ex.hashCode();
    }
    return function;
}

From source file:com.joliciel.frenchTreebank.TreebankDaoImpl.java

public Morphology loadMorphology(int morphologyId) {
    NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource());
    String sql = "SELECT " + SELECT_MORPHOLOGY + " FROM ftb_morph WHERE morph_id=:morph_id";
    MapSqlParameterSource paramSource = new MapSqlParameterSource();
    paramSource.addValue("morph_id", morphologyId);

    LOG.info(sql);/*from  w w w.ja  v a2 s  . co  m*/
    TreebankDaoImpl.LogParameters(paramSource);
    Morphology morphology = null;
    try {
        morphology = (Morphology) jt.queryForObject(sql, paramSource, new MorphologyMapper());
    } catch (EmptyResultDataAccessException ex) {
        ex.hashCode();
    }
    return morphology;
}

From source file:com.joliciel.frenchTreebank.TreebankDaoImpl.java

public Morphology loadMorphology(String morphologyCode) {
    NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource());
    String sql = "SELECT " + SELECT_MORPHOLOGY + " FROM ftb_morph WHERE morph_code=:morph_code";
    MapSqlParameterSource paramSource = new MapSqlParameterSource();
    paramSource.addValue("morph_code", morphologyCode);

    LOG.info(sql);//from  w  ww  .  ja va 2  s  .  c o m
    TreebankDaoImpl.LogParameters(paramSource);
    Morphology morphology = null;
    try {
        morphology = (Morphology) jt.queryForObject(sql, paramSource, new MorphologyMapper());
    } catch (EmptyResultDataAccessException ex) {
        ex.hashCode();
    }
    return morphology;
}

From source file:com.joliciel.frenchTreebank.TreebankDaoImpl.java

public PhraseType loadPhraseType(String phraseTypeCode) {
    NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource());
    String sql = "SELECT " + SELECT_PHRASE_TYPE + " FROM ftb_phrase_type WHERE ptype_code=:ptype_code";
    MapSqlParameterSource paramSource = new MapSqlParameterSource();
    paramSource.addValue("ptype_code", phraseTypeCode);

    LOG.info(sql);// www .  j  a v  a  2s.co  m
    TreebankDaoImpl.LogParameters(paramSource);
    PhraseType phraseType = null;
    try {
        phraseType = (PhraseType) jt.queryForObject(sql, paramSource, new PhraseTypeMapper());
    } catch (EmptyResultDataAccessException ex) {
        ex.hashCode();
    }
    return phraseType;
}

From source file:com.joliciel.frenchTreebank.TreebankDaoImpl.java

public PhraseType loadPhraseType(int phraseTypeId) {
    NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource());
    String sql = "SELECT " + SELECT_PHRASE_TYPE + " FROM ftb_phrase_type WHERE ptype_id=:ptype_id";
    MapSqlParameterSource paramSource = new MapSqlParameterSource();
    paramSource.addValue("ptype_id", phraseTypeId);

    LOG.info(sql);/*from ww w .ja va2  s  .  co  m*/
    TreebankDaoImpl.LogParameters(paramSource);
    PhraseType phraseType = null;
    try {
        phraseType = (PhraseType) jt.queryForObject(sql, paramSource, new PhraseTypeMapper());
    } catch (EmptyResultDataAccessException ex) {
        ex.hashCode();
    }
    return phraseType;
}

From source file:com.joliciel.frenchTreebank.TreebankDaoImpl.java

public SubCategory loadSubCategory(int subCategoryId) {
    NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource());
    String sql = "SELECT " + SELECT_SUB_CATEGORY + " FROM ftb_sub_category WHERE subcat_id = :subcat_id";
    MapSqlParameterSource paramSource = new MapSqlParameterSource();
    paramSource.addValue("subcat_id", subCategoryId);

    LOG.info(sql);//from   w w  w  . jav  a  2  s.  co  m
    TreebankDaoImpl.LogParameters(paramSource);
    SubCategory subCategory = null;
    try {
        subCategory = (SubCategory) jt.queryForObject(sql, paramSource, new SubCategoryMapper());
    } catch (EmptyResultDataAccessException ex) {
        ex.hashCode();
    }
    return subCategory;
}