NeoCpp
libneo4j_factory.h
1 /*
2 Apache 2.0 License
3 
4 Copyright 2018 Alex Barry
5 
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9 
10  http://www.apache.org/licenses/LICENSE-2.0
11 
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17 */
18 
19 #include <string>
20 #include "neocpp/connection/interface/neo4j_interface.h"
21 #include "neocpp/connection/impl/neo4j_admin.h"
22 #include "neocpp/data/interface/query_parameter_interface.h"
23 #include "neocpp/data/impl/neo4j_query_parameter.h"
24 
25 #ifndef NEOCPP_CONNECTION_INTERFACE_LIBNEO4J_FACTORY_H_
26 #define NEOCPP_CONNECTION_INTERFACE_LIBNEO4J_FACTORY_H_
27 
28 namespace Neocpp {
29 
31 
36  public:
39 
42 
44  inline Neo4jInterface* get_neo4j_interface(const char * conn_string) {
45  return new Neo4jAdmin(conn_string);
46  }
47 
49  inline Neo4jInterface* get_neo4j_interface(std::string conn_string) {
50  return new Neo4jAdmin(conn_string);
51  }
52 
54  inline Neo4jInterface* get_neo4j_interface(const char * conn_str, \
55  bool secure) {
56  return new Neo4jAdmin(conn_str, secure);
57  }
58 
60  inline Neo4jInterface* get_neo4j_interface(std::string conn_str, \
61  bool secure) {
62  return new Neo4jAdmin(conn_str, secure);
63  }
64 
66  inline Neo4jInterface* get_neo4j_interface(const char * conn_str, \
67  bool secure, int pool_size) {
68  return new Neo4jAdmin(conn_str, secure, pool_size);
69  }
70 
72  inline Neo4jInterface* get_neo4j_interface(std::string conn_str, \
73  bool secure, int pool_size) {
74  return new Neo4jAdmin(conn_str, secure, pool_size);
75  }
76 
78  inline Neo4jInterface* get_neo4j_interface(const char * conn_str, \
79  bool secure, int pool_size, int pstart_size, int pbatch) {
80  return new Neo4jAdmin(conn_str, secure, pool_size, pstart_size, pbatch);
81  }
82 
84  inline Neo4jInterface* get_neo4j_interface(std::string conn_str, \
85  bool secure, int pool_size, int pstart_size, int pbatch) {
86  return new Neo4jAdmin(conn_str, secure, pool_size, pstart_size, pbatch);
87  }
88 
91  return new Neo4jQueryParameter();
92  }
93 
97  return new Neo4jQueryParameter(inp_bool);
98  }
99 
102  get_neo4j_query_parameter(std::string inp_str) {
103  return new Neo4jQueryParameter(inp_str);
104  }
105 
108  get_neo4j_query_parameter(const char * inp_str) {
109  return new Neo4jQueryParameter(inp_str);
110  }
111 
114  return new Neo4jQueryParameter(inp_int);
115  }
116 
119  get_neo4j_query_parameter(double inp_double) {
120  return new Neo4jQueryParameter(inp_double);
121  }
122 };
123 
124 } // namespace Neocpp
125 
126 #endif // NEOCPP_CONNECTION_INTERFACE_LIBNEO4J_FACTORY_H_
The libneo4j-client Factory.
Definition: libneo4j_factory.h:35
LibNeo4jFactory()
Create a new Service Component Factory.
Definition: libneo4j_factory.h:38
~LibNeo4jFactory()
Delete a Service Component Factory.
Definition: libneo4j_factory.h:41
Neo4jInterface * get_neo4j_interface(const char *conn_string)
Get a Neo4j Interface instance.
Definition: libneo4j_factory.h:44
Neo4jInterface * get_neo4j_interface(std::string conn_str, bool secure, int pool_size)
Get a Neo4j Interface instance.
Definition: libneo4j_factory.h:72
Neo4jInterface * get_neo4j_interface(const char *conn_str, bool secure, int pool_size, int pstart_size, int pbatch)
Get a Neo4j Interface instance.
Definition: libneo4j_factory.h:78
Neo4jInterface * get_neo4j_interface(const char *conn_str, bool secure, int pool_size)
Get a Neo4j Interface instance.
Definition: libneo4j_factory.h:66
Neo4jInterface * get_neo4j_interface(const char *conn_str, bool secure)
Get a Neo4j Interface instance.
Definition: libneo4j_factory.h:54
Neo4jInterface * get_neo4j_interface(std::string conn_str, bool secure, int pool_size, int pstart_size, int pbatch)
Get a Neo4j Interface instance.
Definition: libneo4j_factory.h:84
Neo4jQueryParameterInterface * get_neo4j_query_parameter()
Get a Neo4j Array Query Parameter.
Definition: libneo4j_factory.h:90
Neo4jQueryParameterInterface * get_neo4j_query_parameter(int inp_int)
Get a Neo4j Query Parameter.
Definition: libneo4j_factory.h:113
Definition: neo4j_interface.h:28
Neo4j Query Interface.
Definition: neo4j_interface.h:35
Neo4j Query Parameter Interface.
Definition: query_parameter_interface.h:32
Neo4jInterface * get_neo4j_interface(std::string conn_str, bool secure)
Get a Neo4j Interface instance.
Definition: libneo4j_factory.h:60
Neo4jInterface * get_neo4j_interface(std::string conn_string)
Get a Neo4j Interface instance.
Definition: libneo4j_factory.h:49