Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YZG
yzg-util
Commits
de72fd64
Commit
de72fd64
authored
May 08, 2020
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口文档的支持
parent
6cee0372
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
21 deletions
+49
-21
DataDaoKey.java
...ase/src/main/java/com/yanzuoguang/util/vo/DataDaoKey.java
+2
-9
DataDaoKeyBase.java
...src/main/java/com/yanzuoguang/util/vo/DataDaoKeyBase.java
+25
-0
DataDaoKeyConvert.java
.../main/java/com/yanzuoguang/util/vo/DataDaoKeyConvert.java
+1
-12
DataDaoKeyConvertBase.java
...n/java/com/yanzuoguang/util/vo/DataDaoKeyConvertBase.java
+21
-0
No files found.
yzg-util-base/src/main/java/com/yanzuoguang/util/vo/DataDaoKey.java
View file @
de72fd64
...
...
@@ -8,21 +8,14 @@ import com.yanzuoguang.util.base.ObjectHelper;
* @param <T>
* @author 颜佐光
*/
public
abstract
class
DataDaoKey
<
T
>
{
/**
* 获取关键字
*
* @param from 来源对象
* @return
*/
abstract
String
getKey
(
T
from
);
public
abstract
class
DataDaoKey
<
T
>
implements
DataDaoKeyBase
<
T
>
{
/**
* 将当前对象的属性,写入到历史对象中,用于更新函数
*
* @param history
* @param now
*/
@Override
public
void
set
(
T
history
,
T
now
)
{
ObjectHelper
.
writeWithFrom
(
history
,
now
);
}
...
...
yzg-util-base/src/main/java/com/yanzuoguang/util/vo/DataDaoKeyBase.java
0 → 100644
View file @
de72fd64
package
com
.
yanzuoguang
.
util
.
vo
;
/**
* 获取关键字
*
* @param <T>
* @author 颜佐光
*/
public
interface
DataDaoKeyBase
<
T
>
{
/**
* 获取关键字
*
* @param from 来源对象
* @return
*/
String
getKey
(
T
from
);
/**
* 将当前对象的属性,写入到历史对象中,用于更新函数
*
* @param history
* @param now
*/
void
set
(
T
history
,
T
now
);
}
yzg-util-base/src/main/java/com/yanzuoguang/util/vo/DataDaoKeyConvert.java
View file @
de72fd64
package
com
.
yanzuoguang
.
util
.
vo
;
import
java.util.Map
;
/**
* 获取关键字
*
* @param <T>
* @author 颜佐光
*/
public
abstract
class
DataDaoKeyConvert
<
T
,
M
>
extends
DataDaoKey
<
T
>
{
/**
* 获取关键字
*
* @param mapHistory 映射的历史数据
* @param from 来源对象
* @return
*/
abstract
T
convert
(
Map
<
String
,
T
>
mapHistory
,
M
from
);
public
abstract
class
DataDaoKeyConvert
<
T
,
M
>
extends
DataDaoKey
<
T
>
implements
DataDaoKeyConvertBase
<
T
,
M
>
{
}
yzg-util-base/src/main/java/com/yanzuoguang/util/vo/DataDaoKeyConvertBase.java
0 → 100644
View file @
de72fd64
package
com
.
yanzuoguang
.
util
.
vo
;
import
java.util.Map
;
/**
* 获取关键字
*
* @param <T>
* @author 颜佐光
*/
public
interface
DataDaoKeyConvertBase
<
T
,
M
>
extends
DataDaoKeyBase
<
T
>
{
/**
* 获取关键字
*
* @param mapHistory 映射的历史数据
* @param from 来源对象
* @return
*/
T
convert
(
Map
<
String
,
T
>
mapHistory
,
M
from
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment