JUST GO

[memo] MemoEntity.java 본문

Spring Boot/코드정리

[memo] MemoEntity.java

root_go 2022. 10. 26. 17:45
package dev.rootgo.study_web.entities.study;

import java.util.Objects;

public class MemoEntity {
    private int index;
    private String name;
    private String text;

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        MemoEntity memo = (MemoEntity) o;
        return index == memo.index;
    }

    @Override
    public int hashCode() {
        return Objects.hash(index);
    }
}

'Spring Boot > 코드정리' 카테고리의 다른 글

[memo] index.html  (0) 2022.10.26
[memo] application.properties  (0) 2022.10.26
[memo] IMemoMapper.java  (0) 2022.10.26
[memo] MemoMapper.xml  (0) 2022.10.26
[memo] MemoService.java  (0) 2022.10.26