File tree 4 files changed +43
-3
lines changed
java/org/objectquery/mongodb
test/java/org/objectquery/mongodb/domain
4 files changed +43
-3
lines changed Original file line number Diff line number Diff line change
1
+ package org .objectquery .mongodb ;
2
+
3
+ import org .mongodb .morphia .Datastore ;
4
+ import org .objectquery .QueryEngine ;
5
+ import org .objectquery .QueryEngineFactory ;
6
+
7
+ import com .mongodb .DBCollection ;
8
+
9
+ public class MongoQueryEngineFactory implements QueryEngineFactory {
10
+
11
+ @ SuppressWarnings ("unchecked" )
12
+ @ Override
13
+ public <S > QueryEngine <S > createQueryEngine (Class <S > targetSession ) {
14
+ if (DBCollection .class .equals (targetSession ))
15
+ return createDefaultQueryEngine ();
16
+ if (Datastore .class .equals (targetSession ))
17
+ return (QueryEngine <S >) new MorphiaQueryEngine ();
18
+ return null ;
19
+ }
20
+
21
+ @ Override
22
+ @ SuppressWarnings ("unchecked" )
23
+ public <T > QueryEngine <T > createDefaultQueryEngine () {
24
+ return (QueryEngine <T >) new MongoDBQueryEngine ();
25
+ }
26
+
27
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ org.objectquery.mongodb.MongoQueryEngineFactory
Original file line number Diff line number Diff line change @@ -5,4 +5,19 @@ public class Window {
5
5
private int width ;
6
6
private int height ;
7
7
8
+ public int getHeight () {
9
+ return height ;
10
+ }
11
+
12
+ public void setHeight (int height ) {
13
+ this .height = height ;
14
+ }
15
+
16
+ public int getWidth () {
17
+ return width ;
18
+ }
19
+
20
+ public void setWidth (int width ) {
21
+ this .width = width ;
22
+ }
8
23
}
You can’t perform that action at this time.
0 commit comments