Skip to content

Commit e4f46d4

Browse files
author
Ray
committed
Obejct operations component - EasyCommons
readme edit
1 parent ee53995 commit e4f46d4

File tree

3 files changed

+25
-22
lines changed

3 files changed

+25
-22
lines changed

doc/API-en.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Alias definitions (only for EasyObjectExtract): FieldExpression#Alias
2424
## 2. API
2525
EasyObjectUtils It includes the following components:
2626

27-
1. **EasyObjectExtract**:Extraction of the object. Using field expression from the object (`FieldExpression`) to extract the specified property deposited **key-value** Map collection.
27+
1. **EasyObjectExtract**:Extraction of the object. Using field expression from the object (`FieldExpression`) to extract the specified property deposited **key-value** Map collection.<br/>
2828
**Scene**: JSON output, specify the output attributes and values extracted from the object.
2929
```JAVA
3030
/**
@@ -43,14 +43,14 @@ EasyObjectUtils It includes the following components:
4343
List<Map> extract(collection [, fieldExpressionAndOutNameMap], fieldExpressions)
4444
List<Map> extract(array [, fieldExpressionAndOutNameMap], fieldExpressions)
4545
```
46-
** Example:**
46+
**Example:**
4747
```JAVA
4848
List<Map> list = EasyObjectExtract.extract(getData(),
4949
"userId", "name", "status", "{sysRoles}.name#roleNames",
5050
"{sysRoles}.roleId#roleIds");
5151
```
5252

53-
2. **EasyObjectFilter**:Object filtering. The JavaBean object properties of special characters (<,>, ...) to filter out, into the escape character; or custom character transformation maps.
53+
2. **EasyObjectFilter**:Object filtering. The JavaBean object properties of special characters (<,>, ...) to filter out, into the escape character; or custom character transformation maps.<br/>
5454
**Scene** : the special character JavaBean object properties contains a string to filter into character entity; or a character string property objects included replacing all the specified character. For example, the data in the file upload Struts2 package submitted to the object, a special string to the user object may contain submitted escaped.
5555
```JAVA
5656
/**
@@ -75,7 +75,7 @@ EasyObjectUtils It includes the following components:
7575
EasyObjectExtract.filter(news,replaceMap);
7676
```
7777

