public abstract class Neo4JErsatz extends Ersatz
PropertyContainer
.Modifier | Constructor and Description |
---|---|
protected |
Neo4JErsatz(EOEntity entity,
org.neo4j.graphdb.PropertyContainer pc) |
Modifier and Type | Method and Description |
---|---|
Iterable<EOAttribute> |
attributes()
Gets all EO attributes that this ersatz object has values stored for.
|
static Neo4JErsatz |
create(EOEntity entity,
org.neo4j.graphdb.PropertyContainer pc)
Create ersatz using values stored in the given property container.
|
Object |
get(EOAttribute att)
Gets neutral value for an EO attribute.
|
static Object |
getAttribute(org.neo4j.graphdb.PropertyContainer container,
EOAttribute att)
Gets EO attribute value from a property container.
|
protected abstract Number |
getForeignKeyValue(EORelationship rel)
Gets ID of an object referenced by the given foreign key
|
org.neo4j.graphdb.PropertyContainer |
getPropertyContainer() |
void |
put(EOAttribute att,
Object value)
Sets neutral java value for an EO attribute.
|
void |
remove(EOAttribute att)
Clears value for an EO attribute.
|
protected static void |
setAttribute(org.neo4j.graphdb.PropertyContainer pc,
EOAttribute att,
Object value) |
protected abstract void |
setForeignKeyValue(EORelationship rel,
Number val)
Sets relationship value.
|
protected final EOEntity entity
protected Neo4JErsatz(EOEntity entity, org.neo4j.graphdb.PropertyContainer pc)
public static Neo4JErsatz create(EOEntity entity, org.neo4j.graphdb.PropertyContainer pc)
entity
- entity that the property container contains record forpc
- property container to read record values frompublic org.neo4j.graphdb.PropertyContainer getPropertyContainer()
public Iterable<EOAttribute> attributes()
Ersatz
attributes
in class Ersatz
protected abstract Number getForeignKeyValue(EORelationship rel)
rel
- foreign key attributeprotected abstract void setForeignKeyValue(EORelationship rel, Number val)
rel
- relationship to set value forval
- ID of an object referenced by the relationshippublic Object get(EOAttribute att)
Ersatz
Ersatz.attributes()
.public void put(EOAttribute att, Object value)
Ersatz
public static Object getAttribute(org.neo4j.graphdb.PropertyContainer container, EOAttribute att)
container
- att
- protected static void setAttribute(org.neo4j.graphdb.PropertyContainer pc, EOAttribute att, Object value)
public void remove(EOAttribute att)
Ersatz
Copyright © 2002 – 2024 Project Wonder.