aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2001-11-19 22:43:13 +0000
committerBruce Momjian <bruce@momjian.us>2001-11-19 22:43:13 +0000
commit6c8120d68ced229111aeb1e45cb6aa3219e1e70b (patch)
tree21d637cf5b5a33f382f6b595564205afc42c3a51
parent46d50783bf16b2db28160c2b968cd6d5cd65600d (diff)
downloadpostgresql-6c8120d68ced229111aeb1e45cb6aa3219e1e70b.tar.gz
postgresql-6c8120d68ced229111aeb1e45cb6aa3219e1e70b.zip
More jdbc comment cleanups. Code looks very nice now.
-rw-r--r--src/interfaces/jdbc/example/ImageViewer.java22
-rw-r--r--src/interfaces/jdbc/example/Unicode.java18
-rw-r--r--src/interfaces/jdbc/example/basic.java12
-rw-r--r--src/interfaces/jdbc/example/blobtest.java4
-rw-r--r--src/interfaces/jdbc/example/corba/StockClient.java4
-rw-r--r--src/interfaces/jdbc/example/corba/StockDB.java4
-rw-r--r--src/interfaces/jdbc/example/corba/StockDispenserImpl.java10
-rw-r--r--src/interfaces/jdbc/example/corba/StockItemImpl.java26
-rw-r--r--src/interfaces/jdbc/example/corba/StockServer.java4
-rw-r--r--src/interfaces/jdbc/example/datestyle.java12
-rw-r--r--src/interfaces/jdbc/example/metadata.java20
-rw-r--r--src/interfaces/jdbc/example/psql.java12
-rw-r--r--src/interfaces/jdbc/example/threadsafe.java10
-rw-r--r--src/interfaces/jdbc/utils/CheckVersion.java6
14 files changed, 82 insertions, 82 deletions
diff --git a/src/interfaces/jdbc/example/ImageViewer.java b/src/interfaces/jdbc/example/ImageViewer.java
index 6097439bab3..9540bfa67ed 100644
--- a/src/interfaces/jdbc/example/ImageViewer.java
+++ b/src/interfaces/jdbc/example/ImageViewer.java
@@ -6,7 +6,7 @@ import java.io.*;
import java.sql.*;
import org.postgresql.largeobject.*;
-/**
+/*
* This example is a small application that stores and displays images
* held on a postgresql database.
*
@@ -81,7 +81,7 @@ public class ImageViewer implements ItemListener
paint(g);
}
- /**
+ /*
* Paints the image, using double buffering to prevent screen flicker
*/
public void paint(Graphics gr)
@@ -212,7 +212,7 @@ public class ImageViewer implements ItemListener
}
- /**
+ /*
* This method initialises the database by creating a table that contains
* the image names, and Large Object OID's
*/
@@ -238,7 +238,7 @@ public class ImageViewer implements ItemListener
//}
}
- /**
+ /*
* This closes the connection, and ends the application
*/
public void close()
@@ -254,7 +254,7 @@ public class ImageViewer implements ItemListener
System.exit(0);
}
- /**
+ /*
* This imports an image into the database, using a Thread to do this in the
* background.
*/
@@ -272,7 +272,7 @@ public class ImageViewer implements ItemListener
t.start();
}
- /**
+ /*
* This is an example of using a thread to import a file into a Large Object.
* It uses the Large Object extension, to write blocks of the file to the
* database.
@@ -362,7 +362,7 @@ public class ImageViewer implements ItemListener
}
}
- /**
+ /*
* This refreshes the list of available images
*/
public void refreshList()
@@ -385,7 +385,7 @@ public class ImageViewer implements ItemListener
}
}
- /**
+ /*
* This removes an image from the database
*
* Note: With postgresql, this is the only way of deleting a large object
@@ -427,7 +427,7 @@ public class ImageViewer implements ItemListener
}
}
- /**
+ /*
* This displays an image from the database.
*
* For images, this is the easiest method.
@@ -476,7 +476,7 @@ public class ImageViewer implements ItemListener
displayImage(list.getItem(((Integer)e.getItem()).intValue()));
}
- /**
+ /*
* This is the command line instructions
*/
public static void instructions()
@@ -489,7 +489,7 @@ public class ImageViewer implements ItemListener
System.err.println("Note: If you are running this for the first time on a particular database,\nyou have to select \"Initialise\" in the \"PostgreSQL\" menu.\nThis will create a table used to store image names.");
}
- /**
+ /*
* This is the application entry point
*/
public static void main(String args[])
diff --git a/src/interfaces/jdbc/example/Unicode.java b/src/interfaces/jdbc/example/Unicode.java
index f5e56522f50..0d84c719a50 100644
--- a/src/interfaces/jdbc/example/Unicode.java
+++ b/src/interfaces/jdbc/example/Unicode.java
@@ -4,7 +4,7 @@ import java.io.*;
import java.sql.*;
import java.util.*;
-/**
+/*
* Test inserting and extracting Unicode-encoded strings.
*
* Synopsis:
@@ -22,17 +22,17 @@ import java.util.*;
public class Unicode
{
- /**
+ /*
* The url for the database to connect to.
*/
private String url;
- /**
+ /*
* The user to connect as.
*/
private String user;
- /**
+ /*
* The password to connect with.
*/
private String password;
@@ -61,7 +61,7 @@ public class Unicode
this.password = password;
}
- /**
+ /*
* Establish and return a connection to the database.
*/
private Connection getConnection() throws SQLException,
@@ -75,7 +75,7 @@ public class Unicode
return DriverManager.getConnection(url, info);
}
- /**
+ /*
* Get string representing a block of 256 consecutive unicode characters.
* We exclude the null character, "'", and "\".
*/
@@ -97,7 +97,7 @@ public class Unicode
return sb.toString();
}
- /**
+ /*
* Is the block a block of valid unicode values.
* d800 to db7f is the "unassigned high surrogate" range.
* db80 to dbff is the "private use" range.
@@ -112,7 +112,7 @@ public class Unicode
return true;
}
- /**
+ /*
* Report incorrect block retrieval.
*/
private void reportRetrievalError(int blockNum, String block,
@@ -142,7 +142,7 @@ public class Unicode
log(message);
}
- /**
+ /*
* Do the testing.
*/
public void runTest()
diff --git a/src/interfaces/jdbc/example/basic.java b/src/interfaces/jdbc/example/basic.java
index 8dd7d7baf75..61b35abc459 100644
--- a/src/interfaces/jdbc/example/basic.java
+++ b/src/interfaces/jdbc/example/basic.java
@@ -4,9 +4,9 @@ import java.io.*;
import java.sql.*;
import java.text.*;
-/**
+/*
*
- * $Id: basic.java,v 1.8 2001/10/25 05:59:58 momjian Exp $
+ * $Id: basic.java,v 1.9 2001/11/19 22:43:13 momjian Exp $
*
* This example tests the basic components of the JDBC driver, and shows
* how even the simplest of queries can be implemented.
@@ -56,7 +56,7 @@ public class basic
//throw postgresql.Driver.notImplemented();
}
- /**
+ /*
* This drops the table (if it existed). No errors are reported.
*/
public void cleanup()
@@ -71,7 +71,7 @@ public class basic
}
}
- /**
+ /*
* This performs the example
*/
public void doexample() throws SQLException
@@ -178,7 +178,7 @@ public class basic
// cleanup() method.
}
- /**
+ /*
* Display some instructions on how to run the example
*/
public static void instructions()
@@ -188,7 +188,7 @@ public class basic
System.exit(1);
}
- /**
+ /*
* This little lot starts the test
*/
public static void main(String args[])
diff --git a/src/interfaces/jdbc/example/blobtest.java b/src/interfaces/jdbc/example/blobtest.java
index 654eaf92acd..bfa0cc42959 100644
--- a/src/interfaces/jdbc/example/blobtest.java
+++ b/src/interfaces/jdbc/example/blobtest.java
@@ -4,7 +4,7 @@ import java.io.*;
import java.sql.*;
import org.postgresql.largeobject.*;
-/**
+/*
* This test attempts to create a blob in the database, then to read
* it back.
*
@@ -64,7 +64,7 @@ public class blobtest
}
- /**
+ /*
* Now this is an extension to JDBC, unique to postgresql. Here we fetch
* an PGlobj object, which provides us with access to postgresql's
* large object api.
diff --git a/src/interfaces/jdbc/example/corba/StockClient.java b/src/interfaces/jdbc/example/corba/StockClient.java
index 0a357b15caf..3ccb28c7fd8 100644
--- a/src/interfaces/jdbc/example/corba/StockClient.java
+++ b/src/interfaces/jdbc/example/corba/StockClient.java
@@ -4,12 +4,12 @@ import java.io.*;
import java.sql.*;
import org.omg.CosNaming.*;
-/**
+/*
* This class is the frontend to our mini CORBA application.
*
* It has no GUI, just a text frontend to keep it simple.
*
- * $Id: StockClient.java,v 1.2 2001/10/25 05:59:58 momjian Exp $
+ * $Id: StockClient.java,v 1.3 2001/11/19 22:43:13 momjian Exp $
*/
public class StockClient
{
diff --git a/src/interfaces/jdbc/example/corba/StockDB.java b/src/interfaces/jdbc/example/corba/StockDB.java
index 88797902ddb..47144983cda 100644
--- a/src/interfaces/jdbc/example/corba/StockDB.java
+++ b/src/interfaces/jdbc/example/corba/StockDB.java
@@ -2,7 +2,7 @@ package example.corba;
import java.sql.*;
-/**
+/*
* This class handles the JDBC side of things. It opens a connection to
* the database, and performes queries on that database.
*
@@ -13,7 +13,7 @@ import java.sql.*;
* that an object could be changed by another client, and we need to ensure that
* the returned data is live and accurate.
*
- * $Id: StockDB.java,v 1.3 2001/10/25 05:59:58 momjian Exp $
+ * $Id: StockDB.java,v 1.4 2001/11/19 22:43:13 momjian Exp $
*/
public class StockDB
{
diff --git a/src/interfaces/jdbc/example/corba/StockDispenserImpl.java b/src/interfaces/jdbc/example/corba/StockDispenserImpl.java
index 9572d20ae7f..54e46181339 100644
--- a/src/interfaces/jdbc/example/corba/StockDispenserImpl.java
+++ b/src/interfaces/jdbc/example/corba/StockDispenserImpl.java
@@ -2,10 +2,10 @@ package example.corba;
import org.omg.CosNaming.*;
-/**
+/*
* This class implements the server side of the example.
*
- * $Id: StockDispenserImpl.java,v 1.2 2001/10/25 05:59:58 momjian Exp $
+ * $Id: StockDispenserImpl.java,v 1.3 2001/11/19 22:43:13 momjian Exp $
*/
public class StockDispenserImpl extends stock._StockDispenserImplBase
{
@@ -39,7 +39,7 @@ public class StockDispenserImpl extends stock._StockDispenserImplBase
}
}
- /**
+ /*
* This method, defined in stock.idl, reserves a slot in the dispenser
*/
public stock.StockItem reserveItem() throws stock.StockException
@@ -56,7 +56,7 @@ public class StockDispenserImpl extends stock._StockDispenserImplBase
return null;
}
- /**
+ /*
* This releases a slot from the dispenser
*/
public void releaseItem(stock.StockItem item) throws stock.StockException
@@ -74,7 +74,7 @@ public class StockDispenserImpl extends stock._StockDispenserImplBase
return ;
}
- /**
+ /*
* This class defines a slot in the dispenser
*/
class StockItemStatus
diff --git a/src/interfaces/jdbc/example/corba/StockItemImpl.java b/src/interfaces/jdbc/example/corba/StockItemImpl.java
index 598ccd2ddcb..f504ab8dfe7 100644
--- a/src/interfaces/jdbc/example/corba/StockItemImpl.java
+++ b/src/interfaces/jdbc/example/corba/StockItemImpl.java
@@ -2,10 +2,10 @@ package example.corba;
import org.omg.CosNaming.*;
-/**
+/*
* This class implements the server side of the example.
*
- * $Id: StockItemImpl.java,v 1.2 2001/10/25 05:59:58 momjian Exp $
+ * $Id: StockItemImpl.java,v 1.3 2001/11/19 22:43:13 momjian Exp $
*/
public class StockItemImpl extends stock._StockItemImplBase
{
@@ -28,7 +28,7 @@ public class StockItemImpl extends stock._StockItemImplBase
}
}
- /**
+ /*
* This is defined in stock.idl
*
* It sets the item to view
@@ -46,7 +46,7 @@ public class StockItemImpl extends stock._StockItemImplBase
}
- /**
+ /*
* This is defined in stock.idl
*
* It sets the item to view
@@ -63,7 +63,7 @@ public class StockItemImpl extends stock._StockItemImplBase
}
}
- /**
+ /*
* This is defined in stock.idl
*
* It returns the description of a Stock item
@@ -80,7 +80,7 @@ public class StockItemImpl extends stock._StockItemImplBase
}
}
- /**
+ /*
* This is defined in stock.idl
*
* It returns the description of a Stock item
@@ -97,7 +97,7 @@ public class StockItemImpl extends stock._StockItemImplBase
}
}
- /**
+ /*
* This is defined in stock.idl
*
* It returns the description of a Stock item
@@ -114,7 +114,7 @@ public class StockItemImpl extends stock._StockItemImplBase
}
}
- /**
+ /*
* This is defined in stock.idl
*
* It returns the description of a Stock item
@@ -131,7 +131,7 @@ public class StockItemImpl extends stock._StockItemImplBase
}
}
- /**
+ /*
* This is defined in stock.idl
*
* It returns the description of a Stock item
@@ -148,7 +148,7 @@ public class StockItemImpl extends stock._StockItemImplBase
}
}
- /**
+ /*
* This is defined in stock.idl
*
* It returns the description of a Stock item
@@ -165,7 +165,7 @@ public class StockItemImpl extends stock._StockItemImplBase
}
}
- /**
+ /*
* This is defined in stock.idl
*
* It returns the description of a Stock item
@@ -182,7 +182,7 @@ public class StockItemImpl extends stock._StockItemImplBase
}
}
- /**
+ /*
* This returns the highest id used, hence the number of items available
*/
public int getLastID() throws stock.StockException
@@ -197,7 +197,7 @@ public class StockItemImpl extends stock._StockItemImplBase
}
}
- /**
+ /*
* This is used by our Dispenser
*/
public String getInstanceName()
diff --git a/src/interfaces/jdbc/example/corba/StockServer.java b/src/interfaces/jdbc/example/corba/StockServer.java
index 43465a944e8..77d8946389b 100644
--- a/src/interfaces/jdbc/example/corba/StockServer.java
+++ b/src/interfaces/jdbc/example/corba/StockServer.java
@@ -2,10 +2,10 @@ package example.corba;
import org.omg.CosNaming.*;
-/**
+/*
* This class implements the server side of the example.
*
- * $Id: StockServer.java,v 1.2 2001/10/25 05:59:58 momjian Exp $
+ * $Id: StockServer.java,v 1.3 2001/11/19 22:43:13 momjian Exp $
*/
public class StockServer
{
diff --git a/src/interfaces/jdbc/example/datestyle.java b/src/interfaces/jdbc/example/datestyle.java
index 53908c8c2fa..6e503552b70 100644
--- a/src/interfaces/jdbc/example/datestyle.java
+++ b/src/interfaces/jdbc/example/datestyle.java
@@ -4,7 +4,7 @@ import java.io.*;
import java.sql.*;
import java.text.*;
-/**
+/*
* This example tests the various date styles that are available to postgresql.
*
* To use this example, you need a database to be in existence. This example
@@ -64,7 +64,7 @@ public class datestyle
}
- /**
+ /*
* This drops the table (if it existed). No errors are reported.
*/
public void cleanup()
@@ -79,7 +79,7 @@ public class datestyle
}
}
- /**
+ /*
* This initialises the database for this example
*/
public void init() throws SQLException
@@ -108,7 +108,7 @@ public class datestyle
}
- /**
+ /*
* This performs the example
*/
public void doexample() throws SQLException
@@ -150,7 +150,7 @@ public class datestyle
}
}
- /**
+ /*
* Display some instructions on how to run the example
*/
public static void instructions()
@@ -160,7 +160,7 @@ public class datestyle
System.exit(1);
}
- /**
+ /*
* This little lot starts the test
*/
public static void main(String args[])
diff --git a/src/interfaces/jdbc/example/metadata.java b/src/interfaces/jdbc/example/metadata.java
index 182e4533e0c..6cd2802456c 100644
--- a/src/interfaces/jdbc/example/metadata.java
+++ b/src/interfaces/jdbc/example/metadata.java
@@ -4,7 +4,7 @@ import java.io.*;
import java.sql.*;
import java.text.*;
-/**
+/*
* This example application is not really an example. It actually performs
* some tests on various methods in the DatabaseMetaData and ResultSetMetaData
* classes.
@@ -19,7 +19,7 @@ public class metadata
Statement st; // Our statement to run queries with
DatabaseMetaData dbmd; // This defines the structure of the database
- /**
+ /*
* These are the available tests on DatabaseMetaData
*/
public void doDatabaseMetaData() throws SQLException
@@ -53,7 +53,7 @@ public class metadata
}
- /**
+ /*
* These are the available tests on ResultSetMetaData
*/
public void doResultSetMetaData() throws SQLException
@@ -81,7 +81,7 @@ public class metadata
rs.close();
}
- /**
+ /*
* This creates some test data
*/
public void init() throws SQLException
@@ -98,7 +98,7 @@ public class metadata
st.executeUpdate("insert into test_c values ('nowhere particular','$10.99',1)");
}
- /**
+ /*
* This removes the test data
*/
public void cleanup() throws SQLException
@@ -152,7 +152,7 @@ public class metadata
cleanup();
}
- /**
+ /*
* This asks if the user requires to run a test.
*/
public boolean doTest(String s)
@@ -177,7 +177,7 @@ public class metadata
return c == 'y' || c == 'Y';
}
- /**
+ /*
* This displays a result set.
* Note: it closes the result once complete.
*/
@@ -211,7 +211,7 @@ public class metadata
rs.close();
}
- /**
+ /*
* This process / commands (for now just /d)
*/
public void processSlashCommand(String line) throws SQLException
@@ -259,7 +259,7 @@ public class metadata
private static final String usrSequences[] = {"SEQUENCE"};
private static final String sysTables[] = {"SYSTEM TABLE", "SYSTEM INDEX"};
- /**
+ /*
* Display some instructions on how to run the example
*/
public static void instructions()
@@ -269,7 +269,7 @@ public class metadata
System.exit(1);
}
- /**
+ /*
* This little lot starts the test
*/
public static void main(String args[])
diff --git a/src/interfaces/jdbc/example/psql.java b/src/interfaces/jdbc/example/psql.java
index b3fd308cd7b..697198ce3a6 100644
--- a/src/interfaces/jdbc/example/psql.java
+++ b/src/interfaces/jdbc/example/psql.java
@@ -4,7 +4,7 @@ import java.io.*;
import java.sql.*;
import java.text.*;
-/**
+/*
* This example application demonstrates some of the drivers other features
* by implementing a simple psql replacement in Java.
*
@@ -75,7 +75,7 @@ public class psql
}
- /**
+ /*
* This processes a statement
*/
public void processLine(String line) throws SQLException
@@ -117,7 +117,7 @@ public class psql
}
}
- /**
+ /*
* This displays a result set.
* Note: it closes the result once complete.
*/
@@ -147,7 +147,7 @@ public class psql
rs.close();
}
- /**
+ /*
* This process / commands (for now just /d)
*/
public void processSlashCommand(String line) throws SQLException
@@ -197,7 +197,7 @@ public class psql
private static final String usrSequences[] = {"SEQUENCE"};
private static final String sysTables[] = {"SYSTEM TABLE", "SYSTEM INDEX"};
- /**
+ /*
* Display some instructions on how to run the example
*/
public static void instructions()
@@ -207,7 +207,7 @@ public class psql
System.exit(1);
}
- /**
+ /*
* This little lot starts the test
*/
public static void main(String args[])
diff --git a/src/interfaces/jdbc/example/threadsafe.java b/src/interfaces/jdbc/example/threadsafe.java
index 2931221f181..ceb1ef8f6f5 100644
--- a/src/interfaces/jdbc/example/threadsafe.java
+++ b/src/interfaces/jdbc/example/threadsafe.java
@@ -7,7 +7,7 @@ import java.text.*;
// rare in user code, but we use the LargeObject API in this test
import org.postgresql.largeobject.*;
-/**
+/*
* This example tests the thread safety of the driver.
*
* It does this by performing several queries, in different threads. Each
@@ -56,7 +56,7 @@ public class threadsafe
}
- /**
+ /*
* This drops the table (if it existed). No errors are reported.
*/
public void cleanup()
@@ -80,7 +80,7 @@ public class threadsafe
}
}
- /**
+ /*
* This performs the example
*/
public void doexample() throws SQLException
@@ -366,7 +366,7 @@ public class threadsafe
}
}
- /**
+ /*
* Display some instructions on how to run the example
*/
public static void instructions()
@@ -376,7 +376,7 @@ public class threadsafe
System.exit(1);
}
- /**
+ /*
* This little lot starts the test
*/
public static void main(String args[])
diff --git a/src/interfaces/jdbc/utils/CheckVersion.java b/src/interfaces/jdbc/utils/CheckVersion.java
index 74c40813cdb..a2438cd4f9f 100644
--- a/src/interfaces/jdbc/utils/CheckVersion.java
+++ b/src/interfaces/jdbc/utils/CheckVersion.java
@@ -1,13 +1,13 @@
package utils;
-/**
+/*
* This little app checks to see what version of JVM is being used.
* It does this by checking first the java.vm.version property, and
* if that fails, it looks for certain classes that should be present.
*/
public class CheckVersion
{
- /**
+ /*
* Check for the existence of a class by attempting to load it
*/
public static boolean checkClass(String c)
@@ -23,7 +23,7 @@ public class CheckVersion
return true;
}
- /**
+ /*
* This first checks java.vm.version for 1.1, 1.2 or 1.3.
*
* It writes jdbc1 to stdout for the 1.1.x VM.