78-
3. **EasyObjectSetNull**:Object Properties empty. Using field expressions (`FieldExpression`) specified property set to null object.
78+
3. **EasyObjectSetNull**:Object Properties empty. Using field expressions (`FieldExpression`) specified property set to null object.<br/>
7979
**Scene** : Hibernate object loaded some delay attribute set can not be loaded is empty, to prevent abnormal when no session serialized property.
8080
```JAVA
8181
/**

doc/API-zh.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ EasyObjectUtils的 工具类中在操作对象时使用到了**EasyObject FieldE
2222
## 2. API 简介
2323
EasyObjectUtils 包括如下组件:
2424

25-
1. **EasyObjectExtract**:对象抽取。 从对象中使用字段表达式(`FieldExpression`)抽取指定属性以 **key-value** 存入Map集合。
25+
1. **EasyObjectExtract**:对象抽取。 从对象中使用字段表达式(`FieldExpression`)抽取指定属性以 **key-value** 存入Map集合。 <br/>
2626
**适合场景**:JSON输出时,从对象中抽取指定输出属性和值。
2727
```JAVA
2828
/**
@@ -49,7 +49,7 @@ EasyObjectUtils 包括如下组件:
4949
"{sysRoles}.roleId#roleIds");
5050
```
5151

52-
2. **EasyObjectFilter**:对象过滤。将JavaBean对象属性中的特殊字符(<,>,...)全部过滤掉,转为转义符;或者自定义字符转换映射。
52+
2. **EasyObjectFilter**:对象过滤。将JavaBean对象属性中的特殊字符(<,>,...)全部过滤掉,转为转义符;或者自定义字符转换映射。 <br/>
5353
**适合场景**:将JavaBean对象属性中的字符串包含的特殊字符进行过滤转换为字符实体;或将对象字符串属性中包含的字符全部替换为指定字符。例如,在Struts2中文件上传时提交的数据封装到对象后,对对象中可能包含的用户提交的的特殊字符串的进行转义。
5454
```JAVA
5555
/**
@@ -73,7 +73,7 @@ EasyObjectUtils 包括如下组件:
7373
EasyObjectExtract.filter(news,replaceMap);
7474
```
7575

76-
3. **EasyObjectSetNull**:对象属性置空。使用字段表达式(`FieldExpression`)将对象中指定属性设置为null。
76+
3. **EasyObjectSetNull**:对象属性置空。使用字段表达式(`FieldExpression`)将对象中指定属性设置为null。 <br/>
7777
**适合场景**:将Hibernate加载的对象中有些延迟无法加载的属性设置为空 ,防止在序列化属性时出现no session异常。
7878
```JAVA
7979
/**

readme.md

+18-15
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,16 @@ EasyObjectUtils is EasyCommons project group obejct operations component.
2222
- **EasyObjectUtils 核心**
2323

2424
1. **EasyObjectExtract**:对象抽取。 从对象中使用字段表达式(`FieldExpression`)抽取指定属性以 **key-value** 存入Map集合。
25+
2526
**适合场景**:JSON输出时,从对象中抽取指定输出属性和值。
2627

2728
2. **EasyObjectFilter**:JavaBean对象属性过滤。将对象中的特殊字符(<,>,...)全部过滤掉,转为转义符;或者自定义字符转换映射。
29+
2830
**适合场景**:将JavaBean对象属性中的字符串包含的特殊字符进行过滤转换为字符实体;或将对象字符串属性中包含的字符全部替换为指定字符。例如,在Struts2中文件上传时提交的数据封装到对象后,对对象中可能包含的用户提交的的特殊字符串的进行转义。
2931

3032
3. **EasyObjectSetNull**:对象属性置空。使用字段表达式(`FieldExpression`)将对象中指定属性设置为null。
31-
**适合场景**:将Hibernate加载的对象中有些延迟无法加载的属性设置为空 ,防止在序列化属性时出现no session异常。
33+
34+
**适合场景**:将Hibernate加载的对象中有些延迟无法加载的属性设置为空 ,防止在序列化属性时出现no session异常。
3235

3336
- **EasyObject FieldExpression(字段表达式)语言**
3437
可以在进行对象操作时进行属性定位。
@@ -56,28 +59,28 @@ EasyObjectUtils is EasyCommons project group obejct operations component.
5659

5760
- **EasyObjectUtils core:**
5861

59-
1. **EasyObjectExtract**: extraction of the object. Using field expression from the object (`FieldExpression`) to extract the specified property deposited **key-value** Map collection.
60-
**Scene**: JSON output, specify the output attributes and values extracted from the object.
62+
1. **EasyObjectExtract**: extraction of the object. Using field expression from the object (`FieldExpression`) to extract the specified property deposited **key-value** Map collection.<br/>
63+
**Scene**: JSON output, specify the output attributes and values extracted from the object.
6164

62-
2. **EasyObjectFilter**: JavaBean Object property filtering. The object of special characters (<,>, ...) to filter out, into the escape character; or custom character transformation maps.
65+
2. **EasyObjectFilter**: JavaBean Object property filtering. The object of special characters (<,>, ...) to filter out, into the escape character; or custom character transformation maps.<br/>
6366
**Scene** : the special character JavaBean Object property contains a string to filter into character entity; or a character string property objects included replacing all the specified character. For example, the data in the file upload Struts2 package submitted to the object, a special string to the user object may contain submitted escaped.
6467

65-
3. **EasyObjectSetNull**: Object Properties empty. Using field expressions Language(`FieldExpression`) specified property set to null object.
66-
**Scene**: Hibernate object loaded some delay attribute set can not be loaded is empty, to prevent abnormal when no session serialized property.
68+
3. **EasyObjectSetNull**: Object Properties empty. Using field expressions Language(`FieldExpression`) specified property set to null object.<br/>
69+
**Scene**: Hibernate object loaded some delay attribute set can not be loaded is empty, to prevent abnormal when no session serialized property.
6770

6871
- **EasyObject FieldExpression language**
6972
EasyObjectUtils the tools used to **EasyObject FieldExpression (field expression) language** for property positioning when you operate object.
7073

7174
Syntax:
72-
```
73-
Specified attributes: property
74-
Specify the attribute that: property.property
75-
Each object in the specified collection: {collection}
76-
Each object in the specified array: [array] Attribute specifies for each object in the collection: {collection} .property
77-
Attribute specifies for each object in the array: [array] .property
78-
79-
Alias definitions (only for EasyObjectExtract): FieldExpression#Alias
80-
```
75+
```
76+
Specified attributes: property
77+
Specify the attribute that: property.property
78+
Each object in the specified collection: {collection}
79+
Each object in the specified array: [array] Attribute specifies for each object in the collection: {collection} .property
80+
Attribute specifies for each object in the array: [array] .property
81+
82+
Alias definitions (only for EasyObjectExtract): FieldExpression#Alias
83+
```
8184

8285
[EasyObjectUtils API - English](doc/API-en.md "EasyObjectUtils API")
8386

0 commit comments

Comments
 (0)