mongodb
Module Contents
alltypes
Module Contents
class
BaseDao
:
SimpleDao
<
DatabaseObject
>
Module Contents
BaseDao
(
datastore
:
Datastore
)
fun
<
Type
:
DatabaseObject
>
delete
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Completable
fun
<
Type
:
DatabaseObject
>
get
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Maybe
<
Type
>
fun
<
Type
:
DatabaseObject
>
query
(
typeClass
:
Class
<
Type
>
)
:
Query
<
Type
>
fun
<
Type
:
DatabaseObject
>
save
(
instance
:
Type
)
:
Single
<
Type
>
class
DatabaseModule
:
AbstractModule
Module Contents
DatabaseModule
(
host
:
String
,
port
:
Int
,
dbName
:
String
,
user
:
String
?
=
null
,
password
:
String
?
=
null
,
authDatabase
:
String
=
DEFAULT_AUTH_DB
)
protected
fun
configure
(
)
:
Unit
const
val
DEFAULT_AUTH_DB
:
String
open
class
DatabaseObject
Module Contents
DatabaseObject
(
)
var
id
:
String
var
version
:
Long
class
MockQuery
<
Type
>
:
Query
<
Type
>
Module Contents
MockQuery
(
vararg
data
:
Type
)
MockQuery
(
data
:
Collection
<
Type
>
=
Lists.newArrayList()
)
fun
find
(
)
:
Maybe
<
Type
>
fun
limit
(
limit
:
Int
)
:
Query
<
Type
>
?
fun
order
(
field
:
String
?
)
:
Query
<
Type
>
?
fun
query
(
)
:
Single
<
QueryResult
<
Type
>
>
fun
skip
(
skip
:
Int
)
:
Query
<
Type
>
?
fun
<
AllowedValueType
>
with
(
field
:
String
?
,
operation
:
Operation
<
AllowedValueType
>
,
value
:
AllowedValueType
)
:
Query
<
Type
>
?
open
class
Query
<
Type
>
Module Contents
protected
Query
(
)
Query
(
typeClass
:
Class
<
Type
>
?
,
datastore
:
Datastore
)
open
fun
find
(
)
:
Maybe
<
Type
>
open
fun
limit
(
limit
:
Int
)
:
Query
<
Type
>
?
class
Operation
<
AllowedValueType
>
Module Contents
Operation
(
)
val
EQ
:
Operation
<
Any
>
val
EXISTS
:
Operation
<
Boolean
>
val
GEQ
:
Operation
<
Comparable
<
*
>
>
val
GT
:
Operation
<
Comparable
<
*
>
>
val
HAS
:
Operation
<
Any
>
val
HAS_ALL
:
Operation
<
Iterable
<
*
>
>
val
HAS_ANY
:
Operation
<
Iterable
<
*
>
>
val
HAS_NONE
:
Operation
<
Iterable
<
*
>
>
val
IN
:
Operation
<
Iterable
<
*
>
>
val
LEQ
:
Operation
<
Comparable
<
*
>
>
val
LT
:
Operation
<
Comparable
<
*
>
>
val
NEQ
:
Operation
<
Any
>
val
NOT_IN
:
Operation
<
Iterable
<
*
>
>
open
fun
order
(
field
:
String
?
)
:
Query
<
Type
>
?
open
fun
query
(
)
:
Single
<
QueryResult
<
Type
>
>
open
fun
skip
(
skip
:
Int
)
:
Query
<
Type
>
?
open
fun
<
AllowedValueType
>
with
(
field
:
String
?
,
operation
:
Operation
<
AllowedValueType
>
,
value
:
AllowedValueType
)
:
Query
<
Type
>
?
class
QueryResult
<
Type
>
:
ForwardingList
<
Type
>
Module Contents
QueryResult
(
objects
:
List
<
Type
>
,
count
:
Long
=
objects.size.toLong()
)
val
count
:
Long
protected
fun
delegate
(
)
:
List
<
Type
>
interface
SimpleDao
<
ObjectBase
:
DatabaseObject
>
Module Contents
abstract
fun
<
Type
:
ObjectBase
>
delete
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Completable
abstract
operator
fun
<
Type
:
ObjectBase
>
get
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Maybe
<
Type
>
abstract
fun
<
Type
:
ObjectBase
>
query
(
typeClass
:
Class
<
Type
>
)
:
Query
<
Type
>
abstract
fun
<
Type
:
ObjectBase
>
save
(
instance
:
Type
)
:
Single
<
Type
>
interface
SimpleTypeDao
<
ObjectBase
:
DatabaseObject
>
Module Contents
abstract
fun
delete
(
id
:
String
)
:
Completable
abstract
operator
fun
get
(
id
:
String
)
:
Maybe
<
ObjectBase
>
abstract
fun
query
(
)
:
Query
<
ObjectBase
>
abstract
fun
save
(
object
:
ObjectBase
)
:
Single
<
ObjectBase
>
class
TypeDao
<
Type
:
DatabaseObject
>
:
SimpleTypeDao
<
Type
>
Module Contents
TypeDao
(
baseDao
:
BaseDao
,
@Named
(
"NAMED_TYPE_INJECT_PARAM"
)
typeClass
:
Class
<
Type
>
)
fun
delete
(
id
:
String
)
:
Completable
operator
fun
get
(
id
:
String
)
:
Maybe
<
Type
>
const
val
NAMED_TYPE_INJECT_PARAM
:
String
fun
query
(
)
:
Query
<
Type
>
fun
save
(
object
:
Type
)
:
Single
<
Type
>
class
TypeUserDao
<
Type
:
UserDatabaseObject
>
:
SimpleTypeDao
<
Type
>
Module Contents
TypeUserDao
(
userDao
:
UserDao
,
typeClass
:
Class
<
Type
>
)
fun
delete
(
id
:
String
)
:
Completable
operator
fun
get
(
id
:
String
)
:
Maybe
<
Type
>
fun
query
(
)
:
Query
<
Type
>
fun
save
(
object
:
Type
)
:
Single
<
Type
>
class
UserDao
:
SimpleDao
<
UserDatabaseObject
>
Module Contents
UserDao
(
baseDao
:
BaseDao
,
@Named
(
"User_Inject"
)
user
:
String
)
fun
<
Type
:
UserDatabaseObject
>
delete
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Completable
fun
<
Type
:
UserDatabaseObject
>
get
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Maybe
<
Type
>
fun
<
Type
:
UserDatabaseObject
>
query
(
typeClass
:
Class
<
Type
>
)
:
Query
<
Type
>
fun
<
Type
:
UserDatabaseObject
>
save
(
instance
:
Type
)
:
Single
<
Type
>
const
val
USER_INJECT
:
String
open
class
UserDatabaseObject
:
DatabaseObject
Module Contents
UserDatabaseObject
(
)
var
user
:
String
?
package
de.comhix.database.config
Module Contents
class
DatabaseModule
:
AbstractModule
Module Contents
DatabaseModule
(
host
:
String
,
port
:
Int
,
dbName
:
String
,
user
:
String
?
=
null
,
password
:
String
?
=
null
,
authDatabase
:
String
=
DEFAULT_AUTH_DB
)
protected
fun
configure
(
)
:
Unit
const
val
DEFAULT_AUTH_DB
:
String
package
de.comhix.database.dao
Module Contents
class
BaseDao
:
SimpleDao
<
DatabaseObject
>
Module Contents
BaseDao
(
datastore
:
Datastore
)
fun
<
Type
:
DatabaseObject
>
delete
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Completable
fun
<
Type
:
DatabaseObject
>
get
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Maybe
<
Type
>
fun
<
Type
:
DatabaseObject
>
query
(
typeClass
:
Class
<
Type
>
)
:
Query
<
Type
>
fun
<
Type
:
DatabaseObject
>
save
(
instance
:
Type
)
:
Single
<
Type
>
open
class
Query
<
Type
>
Module Contents
protected
Query
(
)
Query
(
typeClass
:
Class
<
Type
>
?
,
datastore
:
Datastore
)
open
fun
find
(
)
:
Maybe
<
Type
>
open
fun
limit
(
limit
:
Int
)
:
Query
<
Type
>
?
class
Operation
<
AllowedValueType
>
Module Contents
Operation
(
)
val
EQ
:
Operation
<
Any
>
val
EXISTS
:
Operation
<
Boolean
>
val
GEQ
:
Operation
<
Comparable
<
*
>
>
val
GT
:
Operation
<
Comparable
<
*
>
>
val
HAS
:
Operation
<
Any
>
val
HAS_ALL
:
Operation
<
Iterable
<
*
>
>
val
HAS_ANY
:
Operation
<
Iterable
<
*
>
>
val
HAS_NONE
:
Operation
<
Iterable
<
*
>
>
val
IN
:
Operation
<
Iterable
<
*
>
>
val
LEQ
:
Operation
<
Comparable
<
*
>
>
val
LT
:
Operation
<
Comparable
<
*
>
>
val
NEQ
:
Operation
<
Any
>
val
NOT_IN
:
Operation
<
Iterable
<
*
>
>
open
fun
order
(
field
:
String
?
)
:
Query
<
Type
>
?
open
fun
query
(
)
:
Single
<
QueryResult
<
Type
>
>
open
fun
skip
(
skip
:
Int
)
:
Query
<
Type
>
?
open
fun
<
AllowedValueType
>
with
(
field
:
String
?
,
operation
:
Operation
<
AllowedValueType
>
,
value
:
AllowedValueType
)
:
Query
<
Type
>
?
interface
SimpleDao
<
ObjectBase
:
DatabaseObject
>
Module Contents
abstract
fun
<
Type
:
ObjectBase
>
delete
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Completable
abstract
operator
fun
<
Type
:
ObjectBase
>
get
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Maybe
<
Type
>
abstract
fun
<
Type
:
ObjectBase
>
query
(
typeClass
:
Class
<
Type
>
)
:
Query
<
Type
>
abstract
fun
<
Type
:
ObjectBase
>
save
(
instance
:
Type
)
:
Single
<
Type
>
interface
SimpleTypeDao
<
ObjectBase
:
DatabaseObject
>
Module Contents
abstract
fun
delete
(
id
:
String
)
:
Completable
abstract
operator
fun
get
(
id
:
String
)
:
Maybe
<
ObjectBase
>
abstract
fun
query
(
)
:
Query
<
ObjectBase
>
abstract
fun
save
(
object
:
ObjectBase
)
:
Single
<
ObjectBase
>
class
TypeDao
<
Type
:
DatabaseObject
>
:
SimpleTypeDao
<
Type
>
Module Contents
TypeDao
(
baseDao
:
BaseDao
,
@Named
(
"NAMED_TYPE_INJECT_PARAM"
)
typeClass
:
Class
<
Type
>
)
fun
delete
(
id
:
String
)
:
Completable
operator
fun
get
(
id
:
String
)
:
Maybe
<
Type
>
const
val
NAMED_TYPE_INJECT_PARAM
:
String
fun
query
(
)
:
Query
<
Type
>
fun
save
(
object
:
Type
)
:
Single
<
Type
>
class
TypeUserDao
<
Type
:
UserDatabaseObject
>
:
SimpleTypeDao
<
Type
>
Module Contents
TypeUserDao
(
userDao
:
UserDao
,
typeClass
:
Class
<
Type
>
)
fun
delete
(
id
:
String
)
:
Completable
operator
fun
get
(
id
:
String
)
:
Maybe
<
Type
>
fun
query
(
)
:
Query
<
Type
>
fun
save
(
object
:
Type
)
:
Single
<
Type
>
class
UserDao
:
SimpleDao
<
UserDatabaseObject
>
Module Contents
UserDao
(
baseDao
:
BaseDao
,
@Named
(
"User_Inject"
)
user
:
String
)
fun
<
Type
:
UserDatabaseObject
>
delete
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Completable
fun
<
Type
:
UserDatabaseObject
>
get
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Maybe
<
Type
>
fun
<
Type
:
UserDatabaseObject
>
query
(
typeClass
:
Class
<
Type
>
)
:
Query
<
Type
>
fun
<
Type
:
UserDatabaseObject
>
save
(
instance
:
Type
)
:
Single
<
Type
>
const
val
USER_INJECT
:
String
package
de.comhix.database.dao.test
Module Contents
class
MockQuery
<
Type
>
:
Query
<
Type
>
Module Contents
MockQuery
(
vararg
data
:
Type
)
MockQuery
(
data
:
Collection
<
Type
>
=
Lists.newArrayList()
)
fun
find
(
)
:
Maybe
<
Type
>
fun
limit
(
limit
:
Int
)
:
Query
<
Type
>
?
fun
order
(
field
:
String
?
)
:
Query
<
Type
>
?
fun
query
(
)
:
Single
<
QueryResult
<
Type
>
>
fun
skip
(
skip
:
Int
)
:
Query
<
Type
>
?
fun
<
AllowedValueType
>
with
(
field
:
String
?
,
operation
:
Operation
<
AllowedValueType
>
,
value
:
AllowedValueType
)
:
Query
<
Type
>
?
package
de.comhix.database.objects
Module Contents
open
class
DatabaseObject
Module Contents
DatabaseObject
(
)
var
id
:
String
var
version
:
Long
class
QueryResult
<
Type
>
:
ForwardingList
<
Type
>
Module Contents
QueryResult
(
objects
:
List
<
Type
>
,
count
:
Long
=
objects.size.toLong()
)
val
count
:
Long
protected
fun
delegate
(
)
:
List
<
Type
>
open
class
UserDatabaseObject
:
DatabaseObject
Module Contents
UserDatabaseObject
(
)
var
user
:
String
?