Skip to content

Commit 7181a32

Browse files
committed
8.0.5 (2023-03-28)
+ Improved BasicDAOHelper debugging
1 parent beb6a60 commit 7181a32

File tree

9 files changed

+29
-21
lines changed

9 files changed

+29
-21
lines changed

docgen/parameters.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"title" : "Jupiter (Fugerit Core A.P.I.)",
33
"name": "Jupiter",
4-
"version" : "8.0.4",
5-
"date" : "26/03/2023",
4+
"version" : "8.0.5",
5+
"date" : "28/03/2023",
66
"organization" : {
77
"name" : "Fugerit Org",
88
"url" : "https://www.fugerit.org"

docgen/release-notes.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
8.0.4 (2023-03-26)
1+
8.0.5 (2023-03-28)
2+
------------------
3+
+ Improved BasicDAOHelper debugging
4+
5+
8.0.4 (2023-03-26)
26
------------------
37
+ changed fj-bom version to 1.0.0
48
+ [As for the new parent version, building should be done using java11+](https://github.com/fugerit-org/fj-bom/issues/11)

fj-core-jvfs/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>org.fugerit.java</groupId>
99
<artifactId>fj-lib</artifactId>
10-
<version>8.0.4</version>
10+
<version>8.0.5</version>
1111
</parent>
1212

1313
<name>fj-core-jvfs</name>

fj-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>org.fugerit.java</groupId>
99
<artifactId>fj-lib</artifactId>
10-
<version>8.0.4</version>
10+
<version>8.0.5</version>
1111
</parent>
1212

1313
<name>fj-core</name>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<html>
22
<body>
3-
Package containing classes and interfaces for configuration handling.
3+
Package containing classes, interfaces and exceptions for configuration handling.
44
</body>
55
</html>

fj-core/src/main/java/org/fugerit/java/core/db/dao/DAOHelper.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,24 @@
3131
import org.slf4j.Logger;
3232

3333
public class DAOHelper {
34-
35-
public static void setAll( PreparedStatement ps, FieldList fields, Logger logger ) throws SQLException {
36-
logger.debug( "Total Param Number : "+fields.size() );
34+
35+
public static void setAll( String queryId, PreparedStatement ps, FieldList fields, Logger log ) throws SQLException {
36+
log.debug( "queryId:'{}', setAll() Total Param Number : '{}'", queryId, fields.size() );
3737
int np = 0;
3838
int k = 0;
3939
while ( k<fields.size() ) {
4040
np++;
4141
int param = (k+1);
4242
Field f = fields.getField(k);
43-
logger.debug( "Setting param n. "+param+", value: "+String.valueOf( f )+"(fl.size:"+fields.size()+")" );
43+
log.debug( "queryId:'{}', setAll() Setting param : '{}'", queryId, "n. "+param+", value: "+String.valueOf( f )+"(fl.size:"+fields.size()+")" );
4444
f.setField(ps, param);
4545
k++;
46-
logger.debug( "test : "+(k<fields.size())+" k:"+k+" fields.size:"+fields.size() );
47-
}
48-
logger.debug( "Total param set : "+np );
46+
}
47+
log.debug( "queryId:'{}', setAll() Total param set : '{}'", queryId, np );
48+
}
49+
50+
public static void setAll( PreparedStatement ps, FieldList fields, Logger logger ) throws SQLException {
51+
setAll( "NO-QUERY-ID" , ps, fields, logger);
4952
}
5053

5154
public static void setAll( PreparedStatement ps, FieldList fields, LogObject log ) throws SQLException {

fj-core/src/main/java/org/fugerit/java/core/db/daogen/BasicDAOHelper.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,20 +88,21 @@ public void loadAllHelper( List<T> l, String query, FieldList fields, RSExtracto
8888
try {
8989
long startTime = System.currentTimeMillis();
9090
String queryId = this.createQueryId(startTime);
91-
log.debug( "queryId:{}, loadAll START list : '{}' ", queryId, l.size() );
92-
log.debug( "queryId:{}, loadAll fields : '{}'", queryId, fields.size() );
93-
log.debug( "queryId:{}, loadAll RSExtractor : '{}'", queryId, re);
91+
log.debug( "queryId:'{}', loadAll START list : '{}'", queryId, l.size() );
92+
log.debug( "queryId:'{}', loadAll sql : '{}'", queryId, query );
93+
log.debug( "queryId:'{}', loadAll fields : '{}'", queryId, fields.size() );
94+
log.debug( "queryId:'{}', loadAll RSExtractor : '{}'", queryId, re);
9495
Connection conn = this.daoContext.getConnection();
9596
int i=0;
9697
try ( PreparedStatement ps = conn.prepareStatement( query ) ) {
97-
DAOHelper.setAll( ps, fields , this );
98+
DAOHelper.setAll( queryId, ps, fields , log );
9899
try ( ResultSet rs = ps.executeQuery() ) {
99-
log.debug("queryId:{}, loadAll query execute end time : '{}'", queryId, CheckpointUtils.formatTimeDiff(startTime, System.currentTimeMillis()) );
100+
log.debug("queryId:'{}', loadAll query execute end time : '{}'", queryId, CheckpointUtils.formatTimeDiff(startTime, System.currentTimeMillis()) );
100101
while (rs.next()) {
101102
l.add( re.extractNext( rs ) );
102103
i++;
103104
}
104-
log.debug("queryId:{}, loadAll query result end time : '{}'", queryId, CheckpointUtils.formatTimeDiff(startTime, System.currentTimeMillis()) );
105+
log.debug("queryId:'{}', loadAll query result end time : '{}'", queryId, CheckpointUtils.formatTimeDiff(startTime, System.currentTimeMillis()) );
105106
}
106107
} catch (SQLException e) {
107108
throw (new DAOException( e.getMessage()+"[query:"+query+",record:"+i+"]", e ));

fj-tool/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>org.fugerit.java</groupId>
99
<artifactId>fj-lib</artifactId>
10-
<version>8.0.4</version>
10+
<version>8.0.5</version>
1111
</parent>
1212

1313
<name>fj-tool</name>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<relativePath></relativePath>
1212
</parent>
1313

14-
<version>8.0.4</version>
14+
<version>8.0.5</version>
1515
<packaging>pom</packaging>
1616

1717
<name>fj-lib</name>

0 commit comments

Comments
 (0)