• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

future-architect / uroborosql / #743

28 Jun 2024 04:17PM UTC coverage: 90.988% (+0.5%) from 90.484%
#743

push

web-flow
add paramIfNotEmpty method (#318)

* v0.x to master merge

* fix nanoseconds diff (java8 to java11)

* eclipse cleanup and  optimize import

* eclipse format

* optimize Imports

* remove unused annotation

* library version up

* migrate v0.x to master
- update java version 8 to 11
- update junit4 to junit5
- library version update

* fix test failed

* remove unused annotation

* fixed bug

* use var

* fix java8 coding style

* Refactoring TransactionContextManager

* Refactoring SqlAgent

* 途中コミット

* fix testcase

* fix review

* fix javadoc comments

* merge v0.x PR

* cleanup code

* cleanup test code

* change build status badge

* - agent.query, update, proc, batch にそれぞれSupplierを引数にとるメソッドを追加
- SqlQuery.paramとSqlEntityUpdate.setにFunctionを受け取るメソッドを追加

* testcaseの整形

* - SqlFluent と ExtractionCondition の分離
- Arrays.asList -> List.of への変更
- テストの整形

* - v0.x系の不具合対応の追いつき
- ログ出力の整理

* - SqlKindの整理(ENTITY_XXXの追加)
- REPL_LOGの追加
- Deprecatedメソッドの削除(SqlAgent)
- SqlAgent, ExecutionContextでsetterをfluent APIに変更

* DB接続URLの修正

* add and fix testcases.

* add event testcases.

* fix typo

* add paramIfNotEmpty method and StringUtils rename ObjectUtils

* fix review comments.

* remove unused import

1695 of 1958 new or added lines in 97 files covered. (86.57%)

26 existing lines in 10 files now uncovered.

8249 of 9066 relevant lines covered (90.99%)

0.91 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

83.33
/src/main/java/jp/co/future/uroborosql/mapping/MetaTable.java
1
/**
2
 * Copyright (c) 2017-present, Future Corporation
3
 *
4
 * This source code is licensed under the MIT license found in the
5
 * LICENSE file in the root directory of this source tree.
6
 */
7
package jp.co.future.uroborosql.mapping;
8

9
import jp.co.future.uroborosql.exception.UroborosqlRuntimeException;
10

11
/**
12
 * 動的に生成するテーブルの情報を保持したクラス
13
 *
14
 * @author H.Sugimoto
15
 */
16
public class MetaTable implements Table {
17
        /** テーブル名 */
18
        private final String name;
19
        /** スキーマ名 */
20
        private final String schema;
21
        /** バージョンカラム名 */
22
        private final String versionColumnName;
23
        /** 楽観ロックを提供するクラス名 */
24
        private final String optimisticLockSupplierClassName;
25

26
        /**
27
         * コンストラクタ
28
         *
29
         * @param name テーブル名
30
         * @param schema スキーマ名
31
         * @param versionColumnName バージョンカラム名
32
         * @param optimisticLockSupplierClassName 楽観ロックを提供するクラス名
33
         */
34
        public MetaTable(final String name, final String schema, final String versionColumnName,
35
                        final String optimisticLockSupplierClassName) {
1✔
36
                this.name = name;
1✔
37
                this.schema = schema;
1✔
38
                this.versionColumnName = versionColumnName;
1✔
39
                this.optimisticLockSupplierClassName = optimisticLockSupplierClassName;
1✔
40
        }
1✔
41

42
        /**
43
         * {@inheritDoc}
44
         *
45
         * @see jp.co.future.uroborosql.mapping.Table#getName()
46
         */
47
        @Override
48
        public String getName() {
49
                return this.name;
1✔
50
        }
51

52
        /**
53
         * {@inheritDoc}
54
         *
55
         * @see jp.co.future.uroborosql.mapping.Table#getSchema()
56
         */
57
        @Override
58
        public String getSchema() {
59
                return this.schema;
1✔
60
        }
61

62
        /**
63
         * バージョンカラムの取得.
64
         *
65
         * @return バージョンカラム
66
         */
67
        public String getVersionColumnName() {
68
                return this.versionColumnName;
1✔
69
        }
70

71
        /**
72
         * 楽観ロックを提供するクラスの取得
73
         *
74
         * @return 楽観ロックを提供するクラス
75
         */
76
        @SuppressWarnings("unchecked")
77
        public Class<? extends OptimisticLockSupplier> getOptimisticLockType() {
78
                try {
79
                        return (Class<? extends OptimisticLockSupplier>) Class.forName(this.optimisticLockSupplierClassName);
1✔
NEW
80
                } catch (ClassNotFoundException ex) {
×
81
                        throw new UroborosqlRuntimeException(
×
82
                                        "OptimisticLockSupplier class : " + this.optimisticLockSupplierClassName + " not found.", ex);
83
                }
84
        }
85
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc