Skip to content

Commit 42f9767

Browse files
committed
Fixed javadoc for ResultSet enums
Added jacadocs to the ResultSetConcurrency and ResultSetType to better explain what it does.
1 parent 87c9edd commit 42f9767

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

Database/src/main/java/org/broken/arrow/library/database/utility/resulttype/ResultSetConcurrency.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,20 @@
22

33
import java.sql.ResultSet;
44

5+
/**
6+
* Enum representing the concurrency mode of a JDBC ResultSet.
7+
*
8+
* <p>Maps directly to {@link java.sql.ResultSet} concurrency constants.</p>
9+
*/
510
public enum ResultSetConcurrency {
611

12+
/**
13+
* Read-only ResultSet; changes are not allowed.
14+
*/
715
CONCUR_READ_ONLY(ResultSet.CONCUR_READ_ONLY),
16+
/**
17+
* Updatable ResultSet; changes can be made to the underlying database.
18+
*/
819
CONCUR_UPDATABLE(ResultSet.CONCUR_UPDATABLE);
920

1021
private final int type;
@@ -13,6 +24,11 @@ public enum ResultSetConcurrency {
1324
this.type = type;
1425
}
1526

27+
/**
28+
* Returns the JDBC integer constant representing this concurrency mode.
29+
*
30+
* @return the JDBC ResultSet concurrency constant
31+
*/
1632
public int getType() {
1733
return type;
1834
}

Database/src/main/java/org/broken/arrow/library/database/utility/resulttype/ResultSetType.java

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,38 @@
22

33
import java.sql.ResultSet;
44

5+
/**
6+
* Enum representing the type of JDBC ResultSet cursor.
7+
*
8+
* <p>Maps directly to {@link java.sql.ResultSet} type constants.</p>
9+
*/
510
public enum ResultSetType {
6-
11+
/**
12+
* The cursor can only move forward through the ResultSet.
13+
*/
714
TYPE_FORWARD_ONLY(ResultSet.TYPE_FORWARD_ONLY),
15+
/**
16+
* The cursor can scroll, but changes made by others are not visible.
17+
*/
818
TYPE_SCROLL_INSENSITIVE(ResultSet.TYPE_SCROLL_INSENSITIVE),
19+
/**
20+
* The cursor can scroll, and changes made by others are visible.
21+
*/
922
TYPE_SCROLL_SENSITIVE(ResultSet.TYPE_SCROLL_SENSITIVE);
1023
private final int type;
1124

1225
ResultSetType(final int type) {
1326
this.type = type;
1427
}
1528

29+
/**
30+
* Returns the JDBC integer constant representing this ResultSet cursor type.
31+
*
32+
* <p>This determines how the cursor can move through the ResultSet:
33+
* forward-only, scroll-insensitive, or scroll-sensitive.</p>
34+
*
35+
* @return the JDBC ResultSet type constant
36+
*/
1637
public int getType() {
1738
return type;
1839
}

0 commit comments

Comments
 (0)