private boolean innerNext() { if ( txStateChangedProperties != null ) { if ( txStateChangedProperties.hasNext() ) { txStateValue = txStateChangedProperties.next(); return true; } else { txStateChangedProperties = null; txStateValue = null; } } while ( storeCursor.next() ) { boolean skip = propertiesState != null && propertiesState.isPropertyChangedOrRemoved( storeCursor.propertyKey() ); if ( !skip ) { return true; } } return false; }
private Value committedValue( StoragePropertyCursor properties, long propertiesReference, int propertyKey ) { properties.init( propertiesReference ); while ( properties.next() ) { if ( properties.propertyKey() == propertyKey ) { return properties.propertyValue(); } } return Values.NO_VALUE; }
boolean hasRelevantProperty( CURSOR cursor, EntityUpdates.Builder updates ) { if ( !cursor.hasProperties() ) { return false; } boolean hasRelevantProperty = false; propertyCursor.init( cursor.propertiesReference() ); while ( propertyCursor.next() ) { int propertyKeyId = propertyCursor.propertyKey(); if ( propertyKeyIdFilter.test( propertyKeyId ) ) { // This relationship has a property of interest to us Value value = propertyCursor.propertyValue(); // No need to validate values before passing them to the updater since the index implementation // is allowed to fail in which ever way it wants to. The result of failure will be the same as // a failed validation, i.e. population FAILED. updates.added( propertyKeyId, value ); hasRelevantProperty = true; } } return hasRelevantProperty; }
private StorageProperty getProperty( int key, long propertyId ) { try ( StoragePropertyCursor propertyCursor = storageReader.allocatePropertyCursor() ) { propertyCursor.init( propertyId ); if ( propertyCursor.next() ) { Value oldValue = propertyCursor.propertyValue(); if ( oldValue != null ) { return new PropertyKeyValue( key, oldValue ); } } } return null; }
void visitProperties( T record, InputEntityVisitor visitor ) { if ( !requiresPropertyMigration ) { visitor.propertyId( record.propertiesReference() ); } else { storePropertyCursor.init( record.propertiesReference() ); while ( storePropertyCursor.next() ) { // add key as int here as to have the importer use the token id visitor.property( storePropertyCursor.propertyKey(), storePropertyCursor.propertyValue().asObject() ); } storePropertyCursor.close(); } }
if ( props.next() )
private boolean innerNext() { if ( txStateChangedProperties != null ) { if ( txStateChangedProperties.hasNext() ) { txStateValue = txStateChangedProperties.next(); return true; } else { txStateChangedProperties = null; txStateValue = null; } } while ( storeCursor.next() ) { boolean skip = propertiesState != null && propertiesState.isPropertyChangedOrRemoved( storeCursor.propertyKey() ); if ( !skip ) { return true; } } return false; }
private Value committedValue( StoragePropertyCursor properties, long propertiesReference, int propertyKey ) { properties.init( propertiesReference ); while ( properties.next() ) { if ( properties.propertyKey() == propertyKey ) { return properties.propertyValue(); } } return Values.NO_VALUE; }
boolean hasRelevantProperty( CURSOR cursor, EntityUpdates.Builder updates ) { if ( !cursor.hasProperties() ) { return false; } boolean hasRelevantProperty = false; propertyCursor.init( cursor.propertiesReference() ); while ( propertyCursor.next() ) { int propertyKeyId = propertyCursor.propertyKey(); if ( propertyKeyIdFilter.test( propertyKeyId ) ) { // This relationship has a property of interest to us Value value = propertyCursor.propertyValue(); // No need to validate values before passing them to the updater since the index implementation // is allowed to fail in which ever way it wants to. The result of failure will be the same as // a failed validation, i.e. population FAILED. updates.added( propertyKeyId, value ); hasRelevantProperty = true; } } return hasRelevantProperty; }
void visitProperties( T record, InputEntityVisitor visitor ) { if ( !requiresPropertyMigration ) { visitor.propertyId( record.propertiesReference() ); } else { storePropertyCursor.init( record.propertiesReference() ); while ( storePropertyCursor.next() ) { // add key as int here as to have the importer use the token id visitor.property( storePropertyCursor.propertyKey(), storePropertyCursor.propertyValue().asObject() ); } storePropertyCursor.close(); } }