public abstract class Ersatz extends Object
Neutral form for communication with various forms of EO object storages. Single Ersatz
instance represents one record.
It's a form of map, where keys are EO attributes, values are neutral java types (see package description) and if some key is
not set then this value is not present.
It contains values only for EO attributes returned in attributes()
method. Values for all other attributes are assumed to be
empty.
Modifier and Type | Field and Description |
---|---|
static Ersatz |
EMPTY
Empty ersatz object with no attributes set.
|
Constructor and Description |
---|
Ersatz() |
Modifier and Type | Method and Description |
---|---|
abstract Iterable<EOAttribute> |
attributes()
Gets all EO attributes that this ersatz object has values stored for.
|
static void |
copy(Ersatz source,
Ersatz dest)
Copy all EO attributes defined in source object to the destination
|
abstract void |
delete()
Delete record that this ersatz represents.
|
abstract Object |
get(EOAttribute att)
Gets neutral value for an EO attribute.
|
abstract void |
put(EOAttribute att,
Object value)
Sets neutral java value for an EO attribute.
|
abstract void |
remove(EOAttribute att)
Clears value for an EO attribute.
|
public static final Ersatz EMPTY
public abstract Object get(EOAttribute att)
attributes()
.att
- EO attribute to retrieve value forpublic abstract void put(EOAttribute att, Object value)
att
- EO attribute to set the value forvalue
- library independent valuepublic abstract void remove(EOAttribute att)
att
- public abstract Iterable<EOAttribute> attributes()
public static void copy(Ersatz source, Ersatz dest)
source
- object to copy fromdest
- object to copy topublic abstract void delete()
Copyright © 2002 – 2024 Project Wonder.