All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.neo4j.kernel.impl.transaction.command.CommandSet Maven / Gradle / Ivy

/*
 * Copyright (c) 2002-2015 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.kernel.impl.transaction.command;

import java.util.ArrayList;
import java.util.Map;
import java.util.TreeMap;

import org.neo4j.kernel.impl.store.record.NeoStoreRecord;

public class CommandSet
{
    private final Map nodeCommands = new TreeMap<>();
    private final ArrayList propCommands = new ArrayList<>();
    private final ArrayList relCommands = new ArrayList<>();
    private final ArrayList schemaRuleCommands = new ArrayList<>();
    private final ArrayList relGroupCommands = new ArrayList<>();
    private final ArrayList relationshipTypeTokenCommands = new ArrayList<>();
    private final ArrayList labelTokenCommands = new ArrayList<>();
    private final ArrayList propertyKeyTokenCommands = new ArrayList<>();
    private final org.neo4j.kernel.impl.transaction.command.Command.NeoStoreCommand neoStoreCommand = new Command.NeoStoreCommand();

    public Map getNodeCommands()
    {
        return nodeCommands;
    }

    public ArrayList getPropCommands()
    {
        return propCommands;
    }

    public ArrayList getRelCommands()
    {
        return relCommands;
    }

    public ArrayList getSchemaRuleCommands()
    {
        return schemaRuleCommands;
    }

    public ArrayList getRelationshipTypeTokenCommands()
    {
        return relationshipTypeTokenCommands;
    }

    public ArrayList getLabelTokenCommands()
    {
        return labelTokenCommands;
    }

    public ArrayList getPropertyKeyTokenCommands()
    {
        return propertyKeyTokenCommands;
    }

    public void generateNeoStoreCommand( NeoStoreRecord neoStoreRecord )
    {
        neoStoreCommand.init( neoStoreRecord );
    }

    public Command.NeoStoreCommand getNeoStoreCommand()
    {
        return neoStoreCommand;
    }

    public ArrayList getRelGroupCommands()
    {
        return relGroupCommands;
    }

    public void close()
    {
        nodeCommands.clear();
        propCommands.clear();
        propertyKeyTokenCommands.clear();
        relCommands.clear();
        schemaRuleCommands.clear();
        relationshipTypeTokenCommands.clear();
        labelTokenCommands.clear();
        relGroupCommands.clear();
        neoStoreCommand.init( null );
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy