๋ฐ์ํ
์ง์ ์์ฑํ๊ธด ๊ท์ฐฎ์ผ๋ ๋จ์ถํค๋ฅผ ํตํด์ Getters and Setters๋ฅผ ๋ง๋ค์ด๋ณด์.
Shift + Alt + S ๋ฅผ ๋๋ฅด๋ฉด
์ด๋ ๊ฒ ์ฐฝ์ด ๋ฌ๋ค.
์ฌ๊ธฐ์ Generate Getters and Setters๋ฅผ ํด๋ฆญํ๋ค.
์๋ฅผ ์ฒดํฌํ๊ณ Generate๋ฅผ ๋๋ฅธ๋ค.
Select All
selectAll๋ฅผ ํด์ ๋ชจ๋ ์์๋ฅผ ์ฒดํฌํด๋ ๋๊ณ , ๋ถ๋ถ๋ง ๋ง๋ค๊ณ ์ถ๋ค๋ฉด ์ฒดํฌ๋ฐ์ค๋ฅผ ํตํด์ ์ฒดํฌ๋ฅผ ํ ์ ์๋ค.
Generate method comments
์ด ๋ถ๋ถ์ ์ฒดํฌํ๋ฉด ์ฃผ์์ด ์๋ ์์ฑ๋๋ค.
๊ทธ๋์ ์ฃผ์์ด ํ์ํ๋ฉด ์ฒดํฌํด์ฃผ๊ณ , ์๋๋ผ๋ฉด ํด์ ํด์ฃผ๋ฉด ๋๋ค.
์ด๋ ๊ฒ ํ๋ฉด ๋ฐ์ฒ๋ผ ์๋์ผ๋ก ์ฝ๋๊ฐ ์ฝ์ ๋๋ค.
package board.beans;
import java.sql.Timestamp;
/**
* ์ฌ์ฉ์
*/
public class User {
/** ์ฌ์ฉ์ ๊ณ ์ ID */
private long id;
/** ์์ด ์ด๋ฆ */
private String name;
/** ํ๊ตญ์ด ์ด๋ฆ */
private String fullName;
/** ๋น๋ฐ๋ฒํธ */
private String password;
/** ์ด๋ฉ์ผ */
private String email;
/** ๋์ด */
private int age;
/** ๊ฐ์
๋ ์ง */
private Timestamp createDate;
/**
* ์์ฑ์
*/
public User() {
// Do nothing
}
/**
* ์์ฑ์
*
* @param name
* @param age
*/
public User(String name, int age) {
super();
this.name = name;
this.age = age;
}
/**
* ์์ฑ์
*
* @param id
* @param name
* @param fullName
* @param password
* @param email
* @param age
* @param createDate
*/
public User(long id, String name, String fullName, String password, String email, int age, Timestamp createDate) {
super();
this.id = id;
this.name = name;
this.fullName = fullName;
this.password = password;
this.email = email;
this.age = age;
this.createDate = createDate;
}
/**
* @return the id
*/
public long getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(long id) {
this.id = id;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the fullName
*/
public String getFullName() {
return fullName;
}
/**
* @param fullName the fullName to set
*/
public void setFullName(String fullName) {
this.fullName = fullName;
}
/**
* @return the password
*/
public String getPassword() {
return password;
}
/**
* @param password the password to set
*/
public void setPassword(String password) {
this.password = password;
}
/**
* @return the email
*/
public String getEmail() {
return email;
}
/**
* @param email the email to set
*/
public void setEmail(String email) {
this.email = email;
}
/**
* @return the age
*/
public int getAge() {
return age;
}
/**
* @param age the age to set
*/
public void setAge(int age) {
this.age = age;
}
/**
* @return the createDate
*/
public Timestamp getCreateDate() {
return createDate;
}
/**
* @param createDate the createDate to set
*/
public void setCreateDate(Timestamp createDate) {
this.createDate = createDate;
}
}
๋ฐ์ํ
'๐ณ๐๐๐๐๐๐๐๐๐๐ ๐๐๐๐๐ > ๐ด๐๐๐๐๐๐' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Eclipse] svn commit ๋ด์ญ ๋ณด๋ ๋ฐฉ๋ฒ (1) | 2024.06.03 |
---|---|
[Eclipse] ์ดํด๋ฆฝ์ค ์๋ฒ ์์ 45์ด ํ์์์ ์ค๋ฅ ํด๊ฒฐ (0) | 2024.02.11 |
[Eclipse] JUnit ์ฌ์ฉํ๊ธฐ (1) | 2023.10.31 |
[Eclipse] WEB-INF์ web.xml์ด ์์ / web.xml ์์ค ๋ณด๋ ๋ฒ (0) | 2023.10.17 |
eclipse ์น ๊ฐ๋ฐ ํ๊ฒฝ ๊ตฌ์ถ (Eclipse, Tomcat 9, JDK-17) (0) | 2023.10.11 |