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.lefff.LefffDaoImpl.java

public Attribute loadAttribute(String attributeCode, String attributeValue) {
    NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource());

    String sql = "SELECT " + SELECT_ATTRIBUTE + " FROM lef_attribute" + " WHERE attribute_code=:attribute_code"
            + " AND attribute_value=:attribute_value";
    MapSqlParameterSource paramSource = new MapSqlParameterSource();
    paramSource.addValue("attribute_code", attributeCode);
    paramSource.addValue("attribute_value", attributeValue);

    LOG.info(sql);/*from   w  ww .  j a va 2s  . co  m*/
    LefffDaoImpl.LogParameters(paramSource);
    Attribute attribute = null;
    try {
        attribute = (Attribute) jt.queryForObject(sql, paramSource,
                new AttributeMapper(this.getLefffServiceInternal()));
    } catch (EmptyResultDataAccessException ex) {
        ex.hashCode();
    }
    return attribute;
}

From source file:com.joliciel.lefff.LefffDaoImpl.java

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

    LOG.info(sql);/*from w  w w . j a va  2 s  .c om*/
    LefffDaoImpl.LogParameters(paramSource);
    Category category = null;
    try {
        category = (Category) jt.queryForObject(sql, paramSource,
                new CategoryMapper(this.getLefffServiceInternal()));
    } catch (EmptyResultDataAccessException ex) {
        ex.hashCode();
    }
    return category;
}

From source file:com.joliciel.lefff.LefffDaoImpl.java

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

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

From source file:com.joliciel.lefff.LefffDaoImpl.java

public Predicate loadPredicate(int predicateId) {
    NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource());
    String sql = "SELECT " + SELECT_PREDICATE + " FROM lef_predicate WHERE predicate_id=:predicate_id";
    MapSqlParameterSource paramSource = new MapSqlParameterSource();
    paramSource.addValue("predicate_id", predicateId);

    LOG.info(sql);/*from  w  w w.j  av  a2  s.co m*/
    LefffDaoImpl.LogParameters(paramSource);
    Predicate predicate = null;
    try {
        predicate = (Predicate) jt.queryForObject(sql, paramSource,
                new PredicateMapper(this.getLefffServiceInternal()));
    } catch (EmptyResultDataAccessException ex) {
        ex.hashCode();
    }
    return predicate;
}

From source file:com.joliciel.lefff.LefffDaoImpl.java

public Predicate loadPredicate(String predicateText) {
    NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource());
    String sql = "SELECT " + SELECT_PREDICATE + " FROM lef_predicate WHERE predicate_text=:predicate_text";
    MapSqlParameterSource paramSource = new MapSqlParameterSource();
    paramSource.addValue("predicate_text", predicateText);

    LOG.info(sql);/*from   w  w  w.  java  2 s  . com*/
    LefffDaoImpl.LogParameters(paramSource);
    Predicate predicate = null;
    try {
        predicate = (Predicate) jt.queryForObject(sql, paramSource,
                new PredicateMapper(this.getLefffServiceInternal()));
    } catch (EmptyResultDataAccessException ex) {
        ex.hashCode();
    }
    return predicate;
}

From source file:com.joliciel.lefff.LefffDaoImpl.java

@Override
public Lemma loadLemma(int lemmaId) {
    NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource());
    String sql = "SELECT " + SELECT_LEMMA + " FROM lef_lemma WHERE lemma_id=:lemma_id";
    MapSqlParameterSource paramSource = new MapSqlParameterSource();
    paramSource.addValue("lemma_id", lemmaId);

    LOG.info(sql);//from   www .  j av a 2  s . co m
    LefffDaoImpl.LogParameters(paramSource);
    Lemma lemma = null;
    try {
        lemma = (Lemma) jt.queryForObject(sql, paramSource, new LemmaMapper(this.getLefffServiceInternal()));
    } catch (EmptyResultDataAccessException ex) {
        ex.hashCode();
    }
    return lemma;
}

From source file:com.joliciel.lefff.LefffDaoImpl.java

@Override
public Lemma loadLemma(String text, int index, String complement) {
    NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource());
    String sql = "SELECT " + SELECT_LEMMA + " FROM lef_lemma" + " WHERE lemma_text=:lemma_text"
            + " AND lemma_index=:lemma_index" + " AND lemma_complement=:lemma_complement";
    MapSqlParameterSource paramSource = new MapSqlParameterSource();
    paramSource.addValue("lemma_text", text);
    paramSource.addValue("lemma_index", index);
    paramSource.addValue("lemma_complement", complement);

    LOG.info(sql);/* w ww  .  j  av  a  2s  .c  o  m*/
    LefffDaoImpl.LogParameters(paramSource);
    Lemma lemma = null;
    try {
        lemma = (Lemma) jt.queryForObject(sql, paramSource, new LemmaMapper(this.getLefffServiceInternal()));
    } catch (EmptyResultDataAccessException ex) {
        ex.hashCode();
    }
    return lemma;
}

From source file:com.joliciel.lefff.LefffDaoImpl.java

public Word loadWord(String text) {
    NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource());
    MapSqlParameterSource paramSource = new MapSqlParameterSource();

    if (text == null)
        text = "";
    String sql = "SELECT " + SELECT_WORD + " FROM lef_word WHERE word_text=:word_text";
    paramSource.addValue("word_text", text);

    LOG.info(sql);/*from  ww w .  java  2s  .co  m*/
    LefffDaoImpl.LogParameters(paramSource);
    Word word = null;
    try {
        word = (Word) jt.queryForObject(sql, paramSource, new WordMapper(this.lefffServiceInternal));
    } catch (EmptyResultDataAccessException ex) {
        ex.hashCode();
    }
    return word;
}

From source file:com.joliciel.lefff.LefffDaoImpl.java

public Word loadWord(int wordId) {
    NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource());
    String sql = "SELECT " + SELECT_WORD + " FROM lef_word WHERE word_id=:word_id";
    MapSqlParameterSource paramSource = new MapSqlParameterSource();
    paramSource.addValue("word_id", wordId);

    LOG.info(sql);//from  w  w  w  .j a  v  a2 s. c o  m
    LefffDaoImpl.LogParameters(paramSource);
    Word word = null;
    try {
        word = (Word) jt.queryForObject(sql, paramSource, new WordMapper(this.lefffServiceInternal));
    } catch (EmptyResultDataAccessException ex) {
        ex.hashCode();
    }
    return word;
}

From source file:com.joliciel.lefff.LefffDaoImpl.java

@Override
public LefffEntry loadEntry(int entryId) {
    NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(this.getDataSource());
    String sql = "SELECT " + SELECT_ENTRY + " FROM lef_entry WHERE entry_id=:entry_id";
    MapSqlParameterSource paramSource = new MapSqlParameterSource();
    paramSource.addValue("entry_id", entryId);

    LOG.info(sql);/* w  w  w. j a  v a  2s.c o m*/
    LefffDaoImpl.LogParameters(paramSource);
    LefffEntry entry = null;
    try {
        entry = (LefffEntry) jt.queryForObject(sql, paramSource, new EntryMapper(this.lefffServiceInternal));
    } catch (EmptyResultDataAccessException ex) {
        ex.hashCode();
    }
    return entry;
}