Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6c8120d

Browse files
committed
More jdbc comment cleanups. Code looks very nice now.
1 parent46d5078 commit6c8120d

14 files changed

+82
-82
lines changed

‎src/interfaces/jdbc/example/ImageViewer.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
importjava.sql.*;
77
importorg.postgresql.largeobject.*;
88

9-
/**
9+
/*
1010
* This example is a small application that stores and displays images
1111
* held on a postgresql database.
1212
*
@@ -81,7 +81,7 @@ public void update(Graphics g)
8181
paint(g);
8282
}
8383

84-
/**
84+
/*
8585
* Paints the image, using double buffering to prevent screen flicker
8686
*/
8787
publicvoidpaint(Graphicsgr)
@@ -212,7 +212,7 @@ public void actionPerformed(ActionEvent e)
212212
}
213213

214214

215-
/**
215+
/*
216216
* This method initialises the database by creating a table that contains
217217
* the image names, and Large Object OID's
218218
*/
@@ -238,7 +238,7 @@ public void init()
238238
//}
239239
}
240240

241-
/**
241+
/*
242242
* This closes the connection, and ends the application
243243
*/
244244
publicvoidclose()
@@ -254,7 +254,7 @@ public void close()
254254
System.exit(0);
255255
}
256256

257-
/**
257+
/*
258258
* This imports an image into the database, using a Thread to do this in the
259259
* background.
260260
*/
@@ -272,7 +272,7 @@ public void importImage()
272272
t.start();
273273
}
274274

275-
/**
275+
/*
276276
* This is an example of using a thread to import a file into a Large Object.
277277
* It uses the Large Object extension, to write blocks of the file to the
278278
* database.
@@ -362,7 +362,7 @@ public void run()
362362
}
363363
}
364364

365-
/**
365+
/*
366366
* This refreshes the list of available images
367367
*/
368368
publicvoidrefreshList()
@@ -385,7 +385,7 @@ public void refreshList()
385385
}
386386
}
387387

388-
/**
388+
/*
389389
* This removes an image from the database
390390
*
391391
* Note: With postgresql, this is the only way of deleting a large object
@@ -427,7 +427,7 @@ public void removeImage()
427427
}
428428
}
429429

430-
/**
430+
/*
431431
* This displays an image from the database.
432432
*
433433
* For images, this is the easiest method.
@@ -476,7 +476,7 @@ public void itemStateChanged(ItemEvent e)
476476
displayImage(list.getItem(((Integer)e.getItem()).intValue()));
477477
}
478478

479-
/**
479+
/*
480480
* This is the command line instructions
481481
*/
482482
publicstaticvoidinstructions()
@@ -489,7 +489,7 @@ public static void instructions()
489489
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.");
490490
}
491491

492-
/**
492+
/*
493493
* This is the application entry point
494494
*/
495495
publicstaticvoidmain(Stringargs[])

‎src/interfaces/jdbc/example/Unicode.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
importjava.sql.*;
55
importjava.util.*;
66

7-
/**
7+
/*
88
*Test inserting and extracting Unicode-encoded strings.
99
*
1010
*Synopsis:
@@ -22,17 +22,17 @@
2222
publicclassUnicode
2323
{
2424

25-
/**
25+
/*
2626
*The url for the database to connect to.
2727
*/
2828
privateStringurl;
2929

30-
/**
30+
/*
3131
*The user to connect as.
3232
*/
3333
privateStringuser;
3434

35-
/**
35+
/*
3636
*The password to connect with.
3737
*/
3838
privateStringpassword;
@@ -61,7 +61,7 @@ public Unicode(String url, String user, String password)
6161
this.password =password;
6262
}
6363

64-
/**
64+
/*
6565
*Establish and return a connection to the database.
6666
*/
6767
privateConnectiongetConnection()throwsSQLException,
@@ -75,7 +75,7 @@ private Connection getConnection() throws SQLException,
7575
returnDriverManager.getConnection(url,info);
7676
}
7777

78-
/**
78+
/*
7979
*Get string representing a block of 256 consecutive unicode characters.
8080
*We exclude the null character, "'", and "\".
8181
*/
@@ -97,7 +97,7 @@ private String getSqlSafeUnicodeBlock(int blockNum)
9797
returnsb.toString();
9898
}
9999

100-
/**
100+
/*
101101
*Is the block a block of valid unicode values.
102102
*d800 to db7f is the "unassigned high surrogate" range.
103103
*db80 to dbff is the "private use" range.
@@ -112,7 +112,7 @@ private boolean isValidUnicodeBlock(int blockNum)
112112
returntrue;
113113
}
114114

115-
/**
115+
/*
116116
*Report incorrect block retrieval.
117117
*/
118118
privatevoidreportRetrievalError(intblockNum,Stringblock,
@@ -142,7 +142,7 @@ else if (retrieved.charAt(i) != block.charAt(i))
142142
log(message);
143143
}
144144

