Conversation
| return getInstanceCache(clazz, id).computeIfAbsent(Objects.requireNonNull(id), fetcher.andThen(Objects::requireNonNull)); | ||
| } | ||
|
|
||
| public <T extends PersistedObject> void addDirty(T po) { |
Contributor
Author
There was a problem hiding this comment.
I was debating adding the po.setDirty(field) to this call as well (and adding a String field param). That way the aspect wouldn't have any logic in it and only provides a (nice compile time) method of setting the dirty state.
But is this object public? Is it ok having this on the public class?
WDTY?
Owner
There was a problem hiding this comment.
You're talking about po.setDirty? I think it's probably fine having that public since it only gets added to the class as part of the weaving process...i.e. I don't think eclipse will show that method as being available
or am I misunderstanding?
Contributor
Author
There was a problem hiding this comment.
I guess I was combining two separate things:
- Somehow we should expose
getObjectByIdlike JDO does, probably along withsaveanddelete. Which object will expose that? And thisaddDirtyshould not be exposed despite the implementation currently being besidegetObjectById - I think the logic in
PersistanceAspect#markFieldDirtyshould move here so that a) the aspect has no logic in it b) both the dirty field and dirty object logic is in one spot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@joshcbarnes