-
Notifications
You must be signed in to change notification settings - Fork 5
Feature/96 coffee modify annotation examples #97
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,6 +29,7 @@ | |
| import hu.icellmobilsoft.coffee.dto.exception.BaseException; | ||
| import hu.icellmobilsoft.sampler.common.system.jpa.service.BaseService; | ||
| import hu.icellmobilsoft.sampler.model.sample.SampleEntity; | ||
| import hu.icellmobilsoft.sampler.model.sample.SampleEntity_; | ||
| import hu.icellmobilsoft.sampler.model.sample.enums.SampleStatus; | ||
| import hu.icellmobilsoft.sampler.sample.jpaservice.repository.SampleEntityRepository; | ||
|
|
||
|
|
@@ -60,4 +61,24 @@ public class SampleEntityService extends BaseService<SampleEntity> { | |
| public List<SampleEntity> findAllByStatus(SampleStatus status) throws BaseException { | ||
| return wrapListValidated(sampleEntityRepository::findAllByStatus, status, "findAllByStatus", "status"); | ||
| } | ||
|
|
||
| /** | ||
| * Updates all SampleEntity entity with the given params | ||
| * | ||
| * @param sampleStatus new sampleStatus | ||
| * @param inputValue new inputValue | ||
| * @return status of update | ||
| * @throws BaseException on error | ||
| */ | ||
| public int updateAllStatusAndInputValue(SampleStatus sampleStatus, String inputValue) throws BaseException { | ||
|
|
||
| return wrapValidated( | ||
| sampleEntityRepository::updateAllSampleStatusAndInputValue, | ||
| sampleStatus, | ||
| inputValue, | ||
| "updateAllSampleStatusAndInputValue", | ||
| SampleEntity_.STATUS, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. *Service szinten nem szabad hogy legyen barmi rejtett logika, mindent az action szinten keresunk
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wrapValidated parametereit eredetileg arra szantuk hogy a valos metodus valtozo neveit irja ki a logokban. Logikailag helyes ahogy irod, mivel a vegso mezo neve a entityben SampleEntity_.STATUS csak a metodusban az ehhez tartozo valtozo neve "sampleStatus". Ez most csak tenyleg aprosag, de igy keressuk a logokban mashol is. |
||
| SampleEntity_.INPUT_VALUE | ||
| ); | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formazas volt?