QueryDSL documentation is unfortunately quite lacking. For many of the methods I've had to either dig deep into grepcode or to track down any source code online that uses the methods of interest to try to figure out how they're using it.
So what does QueryDSL's PathBuilder's validate() do?
PathBuilder provides a pluggable validation mechanism for property creation. You can inject a PathBuilderValidator via the constructor. The default validator passes every property.
In action this means that pathBuilder.get("name") will have Object by default, String for a String typed field using PathBuilderValidator.FIELDS and String for a String typed property using PathBuilderValidator.PROPERTIES.
Apologies for the limited documentation. That will be improved with the 4.0.0 release.
https://github.com/querydsl/querydsl/blob/e4b20fc15a6b6d8108ccfdf5cb22df47f929e5e7/querydsl-core/src/main/java/com/querydsl/core/types/path/PathBuilderValidator.java
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With