Skip to content

Commit 4cff9db

Browse files
author
haiyangl
committed
aaa
1 parent 0b458a7 commit 4cff9db

File tree

12 files changed

+61
-78
lines changed

12 files changed

+61
-78
lines changed

Diff for: .project

-7
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,4 @@
2020
<nature>org.eclipse.m2e.core.maven2Nature</nature>
2121
<nature>org.eclipse.jdt.core.javanature</nature>
2222
</natures>
23-
<linkedResources>
24-
<link>
25-
<name>jdbc</name>
26-
<type>2</type>
27-
<location>C:/Users/haiyangl/Landawn/abacus-core/src/jdbc</location>
28-
</link>
29-
</linkedResources>
3023
</projectDescription>

Diff for: maven/0.0.1-SNAPSHOT/abacus-jdbc-0.0.1-SNAPSHOT.pom

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@
7777
<dependency>
7878
<groupId>com.landawn</groupId>
7979
<artifactId>abacus-common</artifactId>
80-
<version>5.3.22</version>
80+
<version>5.3.23</version>
8181
</dependency>
8282

8383
<dependency>
8484
<groupId>com.landawn</groupId>
8585
<artifactId>abacus-query</artifactId>
86-
<version>2.1.4</version>
86+
<version>2.1.5</version>
8787
</dependency>
8888

8989
<dependency>

Diff for: pom.xml

+9-2
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,19 @@
2727
<artifactId>lombok</artifactId>
2828
<version>1.18.34</version>
2929
<scope>provided</scope>
30-
</dependency>
30+
</dependency>
31+
32+
<dependency>
33+
<groupId>com.landawn</groupId>
34+
<artifactId>abacus-common</artifactId>
35+
<version>5.3.23</version>
36+
<scope>provided</scope>
37+
</dependency>
3138

3239
<dependency>
3340
<groupId>com.landawn</groupId>
3441
<artifactId>abacus-query</artifactId>
35-
<version>2.1.4</version>
42+
<version>2.1.5</version>
3643
<scope>provided</scope>
3744
</dependency>
3845

Diff for: samples/com/landawn/abacus/samples/DaoTest.java

-40
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,6 @@
7878

