Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Samuel Dudík
PA165 Winery Management System
Commits
bf355673
Commit
bf355673
authored
May 18, 2022
by
Michaela Korenková
Browse files
Merge branch 'feature/fixes/korenkova' into 'main'
Feature/fixes/korenkova See merge request
!48
parents
e6720ecf
7079a779
Pipeline
#141200
passed with stages
in 2 minutes and 25 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
winery/webapp/src/main/java/cz/muni/fi/pa165/winery/webapp/models/grape/GrapeUpsertViewModel.java
View file @
bf355673
...
...
@@ -7,7 +7,7 @@ import lombok.NoArgsConstructor;
import
lombok.Setter
;
import
org.modelmapper.ModelMapper
;
import
javax.validation.constraints.Not
Null
;
import
javax.validation.constraints.Not
Blank
;
/**
* @author Jakub Balga
...
...
@@ -29,7 +29,7 @@ public class GrapeUpsertViewModel extends ViewModelBase {
/**
* name of grape variety
*/
@Not
Null
(
message
=
"Cannot be empty"
)
@Not
Blank
(
message
=
"Cannot be empty"
)
private
String
name
;
public
GrapeDto
toDto
()
{
...
...
winery/webapp/src/main/java/cz/muni/fi/pa165/winery/webapp/models/wineBottle/WineBottleUpsertViewModel.java
View file @
bf355673
...
...
@@ -9,9 +9,7 @@ import lombok.NoArgsConstructor;
import
lombok.Setter
;
import
org.modelmapper.ModelMapper
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.PositiveOrZero
;
import
javax.validation.constraints.*
;
import
java.math.BigDecimal
;
import
java.util.List
;
...
...
@@ -36,7 +34,8 @@ public class WineBottleUpsertViewModel extends ViewModelBase {
/**
* name of wine bottle
*/
@NotNull
(
message
=
"Cannot be empty"
)
@NotBlank
(
message
=
"Cannot be empty"
)
@Pattern
(
regexp
=
"^[\\w0-9 ]+$"
,
message
=
"Please enter only alphanumerical characters and spaces"
)
private
String
name
;
/**
...
...
@@ -50,14 +49,14 @@ public class WineBottleUpsertViewModel extends ViewModelBase {
* volume of bottle
*/
@NotNull
(
message
=
"Cannot be empty"
)
@Positive
OrZero
(
message
=
"Has to be a
non-nega
tive number"
)
@Positive
(
message
=
"Has to be a
posi
tive number"
)
private
BigDecimal
volume
;
/**
* price of bottle
*/
@NotNull
(
message
=
"Cannot be empty"
)
@Positive
OrZero
(
message
=
"Has to be a
non-nega
tive number"
)
@Positive
(
message
=
"Has to be a
posi
tive number"
)
private
BigDecimal
price
;
/**
...
...
winery/webapp/src/main/java/cz/muni/fi/pa165/winery/webapp/models/wineType/WineTypeUpsertViewModel.java
View file @
bf355673
...
...
@@ -9,7 +9,9 @@ import lombok.Setter;
import
org.modelmapper.ModelMapper
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Pattern
;
import
java.util.List
;
/**
...
...
@@ -32,7 +34,8 @@ public class WineTypeUpsertViewModel extends ViewModelBase {
/**
* name of wine type
*/
@NotNull
(
message
=
"Cannot be empty"
)
@NotBlank
(
message
=
"Cannot be empty"
)
@Pattern
(
regexp
=
"^[\\w0-9 ]+$"
,
message
=
"Please enter only alphanumerical characters and spaces"
)
private
String
name
;
/**
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment