Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(user.status){
- //do something
- }else{
- //do something else
- }
- class SwaggerUser{
- //other attributes
- boolean status;
- }
- class MyUser{
- Status status;
- }
- enum Status{
- ACTIVE(1), DEACTIVE(0), DELETE(-1)
- }
- class UserMapper{
- public static MyUser map(SwaggerUser swaggerUser){
- //code convert here
- return myUser;
- }
- }
- swith(status){
- ACTIVE:
- //do smth with active
- break;
- DEACTIVE:
- //do smth with deactive
- break;
- DELETE:
- //do smth with delete
- break;
- }
Add Comment
Please, Sign In to add comment