summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustyna Ilczuk <justyna.ilczuk@gmail.com>2013-04-26 16:48:50 +0200
committerJustyna Ilczuk <justyna.ilczuk@gmail.com>2013-04-26 16:48:50 +0200
commitcb39a2b373f34cb65271c21c86411cf401d31710 (patch)
tree1198d032588641ef13c80e66e9ecb6f75ddfd984
parent41608e3dc342a0022272458dd9ff65fed7b39187 (diff)
downloadmobi_reader-cb39a2b373f34cb65271c21c86411cf401d31710.tar.gz
mobi_reader-cb39a2b373f34cb65271c21c86411cf401d31710.tar.bz2
mobi_reader-cb39a2b373f34cb65271c21c86411cf401d31710.tar.xz
mobi_reader-cb39a2b373f34cb65271c21c86411cf401d31710.zip
names of methods in statementBuilder are simpler now
-rw-r--r--MobiReader/src/mobireader/SqliteDatabaseHandler.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/MobiReader/src/mobireader/SqliteDatabaseHandler.java b/MobiReader/src/mobireader/SqliteDatabaseHandler.java
index bc5aa90..b374271 100644
--- a/MobiReader/src/mobireader/SqliteDatabaseHandler.java
+++ b/MobiReader/src/mobireader/SqliteDatabaseHandler.java
@@ -19,7 +19,7 @@ import java.util.ArrayList;
class StatementBuilder
{
- public PreparedStatement prepareFindingAuthorByNameStatement(Connection connection) throws SQLException
+ public PreparedStatement findAuthorByNameStatement(Connection connection) throws SQLException
{
PreparedStatement statement = connection.prepareStatement(
"select * from authors where name=?");
@@ -27,7 +27,7 @@ class StatementBuilder
return statement;
}
- public PreparedStatement prepareAddingAuthorStatement(Connection connection)
+ public PreparedStatement addAuthorStatement(Connection connection)
throws SQLException, ClassNotFoundException
{
PreparedStatement statement = connection.prepareStatement(
@@ -37,7 +37,7 @@ class StatementBuilder
}
- public PreparedStatement prepareAddingBookStatement(Connection connection)
+ public PreparedStatement addBookStatement(Connection connection)
throws SQLException, ClassNotFoundException
{
PreparedStatement statement = connection.prepareStatement(
@@ -46,7 +46,7 @@ class StatementBuilder
return statement;
}
- public PreparedStatement prepareFindingBookStatement(Connection connection)
+ public PreparedStatement findBookStatement(Connection connection)
throws SQLException, ClassNotFoundException
{
PreparedStatement statement = connection.prepareStatement(
@@ -55,7 +55,7 @@ class StatementBuilder
return statement;
}
- public PreparedStatement prepareFindingBookByAuthorStatement(Connection connection)
+ public PreparedStatement findBookByAuthorStatement(Connection connection)
throws SQLException, ClassNotFoundException
{
PreparedStatement statement = connection.prepareStatement(
@@ -112,7 +112,7 @@ public class SqliteDatabaseHandler
this.addAuthor(book.getAuthor());
}
PreparedStatement stat;
- stat= statBld.prepareAddingBookStatement(connection);
+ stat= statBld.addBookStatement(connection);
stat.setString(1, book.getTitle());
stat.setString(2, book.getAuthor().getName());
stat.setString(3, book.getPathToContent());
@@ -144,7 +144,7 @@ public class SqliteDatabaseHandler
try
{
PreparedStatement stat;
- stat= statBld.prepareFindingBookStatement(connection);
+ stat= statBld.findBookStatement(connection);
stat.setString(1, title);
stat.executeQuery();
ResultSet rs = stat.executeQuery();
@@ -179,7 +179,7 @@ public class SqliteDatabaseHandler
try
{
PreparedStatement stat;
- stat = statBld.prepareFindingBookByAuthorStatement(connection);
+ stat = statBld.findBookByAuthorStatement(connection);
stat.setString(1, author.getName());
ResultSet rs = stat.executeQuery();
ArrayList<Book> books = new ArrayList<>();
@@ -219,7 +219,7 @@ public class SqliteDatabaseHandler
try
{
PreparedStatement stat;
- stat= statBld.prepareAddingAuthorStatement(connection);
+ stat= statBld.addAuthorStatement(connection);
stat.setString(1, author.getName());
stat.setString(2, author.getAdditionalInfo());
stat.executeUpdate();
@@ -252,7 +252,7 @@ public class SqliteDatabaseHandler
try
{
PreparedStatement stat;
- stat= statBld.prepareFindingAuthorByNameStatement(connection);
+ stat= statBld.findAuthorByNameStatement(connection);
stat.setString(1, name);
stat.executeQuery();
ResultSet rs = stat.executeQuery();