name.java
来自「用Java实现的23个常用设计模式源代码」· Java 代码 · 共 67 行
JAVA
67 行
//$Id: Name.java,v 1.3.2.1 2003/08/09 11:24:47 turin42 Exp $package net.sf.hibernate.odmg;import java.io.Serializable;/** * An ODMG name that may be bound to a persistent object. */public class Name { private String name; private Class persistentClass; private Serializable id; public Name(String name, Class persistentClass, Serializable id) { this.name = name; this.persistentClass = persistentClass; this.id = id; } public Name() {} /** * Returns the name. JavaDoc requires a second sentence. * @return String */ public String getName() { return name; } /** * Returns the persistentClass. JavaDoc requires a second sentence. * @return Class */ public Class getPersistentClass() { return persistentClass; } /** * Sets the name. JavaDoc requires a second sentence. * @param name The name to set */ public void setName(String name) { this.name = name; } /** * Sets the persistentClass. JavaDoc requires a second sentence. * @param persistentClass The persistentClass to set */ public void setPersistentClass(Class persistentClass) { this.persistentClass = persistentClass; } /** * Returns the id. JavaDoc requires a second sentence. * @return Serializable */ public Serializable getId() { return id; } /** * Sets the id. JavaDoc requires a second sentence. * @param id The id to set */ public void setId(Serializable id) { this.id = id; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?