code: protected BatchInserter getBatchInserter()
      {
          PersistenceUnitMetadata puMetadata = kunderaMetadata.getApplicationMetadata().getPersistenceUnitMetadata(
                  getPersistenceUnit());
          Properties props = puMetadata.getProperties();
  
          // Datastore file path
          String datastoreFilePath = (String) props.get(PersistenceProperties.KUNDERA_DATASTORE_FILE_PATH);
          if (StringUtils.isEmpty(datastoreFilePath))
          {
              throw new PersistenceException(
                      "For Neo4J, it's mandatory to specify kundera.datastore.file.path property in persistence.xml");
          }
  
          // Shut down Graph DB, at a time only one service may have lock on DB
          // file
          if (factory.getConnection() != null)
          {
              factory.getConnection().shutdown();
          }
  
          BatchInserter inserter = null;
  
          // Create Batch inserter with configuration if specified
          Neo4JSchemaMetadata nsmd = Neo4JPropertyReader.nsmd;
          ClientProperties cp = nsmd != null ? nsmd.getClientProperties() : null;
          if (cp != null)
          {
              DataStore dataStore = nsmd != null ? nsmd.getDataStore() : null;
              Properties properties = dataStore != null && dataStore.getConnection() != null ? dataStore.getConnection()
                      .getProperties() : null;
  
              if (properties != null)
              {
                  Map<String, String> config = new HashMap<String, String>((Map) properties);
                  inserter = BatchInserters.inserter(datastoreFilePath, config);
              }
          }
  
          // Create Batch inserter without configuration if not provided
          if (inserter == null)
          {
              inserter = BatchInserters.inserter(datastoreFilePath);
          }
          return inserter;
      }
docs: Returns instance of {@link BatchInserter}.
  
  @return the batch inserter