1 /*********************************************************************************
2 * Copyright © 2015, highstreet technologies GmbH
5 * http://www.highstreet-technologies.com/
7 * The reproduction, transmission or use of this document or its contents is not
8 * permitted without express written authority. Offenders will be liable for
9 * damages. All rights, including rights created by patent grant or registration
10 * of a utility model or design, are reserved. Technical modifications possible.
11 * Technical specifications and features are binding only insofar as they are
12 * specifically and expressly agreed upon in a written contract.
14 * @author: Martin Skorupski [martin@skorupski.de]
15 *********************************************************************************/
16 package org.opendaylight.mwtn.base.database;
18 import org.elasticsearch.client.Client;
19 import org.elasticsearch.common.bytes.BytesReference;
20 import org.elasticsearch.index.query.QueryBuilder;
21 import org.elasticsearch.search.SearchHit;
25 * Interface, used by access one object
29 public interface HtDataBase {
31 String getNetworkIndex();
32 void setNetworkIndex(String networkIndex);
37 public BytesReference doReadJsonData( String dataTypeName, IsEsObject esId );
38 public SearchHit[] doReadAllJsonData( int start, int length, String dataTypeName );
39 public SearchHit[] doReadByQueryJsonData( int start, int length, String dataTypeName, QueryBuilder query);
41 public String doWrite( String dataTypeName, IsEsObject esId, byte[] json);
42 public String doWrite( String dataTypeName, IsEsObject esId, String json);
44 public boolean doRemove( String dataTypeName, IsEsObject esId );