7979
public class DaoTest {
8080

81-
/**
82-
*
83-
*
84-
* @throws Exception
85-
*/
8681
@Test
8782
public void test_paginate() throws Exception {
8883

@@ -119,11 +114,6 @@ public void test_paginate() throws Exception {
119114
userDao.delete(CF.ge("id", 0));
120115
}
121116

122-
/**
123-
*
124-
*
125-
* @throws Exception
126-
*/
127117
@Test
128118
public void test_setStringForMultiPositions() throws Exception {
129119

@@ -246,11 +236,6 @@ public void test_count() throws SQLException {
246236
// .accept(sp -> JdbcUtil.executeUpdate(userDao.dataSource(), sp.sql, sp.parameters.toArray()));
247237
// }
248238

249-
/**
250-
*
251-
*
252-
* @throws Exception
253-
*/
254239
@Test
255240
public void test_parallel() throws Exception {
256241

@@ -274,11 +259,6 @@ public void test_parallel() throws Exception {
274259
userDao.delete(CF.alwaysTrue());
275260
}
276261

277-
/**
278-
*
279-
*
280-
* @throws Exception
281-
*/
282262
@Test
283263
public void test_batchUpsert() throws Exception {
284264

@@ -351,11 +331,6 @@ public void test_batchUpsert() throws Exception {
351331
}
352332
}
353333

354-
/**
355-
*
356-
*
357-
* @throws Exception
358-
*/
359334
@Test
360335
public void test_exportCSV() throws Exception {
361336
final List<User> users = IntStream.range(1, 30)
@@ -382,11 +357,6 @@ public void test_exportCSV() throws Exception {
382357
userDao.batchDelete(users);
383358
}
384359

385-
/**
386-
*
387-
*
388-
* @throws Exception
389-
*/
390360
@Test
391361
public void test_refresh() throws Exception {
392362

@@ -415,11 +385,6 @@ public void test_refresh() throws Exception {
415385
userDao.batchDelete(dbUsers);
416386
}
417387

418-
/**
419-
*
420-
*
421-
* @throws Exception
422-
*/
423388
@Test
424389
public void test_define() throws Exception {
425390

@@ -450,11 +415,6 @@ public void test_define() throws Exception {
450415
assertFalse(userDao.isThere("user1", "last_name", ids.get(0)));
451416
}
452417

453-
/**
454-
*
455-
*
456-
* @throws Exception
457-
*/
458418
@Test
459419
public void test_BindList() throws Exception {
460420

Diff for: samples/com/landawn/abacus/samples/JdbcTest.java

-10
Original file line numberDiff line numberDiff line change
@@ -490,11 +490,6 @@ public void test_transaction() throws SQLException {
490490
// then don't need to call beginTransaction because Spring transaction is integrated and supported.
491491
}
492492

493-
/**
494-
*
495-
*
496-
* @throws Exception
497-
*/
498493
@Test
499494
public void test_cycled() throws Exception {
500495
CheckedStream.of(1).cycled(1000).map(it -> "a").println();
@@ -541,11 +536,6 @@ public void test_page() throws SQLException {
541536
userDao.batchDelete(users);
542537
}
543538

544-
/**
545-
*
546-
*
547-
* @throws Exception
548-
*/
549539
@Test
550540
public void test_copy() throws Exception {
551541
{

Diff for: samples/com/landawn/abacus/samples/dao/UncheckedUserDao.java

+1-6
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ public interface UncheckedUserDao
7171
@Select("SELECT first_name, last_name FROM user1 WHERE id = :id")
7272
User getFirstAndLastNameBy(@Bind("id") long id);
7373

74-
/**
75-
*
76-
*
77-
* @return
78-
*/
7974
@SqlLogEnabled(false)
8075
@Select("SELECT id, first_name, last_name, email FROM user1")
8176
Stream<User> allUsers();
@@ -321,4 +316,4 @@ List<User> selectByIdWithDefine_4(@Define("tableName") String tableName, @Bind("
321316
@Select(sql = "SELECT * FROM {tableName} where id = :id ORDER BY {{orderBy}}", op = OP.exists)
322317
boolean isThere(@Define("tableName") String tableName, @Define("{{orderBy}}") String orderBy, @Bind("id") long id) throws SQLException;
323318

324-
}
319+
}

Diff for: samples/com/landawn/abacus/samples/dao/UserDao.java

+1-11
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,6 @@
6767
// @SqlLogEnabled(true)
6868
public interface UserDao extends CrudDao<User, Long, SQLBuilder.PSC, UserDao>, JoinEntityHelper<User, SQLBuilder.PSC, UserDao> {
6969

70-
/**
71-
*
72-
*
73-
* @return
74-
*/
7570
@NonDBOperation
7671
@Override
7772
default Long generateId() {
@@ -110,11 +105,6 @@ default Long generateId() {
110105
@Select("SELECT first_name, last_name FROM `user1` WHERE id = :id")
111106
User getFirstAndLastNameBy(@Bind("id") long id) throws SQLException;
112107

113-
/**
114-
*
115-
*
116-
* @return
117-
*/
118108
@SqlLogEnabled(false)
119109
@Select("SELECT id, first_name, last_name, email FROM user1")
120110
Stream<User> allUsers();
@@ -565,4 +555,4 @@ public void afterInvoke(final Object result, final UserDao targetDao, final Obje
565555
}
566556
};
567557
}
568-
}
558+
}

Diff for: src/main/java/com/landawn/abacus/jdbc/dao/CrudDao.java

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
* @see JdbcUtil#prepareNamedQuery(javax.sql.DataSource, String)
6868
* @see JdbcUtil#beginTransaction(javax.sql.DataSource, IsolationLevel, boolean)
6969
* @see Dao
70+
* @see com.landawn.abacus.annotation.JoinedBy
7071
* @see com.landawn.abacus.condition.ConditionFactory
7172
* @see com.landawn.abacus.condition.ConditionFactory.CF
7273
*/

Diff for: src/main/java/com/landawn/abacus/jdbc/dao/CrudJoinEntityHelper.java

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
* @param <ID> the type of the entity ID
3434
* @param <SB> the type of the SQL builder
3535
* @param <TD> the type of the CRUD DAO
36+
*
37+
* @see com.landawn.abacus.annotation.JoinedBy
38+
* @see com.landawn.abacus.condition.ConditionFactory
39+
* @see com.landawn.abacus.condition.ConditionFactory.CF
3640
*/
3741
public interface CrudJoinEntityHelper<T, ID, SB extends SQLBuilder, TD extends CrudDao<T, ID, SB, TD>> extends JoinEntityHelper<T, SB, TD> {
3842

Diff for: src/main/java/com/landawn/abacus/jdbc/dao/Dao.java

+1
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@
225225
* @See CrudDao
226226
* @see SQLExecutor.Mapper
227227
* @see com.landawn.abacus.annotation.AccessFieldByMethod
228+
* @see com.landawn.abacus.annotation.JoinedBy
228229
* @see com.landawn.abacus.condition.ConditionFactory
229230
* @see com.landawn.abacus.condition.ConditionFactory.CF
230231
*

Diff for: src/main/java/com/landawn/abacus/jdbc/dao/JoinEntityHelper.java

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
* @param <T>
4545
* @param <SB>
4646
* @param <TD>
47+
*
48+
* @see com.landawn.abacus.annotation.JoinedBy
4749
* @see com.landawn.abacus.condition.ConditionFactory
4850
* @see com.landawn.abacus.condition.ConditionFactory.CF
4951
*/

Diff for: src/test/java/com/landawn/abacus/JavaDocHelper.java

+40
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,46 @@ public void remove_useless_comments() throws UncheckedIOException, IOException {
287287
});
288288
}
289289

290+
@Test
291+
public void remove_empty_jdoc() throws Exception {
292+
final File parentPath = new File("./samples/");
293+
294+
Stream.listFiles(parentPath, true) //
295+
.filter(file -> file.isFile() && file.getName().endsWith(".java"))
296+
// .filter(file -> Strings.startsWithAny(file.getName(), "CommonUtil.java", "N.java"))
297+
.filter(file -> N.noneMatch(filesToSkipSet, it -> file.getName().startsWith(it)))
298+
.peek(Fn.println())
299+
.forEach(file -> {
300+
final List<String> lines = IOUtil.readAllLines(file);
301+
boolean updated = false;
302+
303+
for (int i = 0, size = lines.size(); i < size; i++) {
304+
final String line = lines.get(i);
305+
306+
if (line.contains("/**")) {
307+
for (int j = i; j < size; j++) {
308+
if (lines.get(j).contains("*/")) {
309+
if ((i != j) && Stream.of(lines.subList(i, j + 1))
310+
.map(Fn.strip())
311+
.flattMap(it -> Strings.split(it, " ", true))
312+
.map(Fn.strip())
313+
.allMatch(it -> it.startsWith("/**") || it.startsWith("*/") || it.startsWith("*") || it.startsWith("@"))) {
314+
315+
lines.subList(i, j + 1).clear();
316+
size -= j - i + 1;
317+
updated = true;
318+
}
319+
break;
320+
}
321+
}
322+
}
323+
}
324+
325+
if (updated) {
326+
IOUtil.writeLines(lines, file);
327+
}
328+
});
329+
}
290330
// @Test
291331
// public void add_assertNotClosed() throws IOException {
292332
// File file = new File("./src/main/java/com/landawn/abacus/util/stream/");

0 commit comments

Comments
 (0)