-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
kkforgg@naver.com
committed
Jun 30, 2019
1 parent
9b42fad
commit 3a56666
Showing
11 changed files
with
208 additions
and
178 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
164 changes: 83 additions & 81 deletions
164
src/main/java/com/study/myhome/menu/service/MenuVO.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,92 @@ | ||
package com.study.myhome.menu.service; | ||
|
||
import com.study.myhome.enums.Authority; | ||
|
||
import java.io.Serializable; | ||
import java.util.List; | ||
import org.apache.ibatis.type.Alias; | ||
|
||
@Alias("MenuVO") | ||
public class MenuVO { | ||
|
||
private int menuIdx; | ||
|
||
private String menuName; | ||
// 메뉴 상세 | ||
private List<MenuDetailVO> menuDetails; | ||
|
||
public MenuVO() { | ||
|
||
} | ||
|
||
public MenuVO(Authority authorityMenu) { | ||
super(); | ||
this.menuIdx = authorityMenu.ordinal(); | ||
} | ||
|
||
public int getMenuIdx() { | ||
return menuIdx; | ||
} | ||
|
||
public void setMenuIdx(int menuIdx) { | ||
this.menuIdx = menuIdx; | ||
} | ||
|
||
public String getMenuName() { | ||
return menuName; | ||
} | ||
|
||
public void setMenuName(String menuName) { | ||
this.menuName = menuName; | ||
} | ||
|
||
public List<MenuDetailVO> getMenuDetails() { | ||
return menuDetails; | ||
} | ||
|
||
public void setMenuDetails(List<MenuDetailVO> menuDetails) { | ||
this.menuDetails = menuDetails; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
final int prime = 31; | ||
int result = 1; | ||
result = prime * result | ||
+ ((menuDetails == null) ? 0 : menuDetails.hashCode()); | ||
result = prime * result + menuIdx; | ||
result = prime * result | ||
+ ((menuName == null) ? 0 : menuName.hashCode()); | ||
return result; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) { | ||
return true; | ||
} | ||
if (obj == null) { | ||
return false; | ||
} | ||
if (getClass() != obj.getClass()) { | ||
return false; | ||
} | ||
MenuVO other = (MenuVO) obj; | ||
if (menuDetails == null) { | ||
if (other.menuDetails != null) { | ||
return false; | ||
} | ||
} else if (!menuDetails.equals(other.menuDetails)) { | ||
return false; | ||
} | ||
if (menuIdx != other.menuIdx) { | ||
return false; | ||
} | ||
if (menuName == null) { | ||
return other.menuName == null; | ||
} else { | ||
return menuName.equals(other.menuName); | ||
} | ||
} | ||
public class MenuVO implements Serializable { | ||
|
||
private static final long serialVersionUID = 875682324620641074L; | ||
|
||
private int menuIdx; | ||
|
||
private String menuName; | ||
// 메뉴 상세 | ||
private List<MenuDetailVO> menuDetails; | ||
|
||
public MenuVO() { | ||
|
||
} | ||
|
||
public MenuVO(Authority authorityMenu) { | ||
super(); | ||
this.menuIdx = authorityMenu.ordinal(); | ||
} | ||
|
||
public int getMenuIdx() { | ||
return menuIdx; | ||
} | ||
|
||
public void setMenuIdx(int menuIdx) { | ||
this.menuIdx = menuIdx; | ||
} | ||
|
||
public String getMenuName() { | ||
return menuName; | ||
} | ||
|
||
public void setMenuName(String menuName) { | ||
this.menuName = menuName; | ||
} | ||
|
||
public List<MenuDetailVO> getMenuDetails() { | ||
return menuDetails; | ||
} | ||
|
||
public void setMenuDetails(List<MenuDetailVO> menuDetails) { | ||
this.menuDetails = menuDetails; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
final int prime = 31; | ||
int result = 1; | ||
result = prime * result + ((menuDetails == null) ? 0 : menuDetails.hashCode()); | ||
result = prime * result + menuIdx; | ||
result = prime * result + ((menuName == null) ? 0 : menuName.hashCode()); | ||
return result; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) { | ||
return true; | ||
} | ||
if (obj == null) { | ||
return false; | ||
} | ||
if (getClass() != obj.getClass()) { | ||
return false; | ||
} | ||
MenuVO other = (MenuVO) obj; | ||
if (menuDetails == null) { | ||
if (other.menuDetails != null) { | ||
return false; | ||
} | ||
} else if (!menuDetails.equals(other.menuDetails)) { | ||
return false; | ||
} | ||
if (menuIdx != other.menuIdx) { | ||
return false; | ||
} | ||
if (menuName == null) { | ||
return other.menuName == null; | ||
} else { | ||
return menuName.equals(other.menuName); | ||
} | ||
} | ||
|
||
} |
This file contains 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
This file contains 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
Oops, something went wrong.