Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JNG-6082 Refactor required validation and default value processing #68

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/main/java/hu/blackbelt/judo/dao/api/DAO.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,17 @@ public interface DAO<ID> {
*/
Payload getDefaultsOf(EClass clazz);

/**
* <p>Apply the default values in the given payload based on the specified transfer object type.</p>
* <p>The default values are also applied by traversing through its relations.</p>
* <p>NOTE: additional fields with default values on entity type that are not targeted by a mapping from given transfer object (clazz) mapping,
* will not be applied</p>
*
* @param clazz transfer object type
* @param payload payload
*/
void applyDefaultsOf(EClass clazz, Payload payload);

/**
* Get range of a given transfer object relation.
*
Expand Down