Skip to content

Commit 5a516a3

Browse files
author
pair1
committed
Renamed Postgre to Elephant
1 parent bbf8c80 commit 5a516a3

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

app/WebContent/home.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<a href="/delete" class="btn btn-danger" title="Clear All">X</a>
2222
</div>
2323
<div class="text-center">
24-
<h1><a href="/">PostgreSQL Upload</a></h1>
24+
<h1><a href="/">ElephantSQL Upload</a></h1>
2525
<p>
2626
<form action="/upload" method="POST" enctype="multipart/form-data">
2727
<input type="file" name="file" /><br>

app/src/com/ibm/bluemix/samples/DeleteServlet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
@SuppressWarnings("serial")
5353
public class DeleteServlet extends HttpServlet {
5454

55-
private PostgreSQLClient db = new PostgreSQLClient();
55+
private ElephantSQLClient db = new ElephantSQLClient();
5656

5757
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
5858
System.out.println("Delete Servlet");

app/src/com/ibm/bluemix/samples/PostgreSQLClient.java renamed to app/src/com/ibm/bluemix/samples/ElephantSQLClient.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@
5656
import org.json.simple.JSONObject;
5757
import org.json.simple.parser.JSONParser;
5858

59-
public class PostgreSQLClient {
59+
public class ElephantSQLClient {
6060

61-
public PostgreSQLClient() {
61+
public ElephantSQLClient() {
6262
try {
6363
createTable();
6464
} catch (Exception e) {
@@ -67,9 +67,9 @@ public PostgreSQLClient() {
6767
}
6868

6969
/**
70-
* Grab text from PostgreSQL
70+
* Grab text from ElephantSQL
7171
*
72-
* @return List of Strings of text from PostgreSQL
72+
* @return List of Strings of text from ElephantSQL
7373
* @throws Exception
7474
*/
7575
public List<String> getResults() throws Exception {
@@ -86,7 +86,7 @@ public List<String> getResults() throws Exception {
8686

8787
while (results.next()) {
8888
texts.add(results.getString("text"));
89-
}
89+
}
9090

9191
return texts;
9292
} finally {
@@ -105,7 +105,7 @@ public List<String> getResults() throws Exception {
105105
}
106106

107107
/**
108-
* Insert text into PostgreSQL
108+
* Insert text into ElephantSQL
109109
*
110110
* param posts List of Strings of text to insert
111111
* @return number of rows affected
@@ -149,7 +149,7 @@ public int addPosts(List<String> posts) throws Exception {
149149
}
150150

151151
/**
152-
* Delete all rows from PostgreSQL
152+
* Delete all rows from ElephantSQL
153153
* @return number of rows affected
154154
* @throws Exception
155155
*/
@@ -181,7 +181,7 @@ private static Connection getConnection() throws Exception {
181181
JSONObject vcap = (JSONObject) parser.parse(env.get("VCAP_SERVICES"));
182182
JSONObject service = null;
183183

184-
// We don't know exactly what the service is called, but it will contain "postgresql"
184+
// We don't know exactly what the service is called, but it will contain "elephantsql"
185185
for (Object key : vcap.keySet()) {
186186
String keyStr = (String) key;
187187
if (keyStr.toLowerCase().contains("elephantsql")) {
@@ -200,7 +200,7 @@ private static Connection getConnection() throws Exception {
200200
}
201201
}
202202

203-
throw new Exception("No PostgreSQL service URL found. Make sure you have bound the correct services to your app.");
203+
throw new Exception("No ElephantSQL service URL found. Make sure you have bound the correct services to your app.");
204204
}
205205

206206
/**

app/src/com/ibm/bluemix/samples/HomeServlet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
@SuppressWarnings("serial")
5555
public class HomeServlet extends HttpServlet {
5656

57-
private PostgreSQLClient db = new PostgreSQLClient();
57+
private ElephantSQLClient db = new ElephantSQLClient();
5858

5959
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
6060
System.out.println("Home Servlet");

app/src/com/ibm/bluemix/samples/UploadServlet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
@SuppressWarnings("serial")
6161
public class UploadServlet extends HttpServlet {
6262

63-
private PostgreSQLClient db = new PostgreSQLClient();
63+
private ElephantSQLClient db = new ElephantSQLClient();
6464

6565
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
6666
System.out.println("Upload Servlet");

0 commit comments

Comments
 (0)