AOSharedServiceLibrary
factory_neo4j.h
1 /*
2 MIT License Block
3 
4 Copyright (c) 2016 Alex Barry
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12 
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15 
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 THE SOFTWARE.
23 */
24 
25 #ifndef AOSSL_NEO4J_INCLUDE_FACTORY_NEO4J_H_
26 #define AOSSL_NEO4J_INCLUDE_FACTORY_NEO4J_H_
27 
28 #include <string>
29 #include "neo4j_interface.h"
30 #include "neo4j_admin.h"
31 #include "neo4j_query_parameter.h"
32 
34 
40  public:
43 
46 
48  inline Neo4jInterface* get_neo4j_interface(const char * conn_string) {
49  return new Neo4jAdmin(conn_string);
50  }
51 
53  inline Neo4jInterface* get_neo4j_interface(std::string conn_string) {
54  return new Neo4jAdmin(conn_string);
55  }
56 
58  inline Neo4jInterface* get_neo4j_interface(const char * conn_str, \
59  bool secure) {
60  return new Neo4jAdmin(conn_str, secure);
61  }
62 
64  inline Neo4jInterface* get_neo4j_interface(std::string conn_str, \
65  bool secure) {
66  return new Neo4jAdmin(conn_str, secure);
67  }
68 
70  inline Neo4jInterface* get_neo4j_interface(const char * conn_str, \
71  bool secure, int pool_size) {
72  return new Neo4jAdmin(conn_str, secure, pool_size);
73  }
74 
76  inline Neo4jInterface* get_neo4j_interface(std::string conn_str, \
77  bool secure, int pool_size) {
78  return new Neo4jAdmin(conn_str, secure, pool_size);
79  }
80 
83  return new Neo4jQueryParameter();
84  }
85 
89  return new Neo4jQueryParameter(inp_bool);
90  }
91 
94  get_neo4j_query_parameter(std::string inp_str) {
95  return new Neo4jQueryParameter(inp_str);
96  }
97 
100  get_neo4j_query_parameter(const char * inp_str) {
101  return new Neo4jQueryParameter(inp_str);
102  }
103 
106  return new Neo4jQueryParameter(inp_int);
107  }
108 
111  get_neo4j_query_parameter(double inp_double) {
112  return new Neo4jQueryParameter(inp_double);
113  }
114 };
115 
116 #endif // AOSSL_NEO4J_INCLUDE_FACTORY_NEO4J_H_
Neo4jComponentFactory()
Create a new Service Component Factory.
Definition: factory_neo4j.h:42
Neo4jInterface * get_neo4j_interface(std::string conn_string)
Get a Neo4j Interface instance.
Definition: factory_neo4j.h:53
Neo4jInterface * get_neo4j_interface(std::string conn_str, bool secure)
Get a Neo4j Interface instance.
Definition: factory_neo4j.h:64
~Neo4jComponentFactory()
Delete a Service Component Factory.
Definition: factory_neo4j.h:45
Neo4j Query Interface.
Definition: neo4j_interface.h:311
Neo4jQueryParameterInterface * get_neo4j_query_parameter(int inp_int)
Get a Neo4j Query Parameter.
Definition: factory_neo4j.h:105
Neo4jInterface * get_neo4j_interface(std::string conn_str, bool secure, int pool_size)
Get a Neo4j Interface instance.
Definition: factory_neo4j.h:76
Neo4j Query Parameter Interface.
Definition: neo4j_interface.h:247
The Neo4j Service Component Factory.
Definition: factory_neo4j.h:39
Neo4jInterface * get_neo4j_interface(const char *conn_str, bool secure, int pool_size)
Get a Neo4j Interface instance.
Definition: factory_neo4j.h:70
Neo4jInterface * get_neo4j_interface(const char *conn_str, bool secure)
Get a Neo4j Interface instance.
Definition: factory_neo4j.h:58
Neo4jQueryParameterInterface * get_neo4j_query_parameter()
Get a Neo4j Array Query Parameter.
Definition: factory_neo4j.h:82
Neo4jInterface * get_neo4j_interface(const char *conn_string)
Get a Neo4j Interface instance.
Definition: factory_neo4j.h:48