Skip to content

Commit beb6a60

Browse files
committed
8.0.4 (2023-03-26)
+ changed fj-bom version to 1.0.0 + [As for the new parent version, building should be done using java11+](fugerit-org/fj-bom#11) + maven.compiler.release property set to '8' (so the project is still compatible with java8+) + Introduced project lombok
1 parent 47d6eb1 commit beb6a60

File tree

10 files changed

+140
-57
lines changed

10 files changed

+140
-57
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.3",
5-
"date" : "25/03/2023",
4+
"version" : "8.0.4",
5+
"date" : "26/03/2023",
66
"organization" : {
77
"name" : "Fugerit Org",
88
"url" : "https://www.fugerit.org"

docgen/release-notes.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
8.0.3 (2023-03-25)
1+
8.0.4 (2023-03-26)
2+
------------------
3+
+ changed fj-bom version to 1.0.0
4+
+ [As for the new parent version, building should be done using java11+](https://github.com/fugerit-org/fj-bom/issues/11)
5+
+ maven.compiler.release property set to '8' (so the project is still compatible with java8+)
6+
+ Introduced project lombok
7+
8+
8.0.3 (2023-03-25)
29
------------------
310
+ [j2ee dependant api deprecation](https://github.com/fugerit-org/fj-lib/issues/19)
411
+ changed fj-bom version to 0.2.3
@@ -8,6 +15,11 @@
815
------------------
916
+ [j2ee dependant api deprecation](https://github.com/fugerit-org/fj-lib/issues/19)
1017

18+
8.0.1 (2023-03-19)
19+
------------------
20+
+ [Moving github pages to main branch, documenting QueryHelper api](https://github.com/fugerit-org/fj-lib/issues/17)
21+
+ Extensions method to SelectHelper, and junit
22+
1123
8.0.0 (2023-03-18)
1224
------------------
1325
+ [Added config store facilities](https://github.com/fugerit-org/fj-lib/issues/14)

fj-core-jvfs/pom.xml

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
<parent>
88
<groupId>org.fugerit.java</groupId>
99
<artifactId>fj-lib</artifactId>
10-
<version>8.0.3</version>
10+
<version>8.0.4</version>
1111
</parent>
1212

1313
<name>fj-core-jvfs</name>
14-
<description>Fugerit Java Core Library for JDK 1.7 and up</description>
14+
<description>Fugerit Java Core Library for JDK 1.8 and up</description>
1515
<url>https://www.fugerit.org/perm/jupiter/</url>
1616

1717
<licenses>
@@ -29,7 +29,7 @@
2929
</organization>
3030

3131
<properties>
32-
<fj-daogen-version>0.4.5</fj-daogen-version>
32+
<fj-daogen-version>1.0.0</fj-daogen-version>
3333
</properties>
3434

3535
<build>
@@ -38,6 +38,11 @@
3838

3939
<dependencies>
4040

41+
<dependency>
42+
<groupId>org.slf4j</groupId>
43+
<artifactId>slf4j-api</artifactId>
44+
</dependency>
45+
4146
<dependency>
4247
<groupId>org.fugerit.java</groupId>
4348
<artifactId>fj-core</artifactId>
@@ -48,6 +53,22 @@
4853
<artifactId>commons-dbcp2</artifactId>
4954
</dependency>
5055

56+
<dependency>
57+
<groupId>org.apache.logging.log4j</groupId>
58+
<artifactId>log4j-api</artifactId>
59+
<scope>test</scope>
60+
</dependency>
61+
<dependency>
62+
<groupId>org.apache.logging.log4j</groupId>
63+
<artifactId>log4j-core</artifactId>
64+
<scope>test</scope>
65+
</dependency>
66+
<dependency>
67+
<groupId>org.apache.logging.log4j</groupId>
68+
<artifactId>log4j-slf4j2-impl</artifactId>
69+
<scope>test</scope>
70+
</dependency>
71+
5172
<dependency>
5273
<groupId>org.fugerit.java</groupId>
5374
<artifactId>fj-test-helper8</artifactId>
@@ -65,6 +86,12 @@
6586
<artifactId>fj-daogen-base</artifactId>
6687
<version>${fj-daogen-version}</version>
6788
<scope>test</scope>
89+
<exclusions>
90+
<exclusion>
91+
<groupId>*</groupId>
92+
<artifactId>*</artifactId>
93+
</exclusion>
94+
</exclusions>
6895
</dependency>
6996

7097
</dependencies>

fj-core/pom.xml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
<parent>
88
<groupId>org.fugerit.java</groupId>
99
<artifactId>fj-lib</artifactId>
10-
<version>8.0.3</version>
10+
<version>8.0.4</version>
1111
</parent>
1212

1313
<name>fj-core</name>
14-
<description>Fugerit Java Core Library for JDK 1.7 and up</description>
14+
<description>Fugerit Java Core Library for JDK 1.8 and up</description>
1515
<url>https://www.fugerit.org/perm/jupiter/</url>
1616

1717
<licenses>
@@ -34,6 +34,11 @@
3434

3535
<dependencies>
3636

37+
<dependency>
38+
<groupId>org.slf4j</groupId>
39+
<artifactId>slf4j-api</artifactId>
40+
</dependency>
41+
3742
<dependency>
3843
<groupId>javax.ws.rs</groupId>
3944
<artifactId>javax.ws.rs-api</artifactId>
@@ -44,6 +49,22 @@
4449
<groupId>org.apache.commons</groupId>
4550
<artifactId>commons-dbcp2</artifactId>
4651
</dependency>
52+
53+
<dependency>
54+
<groupId>org.apache.logging.log4j</groupId>
55+
<artifactId>log4j-api</artifactId>
56+
<scope>test</scope>
57+
</dependency>
58+
<dependency>
59+
<groupId>org.apache.logging.log4j</groupId>
60+
<artifactId>log4j-core</artifactId>
61+
<scope>test</scope>
62+
</dependency>
63+
<dependency>
64+
<groupId>org.apache.logging.log4j</groupId>
65+
<artifactId>log4j-slf4j2-impl</artifactId>
66+
<scope>test</scope>
67+
</dependency>
4768

4869
<dependency>
4970
<groupId>org.fugerit.java</groupId>

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

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@
1717
import org.fugerit.java.core.db.dao.RSExtractor;
1818
import org.fugerit.java.core.lang.helpers.StringUtils;
1919
import org.fugerit.java.core.log.LogObject;
20+
import org.fugerit.java.core.util.checkpoint.CheckpointUtils;
2021
import org.slf4j.Logger;
21-
import org.slf4j.LoggerFactory;
22+
23+
import lombok.extern.slf4j.Slf4j;
2224

2325
/**
2426
*
@@ -27,13 +29,12 @@
2729
*
2830
* @param <T> the type returned by this DAOHelper
2931
*/
32+
@Slf4j
3033
public class BasicDAOHelper<T> implements Serializable, LogObject {
31-
32-
protected static Logger logger = LoggerFactory.getLogger( BasicDAOHelper.class );
3334

3435
@Override
3536
public Logger getLogger() {
36-
return logger;
37+
return log;
3738
}
3839

3940
/**
@@ -79,39 +80,45 @@ public void loadAllHelper( List<T> l, SelectHelper query, RSExtractor<T> re ) th
7980
this.loadAllHelper( l, query.getQueryContent(), query.getFields(), re );
8081
}
8182

83+
protected String createQueryId( long startTime ) {
84+
return String.format( "%s_%s", Thread.currentThread().getId(), startTime );
85+
}
8286

8387
public void loadAllHelper( List<T> l, String query, FieldList fields, RSExtractor<T> re ) throws DAOException {
8488
try {
85-
logger.debug( "loadAll START list : '{}' ", l.size() );
86-
logger.debug( "loadAll fields : '{}'", fields.size() );
87-
logger.debug( "loadAll RSExtractor : '{}'", re);
89+
long startTime = System.currentTimeMillis();
90+
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);
8894
Connection conn = this.daoContext.getConnection();
8995
int i=0;
9096
try ( PreparedStatement ps = conn.prepareStatement( query ) ) {
9197
DAOHelper.setAll( ps, fields , this );
9298
try ( ResultSet rs = ps.executeQuery() ) {
99+
log.debug("queryId:{}, loadAll query execute end time : '{}'", queryId, CheckpointUtils.formatTimeDiff(startTime, System.currentTimeMillis()) );
93100
while (rs.next()) {
94101
l.add( re.extractNext( rs ) );
95102
i++;
96103
}
104+
log.debug("queryId:{}, loadAll query result end time : '{}'", queryId, CheckpointUtils.formatTimeDiff(startTime, System.currentTimeMillis()) );
97105
}
98106
} catch (SQLException e) {
99107
throw (new DAOException( e.getMessage()+"[query:"+query+",record:"+i+"]", e ));
100108
}
101-
logger.debug("loadAll END list : '{}'", l.size());
109+
log.debug("queryId:{}, loadAll END list : '{}'", queryId, l.size());
102110
} catch (DAOException e) {
103111
throw new DAOException( e );
104112
}
105113
}
106114

107-
108115
public int update( QueryHelper queryHelper ) throws DAOException {
109116
int res = 0;
110117
try {
111118
String query = queryHelper.getQueryContent();
112119
FieldList fields = queryHelper.getFields();
113-
logger.debug( "update START list : '{}' ", query );
114-
logger.debug( "update fields : '{}'", fields.size() );
120+
log.debug( "update START list : '{}' ", query );
121+
log.debug( "update fields : '{}'", fields.size() );
115122
Connection conn = this.daoContext.getConnection();
116123
int i=0;
117124
try ( PreparedStatement ps = conn.prepareStatement( query ) ) {
@@ -120,7 +127,7 @@ public int update( QueryHelper queryHelper ) throws DAOException {
120127
} catch (SQLException e) {
121128
throw (new DAOException( e.getMessage()+"[query:"+query+",record:"+i+"]", e ));
122129
}
123-
logger.debug("update END res : '{}'", res );
130+
log.debug("update END res : '{}'", res );
124131
} catch (DAOException e) {
125132
throw new DAOException( e );
126133
}
@@ -130,7 +137,7 @@ public int update( QueryHelper queryHelper ) throws DAOException {
130137
public BigDecimal newSequenceValue( String sequence ) throws DAOException {
131138
BigDecimal id = null;
132139
String sql = " SELECT "+sequence+".NEXTVAL FROM DUAL";
133-
logger.info( "newSequenceValue() sql > "+sql );
140+
log.info( "newSequenceValue() sql > "+sql );
134141
try ( Statement stm = this.daoContext.getConnection().createStatement();
135142
ResultSet rs = stm.executeQuery( sql ) ) {
136143
if ( rs.next() ) {
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package org.fugerit.java.core.util.checkpoint;
2+
3+
public class CheckpointUtils {
4+
5+
public static String formatTimeDiff( long elapsedTime ) {
6+
return String.valueOf( elapsedTime/1000+"."+elapsedTime%1000+"s" );
7+
}
8+
9+
public static String formatTimeDiff( long start, long end ) {
10+
return formatTimeDiff( end-start );
11+
}
12+
13+
}

fj-core/src/test/java/test/org/fugerit/java/core/lang/helpers/TestJavaVersionHelper.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,17 @@
33
import org.fugerit.java.core.lang.helpers.JavaVersionHelper;
44
import org.junit.Assert;
55
import org.junit.Test;
6-
import org.slf4j.Logger;
7-
import org.slf4j.LoggerFactory;
86

7+
import lombok.extern.slf4j.Slf4j;
8+
9+
@Slf4j
910
public class TestJavaVersionHelper {
1011

11-
private static final Logger logger = LoggerFactory.getLogger(TestJavaVersionHelper.class);
12-
1312
@Test
1413
public void test() {
1514
int majorVersion = JavaVersionHelper.parseUniversalJavaMajorVersion();
16-
logger.info("major version -> '{}'", majorVersion);
17-
Assert.assertEquals( "Wrong java major version" , JavaVersionHelper.MAJOR_VERSION_FJ_CORE_REF, majorVersion );
15+
log.info("major version -> '{}'", majorVersion);
16+
Assert.assertEquals( "Wrong java major version" , JavaVersionHelper.MAJOR_VERSION_JAVA_11, majorVersion );
1817
}
1918

2019
}

fj-core/src/test/java/test/org/fugerit/java/core/util/i18n/TestHelperI18N.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,19 @@ public void testComplexProperty1() {
6868
String key = "test.complex.prop.1"; // contains a integer param and a i18n param
6969
String keyParam = "test.param.1"; // the key for the i18n param
7070
this.testHelper( "Complex property 1 -> simple parameter : 3 and i18n parameter : (ParamI18N value)",
71-
LANG_DEF, key, new Integer( 3 ), ParamI18N.newParamI18N( keyParam ) );
71+
LANG_DEF, key, Integer.valueOf( 3 ), ParamI18N.newParamI18N( keyParam ) );
7272
this.testHelper( "Proprietà complessa test 1 -> parametro semplice : 3 e parametro i18n : (valore ParamI18N)",
73-
LANG_ALT[0], key, new Integer( 3 ), ParamI18N.newParamI18N( keyParam ) );
73+
LANG_ALT[0], key, Integer.valueOf( 3 ), ParamI18N.newParamI18N( keyParam ) );
7474
}
7575

7676
@Test
7777
public void testComplexProperty1Alt() {
7878
String key = "test.complex.prop.1"; // contains a integer param and a i18n param
7979
String keyParam = "test.param.1.alt"; // the key for the i18n param
8080
this.testHelper( "Complex property 1 -> simple parameter : 3 and i18n parameter : (ParamI18N value alternative bundle)",
81-
LANG_DEF, key, new Integer( 3 ), ParamI18N.newParamI18N( keyParam, this.helperParam ) );
81+
LANG_DEF, key, Integer.valueOf( 3 ), ParamI18N.newParamI18N( keyParam, this.helperParam ) );
8282
this.testHelper( "Proprietà complessa test 1 -> parametro semplice : 3 e parametro i18n : (valore ParamI18N bundle alternativo)",
83-
LANG_ALT[0], key, new Integer( 3 ), ParamI18N.newParamI18N( keyParam, this.helperParam ) );
83+
LANG_ALT[0], key, Integer.valueOf( 3 ), ParamI18N.newParamI18N( keyParam, this.helperParam ) );
8484
}
8585

8686
}

fj-tool/pom.xml

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
<parent>
88
<groupId>org.fugerit.java</groupId>
99
<artifactId>fj-lib</artifactId>
10-
<version>8.0.3</version>
10+
<version>8.0.4</version>
1111
</parent>
1212

1313
<name>fj-tool</name>
1414
<description>Fugerit Java Tool Library for JDK 1.8 and up</description>
1515

1616
<properties>
17+
<javax-mail-api-version>1.6.2</javax-mail-api-version>
1718
</properties>
1819

1920
<organization>
@@ -60,9 +61,28 @@
6061

6162
<dependencies>
6263

64+
<dependency>
65+
<groupId>org.slf4j</groupId>
66+
<artifactId>slf4j-api</artifactId>
67+
</dependency>
68+
69+
<dependency>
70+
<groupId>org.apache.logging.log4j</groupId>
71+
<artifactId>log4j-api</artifactId>
72+
</dependency>
6373
<dependency>
6474
<groupId>org.apache.logging.log4j</groupId>
65-
<artifactId>log4j-slf4j-impl</artifactId>
75+
<artifactId>log4j-core</artifactId>
76+
</dependency>
77+
<dependency>
78+
<groupId>org.apache.logging.log4j</groupId>
79+
<artifactId>log4j-slf4j2-impl</artifactId>
80+
</dependency>
81+
82+
<dependency>
83+
<groupId>com.sun.mail</groupId>
84+
<artifactId>javax.mail</artifactId>
85+
<version>${javax-mail-api-version}</version>
6686
</dependency>
6787

6888
<dependency>
@@ -75,13 +95,6 @@
7595
<artifactId>xz</artifactId>
7696
</dependency>
7797

78-
<!-- java core dependancies -->
79-
<dependency>
80-
<groupId>javax</groupId>
81-
<artifactId>javaee-api</artifactId>
82-
<scope>provided</scope>
83-
</dependency>
84-
8598
<dependency>
8699
<groupId>org.apache.poi</groupId>
87100
<artifactId>poi-ooxml</artifactId>

0 commit comments

Comments
 (0)