Package in.partake.model.dao

Examples of in.partake.model.dao.DAOException


                return false;

            next = mapper.map(sars.getResultSet());
            return true;
        } catch (SQLException e) {
            throw new DAOException(e);
        }
    }
View Full Code Here


        } catch (JsonParseException e) {
            throw new IllegalArgumentException(e);
        } catch (JsonMappingException e) {
            throw new IllegalArgumentException(e);
        } catch (IOException e) {
            throw new DAOException(e);
        }
        return new MessageEnvelope(json).freeze();
    }
View Full Code Here

            ps = cn.prepareStatement(sql);
            ps.setString(1, t.key());
            ps.setString(2, t.value());
            ps.execute();
        } catch (SQLException e) {
            throw new DAOException(e);
        } finally {
            close(ps);
        }
    }
View Full Code Here

            ps = cn.prepareStatement(sql);
            ps.setString(1, t.value());
            ps.setString(2, t.key());
            ps.execute();
        } catch (SQLException e) {
            throw new DAOException(e);
        } finally {
            close(ps);
        }
    }
View Full Code Here

                String value = rs.getString(1);
                return new ConfigurationItem(key, value);
            } else
                return null;
        } catch (SQLException e) {
            throw new DAOException(e);
        } finally {
            close(rs);
            close(ps);
        }
    }
View Full Code Here

            ps = cn.prepareStatement(sql);
            ps.setString(1, key);
            rs = ps.executeQuery();
            return rs.next();
        } catch (SQLException e) {
            throw new DAOException(e);
        } finally {
            close(rs);
            close(ps);
        }
    }
View Full Code Here

            String sql = "DELETE FROM " + TABLE_NAME + " WHERE key = ?";
            ps = cn.prepareStatement(sql);
            ps.setString(1, key);
            ps.execute();
        } catch (SQLException e) {
            throw new DAOException(e);
        } finally {
            close(ps);
        }
    }
View Full Code Here

            if (existsTable(con, tableName))
                return;

            createEntitiesTable(con.getConnection());
        } catch (SQLException e) {
            throw new DAOException(e);
        }
    }
View Full Code Here

                ps.setNull(4, Types.NULL);
            ps.setTimestamp(5, new Timestamp(entity.getUpdatedAt().getTime()));

            ps.execute();
        } catch (SQLException e) {
            throw new DAOException(e);
        } finally {
            close(ps);
        }
    }
View Full Code Here

            ps.setTimestamp(4, new Timestamp(TimeUtil.getCurrentTime()));
            ps.setObject(5, entity.getId(), Types.OTHER);

            ps.execute();
        } catch (SQLException e) {
            throw new DAOException(e);
        } finally {
            close(ps);
        }
    }
View Full Code Here

TOP

Related Classes of in.partake.model.dao.DAOException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.