Search in sources :

Example 6 with PropertyStore

use of org.neo4j.kernel.impl.nioneo.store.PropertyStore in project graphdb by neo4j-attic.

the class BatchInserterImpl method getPropertyChain.

private Map<String, Object> getPropertyChain(long propertyId) {
    PropertyStore propStore = getPropertyStore();
    PropertyRecord propertyRecord = propStore.getRecord(propertyId);
    long nextProperty = -1;
    Map<String, Object> properties = new HashMap<String, Object>();
    do {
        nextProperty = propertyRecord.getNextProp();
        propStore.makeHeavy(propertyRecord);
        String key = indexHolder.getStringKey(propertyRecord.getKeyIndexId());
        Object value = propStore.getValue(propertyRecord);
        properties.put(key, value);
        if (nextProperty != Record.NO_NEXT_PROPERTY.intValue()) {
            propertyRecord = propStore.getRecord(propertyRecord.getNextProp());
        }
    } while (nextProperty != Record.NO_NEXT_PROPERTY.intValue());
    return properties;
}
Also used : PropertyRecord(org.neo4j.kernel.impl.nioneo.store.PropertyRecord) HashMap(java.util.HashMap) PropertyStore(org.neo4j.kernel.impl.nioneo.store.PropertyStore)

Aggregations

PropertyRecord (org.neo4j.kernel.impl.nioneo.store.PropertyRecord)6 PropertyStore (org.neo4j.kernel.impl.nioneo.store.PropertyStore)6 PropertyBlock (org.neo4j.kernel.impl.nioneo.store.PropertyBlock)3 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 DynamicRecord (org.neo4j.kernel.impl.nioneo.store.DynamicRecord)2 PropertyStore.encodeString (org.neo4j.kernel.impl.nioneo.store.PropertyStore.encodeString)2 PropertyData (org.neo4j.kernel.impl.nioneo.store.PropertyData)1