145-
/**
145+
/*
146146
*Do the testing.
147147
*/
148148
publicvoidrunTest()

‎src/interfaces/jdbc/example/basic.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
importjava.sql.*;
55
importjava.text.*;
66

7-
/**
7+
/*
88
*
9-
* $Id: basic.java,v 1.8 2001/10/25 05:59:58 momjian Exp $
9+
* $Id: basic.java,v 1.9 2001/11/19 22:43:13 momjian Exp $
1010
*
1111
* This example tests the basic components of the JDBC driver, and shows
1212
* how even the simplest of queries can be implemented.
@@ -56,7 +56,7 @@ public basic(String args[]) throws ClassNotFoundException, FileNotFoundException
5656
//throw postgresql.Driver.notImplemented();
5757
}
5858

59-
/**
59+
/*
6060
* This drops the table (if it existed). No errors are reported.
6161
*/
6262
publicvoidcleanup()
@@ -71,7 +71,7 @@ public void cleanup()
7171
}
7272
}
7373

74-
/**
74+
/*
7575
* This performs the example
7676
*/
7777
publicvoiddoexample()throwsSQLException
@@ -178,7 +178,7 @@ public void doexample() throws SQLException
178178
// cleanup() method.
179179
}
180180

181-
/**
181+
/*
182182
* Display some instructions on how to run the example
183183
*/
184184
publicstaticvoidinstructions()
@@ -188,7 +188,7 @@ public static void instructions()
188188
System.exit(1);
189189
}
190190

191-
/**
191+
/*
192192
* This little lot starts the test
193193
*/
194194
publicstaticvoidmain(Stringargs[])

‎src/interfaces/jdbc/example/blobtest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
importjava.sql.*;
55
importorg.postgresql.largeobject.*;
66

7-
/**
7+
/*
88
* This test attempts to create a blob in the database, then to read
99
* it back.
1010
*
@@ -64,7 +64,7 @@ public blobtest(String args[]) throws ClassNotFoundException, FileNotFoundExcept
6464

6565
}
6666

67-
/**
67+
/*
6868
* Now this is an extension to JDBC, unique to postgresql. Here we fetch
6969
* an PGlobj object, which provides us with access to postgresql's
7070
* large object api.

‎src/interfaces/jdbc/example/corba/StockClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
importjava.sql.*;
55
importorg.omg.CosNaming.*;
66

7-
/**
7+
/*
88
* This class is the frontend to our mini CORBA application.
99
*
1010
* It has no GUI, just a text frontend to keep it simple.
1111
*
12-
* $Id: StockClient.java,v 1.2 2001/10/25 05:59:58 momjian Exp $
12+
* $Id: StockClient.java,v 1.3 2001/11/19 22:43:13 momjian Exp $
1313
*/
1414
publicclassStockClient
1515
{

‎src/interfaces/jdbc/example/corba/StockDB.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
importjava.sql.*;
44

5-
/**
5+
/*
66
* This class handles the JDBC side of things. It opens a connection to
77
* the database, and performes queries on that database.
88
*
@@ -13,7 +13,7 @@
1313
* that an object could be changed by another client, and we need to ensure that
1414
* the returned data is live and accurate.
1515
*
16-
* $Id: StockDB.java,v 1.3 2001/10/25 05:59:58 momjian Exp $
16+
* $Id: StockDB.java,v 1.4 2001/11/19 22:43:13 momjian Exp $
1717
*/
1818
publicclassStockDB
1919
{

‎src/interfaces/jdbc/example/corba/StockDispenserImpl.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
importorg.omg.CosNaming.*;
44

5-
/**
5+
/*
66
* This class implements the server side of the example.
77
*
8-
* $Id: StockDispenserImpl.java,v 1.2 2001/10/25 05:59:58 momjian Exp $
8+
* $Id: StockDispenserImpl.java,v 1.3 2001/11/19 22:43:13 momjian Exp $
99
*/
1010
publicclassStockDispenserImplextendsstock._StockDispenserImplBase
1111
{
@@ -39,7 +39,7 @@ public StockDispenserImpl(String[] args, String name, int num)
3939
}
4040
}
4141

42-
/**
42+
/*
4343
* This method, defined in stock.idl, reserves a slot in the dispenser
4444
*/
4545
publicstock.StockItemreserveItem()throwsstock.StockException
@@ -56,7 +56,7 @@ public stock.StockItem reserveItem() throws stock.StockException
5656
returnnull;
5757
}
5858

59-
/**
59+
/*
6060
* This releases a slot from the dispenser
6161
*/
6262
publicvoidreleaseItem(stock.StockItemitem)throwsstock.StockException
@@ -74,7 +74,7 @@ public void releaseItem(stock.StockItem item) throws stock.StockException
7474
return ;
7575
}
7676

77-
/**
77+
/*
7878
* This class defines a slot in the dispenser
7979
*/
8080
classStockItemStatus

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp