use of org.neo4j.kernel.impl.index.IndexCommand.AddNodeCommand in project neo4j by neo4j.
the class LegacyIndexTransactionStateImpl method addNode.
@Override
public void addNode(String indexName, long id, String key, Object value) {
AddNodeCommand command = new AddNodeCommand();
command.init(definitions().getOrAssignIndexNameId(indexName), id, definitions().getOrAssignKeyId(key), value);
addCommand(indexName, command);
}
use of org.neo4j.kernel.impl.index.IndexCommand.AddNodeCommand in project neo4j by neo4j.
the class PhysicalLogCommandReaderV3_0 method visitIndexAddNodeCommand.
private Command visitIndexAddNodeCommand(ReadableChannel channel) throws IOException {
IndexCommandHeader header = readIndexCommandHeader(channel);
Number entityId = header.entityIdNeedsLong ? channel.getLong() : channel.getInt();
Object value = readIndexValue(header.valueType, channel);
AddNodeCommand command = new AddNodeCommand();
command.init(header.indexNameId, entityId.longValue(), header.keyId, value);
return command;
}
use of org.neo4j.kernel.impl.index.IndexCommand.AddNodeCommand in project neo4j by neo4j.
the class LuceneCommandApplierTest method addNodeToIndex.
private static AddNodeCommand addNodeToIndex(IndexDefineCommand definitions, String indexName, long nodeId) {
AddNodeCommand command = new AddNodeCommand();
command.init(definitions.getOrAssignIndexNameId(indexName), nodeId, (byte) 0, "some value");
return command;
}
Aggregations