entity.java
来自「Java/J2EE application framework based on」· Java 代码 · 共 27 行
JAVA
27 行
package org.springframework.samples.petclinic;
/**
* Simple JavaBean domain object with an id property.
* Used as a base class for objects needing this property.
*
* @author Ken Krebs
* @author Juergen Hoeller
*/
public class Entity {
private Integer id;
public void setId(int id) {
this.id = new Integer(id);
}
public int getId() {
return (this.id != null ? this.id.intValue() : -1);
}
public boolean isNew() {
return (this.id == null);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?