@@ -18,7 +18,7 @@ The `DotPathQL` is the core component of this project that allows you to extract
1818- 📋 ** Collection Handling** : Process Lists, Arrays, and other Collections
1919- 🗺️ ** Map Support** : Handle both simple and complex Map structures
2020- 📝 ** Record & POJO Support** : Works with Java Records and traditional classes
21- - 🔒 ** Private Field Access** : Can access private fields when getters aren't available
21+ - 🔒 ** Private Field Access** : Can access private fields when getters aren't available (filtering only)
2222- 🚀 ** Performance Optimized** : Efficient reflection-based property access
2323
2424## Quick Start
@@ -38,10 +38,8 @@ The `DotPathQL` is the core component of this project that allows you to extract
3838### Filter Usage
3939
4040``` java
41- DotPathQL filterUtil = new DotPathQL ();
42-
4341// Filter specific properties from an object
44- Map<String , Object > result = filterUtil . filter(userObject, List . of(
42+ Map<String , Object > result = new DotPathQL () . filter(userObject, List . of(
4543 " username" ,
4644 " address.street" ,
4745 " address.city"
@@ -51,10 +49,8 @@ Map<String, Object> result = filterUtil.filter(userObject, List.of(
5149### Exclude Usage
5250
5351``` java
54- DotPathQL filterUtil = new DotPathQL ();
55-
5652// Exclude specific properties and return everything else
57- Map<String , Object > result = filterUtil . exclude(userObject, List . of(
53+ Map<String , Object > result = new DotPathQL () . exclude(userObject, List . of(
5854 " password" ,
5955 " ssn" ,
6056 " address.country"
@@ -63,7 +59,7 @@ Map<String, Object> result = filterUtil.exclude(userObject, List.of(
6359
6460## Supported Data Structures
6561
66- - Simple Properties
62+ - Simple Properties (primitive and object types)
6763- Nested Objects
6864- Collections and Arrays
6965- Map Structures
@@ -96,7 +92,7 @@ The utility uses a multi-layered approach to access object properties:
9692
97931 . ** Record Components** (Most Efficient): For Java Records, uses the generated accessor methods
98942 . ** Getter Methods** : Tries standard getter methods (` getName() ` , ` getAddress() ` )
99- 3 . ** Direct Field Access** : Falls back to direct field access for private fields
95+ 3 . ** Direct Field Access** : Falls back to direct field access for private fields (except for the exclude API)
10096
10197### Nested Structure Processing
10298
@@ -178,6 +174,25 @@ List<String> reportFields = List.of(
178174);
179175```
180176
177+ ## Helper Utilities
178+
179+ You can also easy access the map result using the ` DotPathQL ` utility methods:
180+
181+ ``` java
182+ // Step 1
183+ var dotPathQL = new DotPathQL ();
184+ var result = dotPathQL. filter(userObject, List . of(
185+ " address" ,
186+ " friendList" ,
187+ " games"
188+ ));
189+
190+ // Step 2: Accessing the result
191+ var address = dotPathQL. mapFrom(result, " address" );
192+ var friendList = dotPathQL. listFrom(result, " friendList" );
193+ var games = dotPathQL. arrayFrom(result, " games" );
194+ ```
195+
181196## Technical Requirements
182197
183198- ** Java** : 17 or higher
0 commit comments