public class AAAObjectBase extends Object implements AAAObject
Provides a base AAAObject implementation
AAAObject.F| Modifier | Constructor and Description |
|---|---|
protected |
AAAObjectBase()
This constructor is designed to be used by tools like ORM to deserialize the object from a certain persistent storage
|
protected |
AAAObjectBase(String name)
Construct the AAAObject by name
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Compare this AAAObject to another object
|
String |
getName()
Returns the name of the object.
|
String |
getProperty(String key)
Return property value of the
AAAObject |
int |
hashCode()
hash code of the object is calculated from the name and the class of the object.
|
Set<String> |
propertyKeys()
Return a set contains the
property keys |
void |
setProperty(String key,
String value)
Set property value to the
AAAObject. |
String |
toString()
The method simple returns the name of the object.
|
void |
unsetProperty(String key)
Remove specified property from the
AAAObject |
protected AAAObjectBase()
This constructor is designed to be used by tools like ORM to deserialize the object from a certain persistent storage
protected AAAObjectBase(String name)
Construct the AAAObject by name
name - the namepublic int hashCode()
hash code of the object is calculated from the name and the class of the object.
properties are not considered here on the assumption that name is a unique identifier for a certain type of AAAObject
public String toString()
The method simple returns the name of the object. Sub class can choose to overwrite this method
public boolean equals(Object obj)
AAAObjectCompare this AAAObject to another object
public String getName()
AAAObjectReturns the name of the object. The name shall be unique for certain type of AAAObject
public void setProperty(String key, String value)
AAAObjectSet property value to the AAAObject.
Note if the value is null then the property will be removed from the object
setProperty in interface AAAObjectkey - the property keyvalue - the property valuepublic void unsetProperty(String key)
AAAObjectRemove specified property from the AAAObject
unsetProperty in interface AAAObjectkey - the property keypublic String getProperty(String key)
AAAObjectReturn property value of the AAAObject
getProperty in interface AAAObjectkey - the property keyCopyright © 2017–2020 OSGL (Open Source General Library). All rights reserved.