|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NeoStoreTransaction
A connection to a PersistenceSource
. ResourceConnection
contains operations to retrieve the XAResource
for this connection and to close the connection, optionally returning it to a
connection pool.
Method Summary | |
---|---|
void |
createPropertyIndex(String key,
int id)
Creates a property index entry out of the given id and string. |
void |
createRelationshipType(int id,
String name)
Creates a new RelationshipType record with the given id that has the given name. |
void |
destroy()
Destroy this transaction. |
RelIdArray |
getCreatedNodes()
Returns an array view of the ids of the nodes that have been created in this transaction. |
int |
getKeyIdForProperty(PropertyData property)
Returns the index key ids that are contained within the property record with the specified id. |
Pair<Map<RelIdArray.DirectionWrapper,Iterable<RelationshipRecord>>,Long> |
getMoreRelationships(long nodeId,
long position)
|
long |
getRelationshipChainPosition(long nodeId)
|
XAResource |
getXAResource()
Returns the XAResource that represents this
connection. |
boolean |
isNodeCreated(long nodeId)
Check if the node with the given id was created in this transaction. |
boolean |
isRelationshipCreated(long relId)
Check if the node with the given id was created in this transaction. |
String |
loadIndex(int id)
Loads the value object for the given property index record id if the record is light. |
PropertyIndexData[] |
loadPropertyIndexes(int maxCount)
Tries to load as heavy records as many property index records as specified in the argument. |
Object |
loadPropertyValue(PropertyData property)
Attempts to load the value off the store forthe given PropertyData object. |
RelationshipTypeData[] |
loadRelationshipTypes()
Loads and returns all the available RelationshipTypes that are stored. |
PropertyData |
nodeAddProperty(long nodeId,
PropertyIndex index,
Object value)
Adds a property to the given node, with the given index and value. |
PropertyData |
nodeChangeProperty(long nodeId,
PropertyData index,
Object value)
Changes an existing property of the given node, with the given index to the passed value |
void |
nodeCreate(long id)
Creates a node for the given id |
ArrayMap<Integer,PropertyData> |
nodeDelete(long nodeId)
Deletes a node by its id, returning its properties which are now removed. |
boolean |
nodeLoadLight(long id)
Tries to load the light node with the given id, returns true on success. |
ArrayMap<Integer,PropertyData> |
nodeLoadProperties(long nodeId,
boolean light)
Loads the complete property chain for the given node and returns it as a map from property index id to property data. |
void |
nodeRemoveProperty(long nodeId,
PropertyData index)
Removes the given property identified by indexKeyId of the node with the given id. |
PropertyData |
relAddProperty(long relId,
PropertyIndex index,
Object value)
Adds a property to the given relationship, with the given index and value. |
void |
relationshipCreate(long id,
int typeId,
long startNodeId,
long endNodeId)
Creates a relationship with the given id, from the nodes identified by id and of type typeId |
PropertyData |
relChangeProperty(long relId,
PropertyData index,
Object value)
Changes an existing property's value of the given relationship, with the given index to the passed value |
ArrayMap<Integer,PropertyData> |
relDelete(long relId)
Deletes a relationship by its id, returning its properties which are now removed. |
RelationshipRecord |
relLoadLight(long id)
Tries to load the light relationship with the given id, returns the record on success. |
ArrayMap<Integer,PropertyData> |
relLoadProperties(long relId,
boolean light)
Loads the complete property chain for the given relationship and returns it as a map from property index id to property data. |
void |
relRemoveProperty(long relId,
PropertyData index)
Removes the given property identified by its index from the relationship with the given id. |
void |
setXaConnection(XaConnection connection)
|
Method Detail |
---|
void setXaConnection(XaConnection connection)
XAResource getXAResource()
XAResource
that represents this
connection.
XAResource
for this connectionvoid destroy()
ArrayMap<Integer,PropertyData> nodeDelete(long nodeId)
nodeId
- The id of the node to delete.
PropertyData nodeAddProperty(long nodeId, PropertyIndex index, Object value)
nodeId
- The id of the node to which to add the property.index
- The index of the key of the property to add.value
- The value of the property.
PropertyData nodeChangeProperty(long nodeId, PropertyData index, Object value)
nodeId
- The id of the node which holds the property to change.index
- The index of the key of the property to change.value
- The new value of the property.
void nodeRemoveProperty(long nodeId, PropertyData index)
nodeId
- The id of the node that is to have the property removed.index
- The index key of the property.void nodeCreate(long id)
id
- The id of the node to create.void relationshipCreate(long id, int typeId, long startNodeId, long endNodeId)
id
- The id of the relationship to create.typeId
- The id of the relationship type this relationship will
have.startNodeId
- The id of the start node.endNodeId
- The id of the end node.ArrayMap<Integer,PropertyData> relDelete(long relId)
relId
- The id of the relationship to delete.
PropertyData relAddProperty(long relId, PropertyIndex index, Object value)
relId
- The id of the relationship to which to add the property.index
- The index of the key of the property to add.value
- The value of the property.
PropertyData relChangeProperty(long relId, PropertyData index, Object value)
relId
- The id of the relationship which holds the property to
change.index
- The index of the key of the property to change.value
- The new value of the property.
void relRemoveProperty(long relId, PropertyData index)
relId
- The id of the relationship that is to have the property
removed.index
- The index key of the property.boolean nodeLoadLight(long id)
id
- The id of the node to load.
Object loadPropertyValue(PropertyData property)
property
- The property to make heavy
String loadIndex(int id)
id
- The id of the property index record to make heavy
PropertyIndexData[] loadPropertyIndexes(int maxCount)
maxCount
- The maximum number of property index records to load.
ArrayMap<Integer,PropertyData> nodeLoadProperties(long nodeId, boolean light)
nodeId
- The id of the node whose properties to load.light
- If the properties should be loaded light or not.
ArrayMap<Integer,PropertyData> relLoadProperties(long relId, boolean light)
relId
- The id of the relationship whose properties to load.light
- If the properties should be loaded light or not.
RelationshipRecord relLoadLight(long id)
id
- The id of the relationship to load.
RelationshipTypeData[] loadRelationshipTypes()
void createPropertyIndex(String key, int id)
key
- The key of the property index, as a string.id
- The property index record id.void createRelationshipType(int id, String name)
id
- The id of the new relationship type record.name
- The name of the relationship type.long getRelationshipChainPosition(long nodeId)
Pair<Map<RelIdArray.DirectionWrapper,Iterable<RelationshipRecord>>,Long> getMoreRelationships(long nodeId, long position)
RelIdArray getCreatedNodes()
boolean isNodeCreated(long nodeId)
nodeId
- The node id to check.
boolean isRelationshipCreated(long relId)
nodeId
- The node id to check.
int getKeyIdForProperty(PropertyData property)
property
- The PropertyData of the property record.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |