@MappedSuperclass public abstract class NumberIdObject<T extends Number> extends Object implements Entity<T>
| Constructor and Description |
|---|
NumberIdObject() |
NumberIdObject(T id) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object)
比较id,如果任一方id是null,则不相等
|
T |
getId()
Return Identifier
|
int |
hashCode() |
boolean |
isPersisted()
Return true if persisted
|
boolean |
isTransient()
Return false if persisted
|
void |
setId(T id)
Set new id
|
public NumberIdObject()
public NumberIdObject(T id)
public boolean isPersisted()
EntityisPersisted in interface Entity<T extends Number>public boolean isTransient()
EntityisTransient in interface Entity<T extends Number>public int hashCode()
hashCode in class ObjectObject.hashCode()public boolean equals(Object object)
比较id,如果任一方id是null,则不相等
由于业务对象被CGlib或者javassist增强的原因,这里只提供一般的基于id的比较,不提供基于Class的比较。equals in class ObjectObject.equals(Object)Copyright © 2005–2018 The Beangle Software. All rights reserved.