-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
NodeCheckType.java
46 lines (38 loc) · 1.16 KB
/
NodeCheckType.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package org.neo4j.tools.txlog.checktypes;
import java.util.Objects;
import org.neo4j.kernel.impl.store.record.NodeRecord;
import org.neo4j.kernel.impl.transaction.command.Command;
class NodeCheckType extends CheckType<Command.NodeCommand,NodeRecord>
{
NodeCheckType()
{
super( Command.NodeCommand.class );
}
@Override
public NodeRecord before( Command.NodeCommand command )
{
return command.getBefore();
}
@Override
public NodeRecord after( Command.NodeCommand command )
{
return command.getAfter();
}
@Override
public boolean equal( NodeRecord record1, NodeRecord record2 )
{
Objects.requireNonNull( record1 );
Objects.requireNonNull( record2 );
return record1.getId() == record2.getId() &&
record1.inUse() == record2.inUse() &&
record1.getNextProp() == record2.getNextProp() &&
record1.getNextRel() == record2.getNextRel() &&
record1.isDense() == record2.isDense() &&
record1.getLabelField() == record2.getLabelField();
}
@Override
public String name()
{
return "node";
}
}