mongodb
Module Contents
alltypes
Module Contents
open
class
BaseDao
:
SimpleDao
<
DatabaseObject
>
Module Contents
BaseDao
(
datastore
:
Datastore
)
open
suspend
fun
<
Type
:
DatabaseObject
>
delete
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Unit
open
suspend
fun
<
Type
:
DatabaseObject
>
get
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Type
?
open
suspend
fun
<
Type
:
DatabaseObject
>
query
(
typeClass
:
Class
<
Type
>
)
:
Query
<
Type
>
open
suspend
fun
<
Type
:
DatabaseObject
>
save
(
instance
:
Type
)
:
Type
class
DatabaseModule
:
AbstractModule
Module Contents
DatabaseModule
(
host
:
String
,
port
:
Int
,
dbName
:
String
,
user
:
String
,
password
:
String
,
authDatabase
:
String
=
DEFAULT_AUTH_DB
)
protected
fun
configure
(
)
:
Unit
const
val
DEFAULT_AUTH_DB
:
String
abstract
class
DatabaseObject
Module Contents
DatabaseObject
(
)
open
var
id
:
String
open
var
version
:
Long
abstract
class
HasUserId
:
DatabaseObject
Module Contents
HasUserId
(
)
open
var
userId
:
String
?
class
IndexCreator
Module Contents
IndexCreator
(
datastore
:
Datastore
)
fun
ensureIndexes
(
)
:
Unit
kotlin.reflect.KClass
Module Contents
fun
<
reified
SuperType
:
Any
>
KClass
<
*
>
.
getSubTypes
(
)
:
List
<
KClass
<
out
SuperType
>
>
open
class
MockQuery
<
Type
>
:
Query
<
Type
>
Module Contents
MockQuery
(
vararg
data
:
Type
)
MockQuery
(
data
:
Collection
<
Type
>
=
Lists.newArrayList()
)
open
suspend
fun
find
(
)
:
Type
?
open
fun
limit
(
limit
:
Int
)
:
Query
<
Type
>
open
fun
order
(
field
:
String
)
:
Query
<
Type
>
open
suspend
fun
query
(
)
:
QueryResult
<
Type
>
open
fun
skip
(
skip
:
Int
)
:
Query
<
Type
>
open
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
suspend
fun
find
(
)
:
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
:
KProperty
<
Any
>
)
:
Query
<
Type
>
open
fun
order
(
field
:
String
)
:
Query
<
Type
>
open
suspend
fun
query
(
)
:
QueryResult
<
Type
>
open
fun
skip
(
skip
:
Int
)
:
Query
<
Type
>
open
fun
<
AllowedValueType
>
with
(
field
:
KProperty
<
Any
?
>
,
operation
:
Operation
<
AllowedValueType
>
,
value
:
AllowedValueType
)
:
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
suspend
fun
<
Type
:
ObjectBase
>
delete
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Unit
open
suspend
fun
<
Type
:
ObjectBase
>
delete
(
id
:
String
,
typeClass
:
KClass
<
Type
>
)
:
Unit
abstract
suspend
fun
<
Type
:
ObjectBase
>
get
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Type
?
open
suspend
fun
<
Type
:
ObjectBase
>
get
(
id
:
String
,
typeClass
:
KClass
<
Type
>
)
:
Type
?
abstract
suspend
fun
<
Type
:
ObjectBase
>
query
(
typeClass
:
Class
<
Type
>
)
:
Query
<
Type
>
open
suspend
fun
<
Type
:
ObjectBase
>
query
(
typeClass
:
KClass
<
Type
>
)
:
Query
<
Type
>
abstract
suspend
fun
<
Type
:
ObjectBase
>
save
(
instance
:
Type
)
:
Type
interface
SimpleTypeDao
<
ObjectBase
:
DatabaseObject
>
Module Contents
abstract
suspend
fun
delete
(
id
:
String
)
:
Unit
abstract
suspend
fun
get
(
id
:
String
)
:
ObjectBase
?
abstract
suspend
fun
query
(
)
:
Query
<
ObjectBase
>
abstract
suspend
fun
save
(
instance
:
ObjectBase
)
:
ObjectBase
open
class
SyncDaoWrapper
<
ObjectBase
:
DatabaseObject
>
Module Contents
SyncDaoWrapper
(
dao
:
SimpleDao
<
ObjectBase
>
)
fun
<
Type
:
ObjectBase
>
delete
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Unit
fun
<
Type
:
ObjectBase
>
get
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Type
?
fun
<
Type
:
ObjectBase
>
query
(
typeClass
:
Class
<
Type
>
)
:
Query
<
Type
>
fun
<
Type
:
ObjectBase
>
save
(
instance
:
Type
)
:
Type
open
class
SyncTypeDaoWrapper
<
ObjectBase
:
DatabaseObject
>
Module Contents
SyncTypeDaoWrapper
(
dao
:
SimpleTypeDao
<
ObjectBase
>
)
fun
delete
(
id
:
String
)
:
Unit
fun
get
(
id
:
String
)
:
ObjectBase
?
fun
query
(
)
:
Query
<
ObjectBase
>
fun
save
(
object
:
ObjectBase
)
:
ObjectBase
open
class
TypeDao
<
Type
:
DatabaseObject
>
:
SimpleTypeDao
<
Type
>
Module Contents
TypeDao
(
baseDao
:
BaseDao
,
typeClass
:
KClass
<
Type
>
)
TypeDao
(
baseDao
:
BaseDao
,
@Named
(
"NAMED_TYPE_INJECT_PARAM"
)
typeClass
:
Class
<
Type
>
)
open
suspend
fun
delete
(
id
:
String
)
:
Unit
open
suspend
fun
get
(
id
:
String
)
:
Type
?
const
val
NAMED_TYPE_INJECT_PARAM
:
String
open
suspend
fun
query
(
)
:
Query
<
Type
>
open
suspend
fun
save
(
instance
:
Type
)
:
Type
open
class
TypeUserDao
<
Type
:
HasUserId
>
:
SimpleTypeDao
<
Type
>
Module Contents
TypeUserDao
(
userDao
:
UserDao
,
typeClass
:
KClass
<
Type
>
)
TypeUserDao
(
userDao
:
UserDao
,
typeClass
:
Class
<
Type
>
)
open
suspend
fun
delete
(
id
:
String
)
:
Unit
open
suspend
fun
get
(
id
:
String
)
:
Type
?
open
suspend
fun
query
(
)
:
Query
<
Type
>
open
suspend
fun
save
(
instance
:
Type
)
:
Type
open
class
UserDao
:
SimpleDao
<
HasUserId
>
Module Contents
UserDao
(
baseDao
:
BaseDao
,
@Named
(
"User_Inject"
)
user
:
String
)
open
suspend
fun
<
Type
:
HasUserId
>
delete
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Unit
open
suspend
fun
<
Type
:
HasUserId
>
get
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Type
?
open
suspend
fun
<
Type
:
HasUserId
>
query
(
typeClass
:
Class
<
Type
>
)
:
Query
<
Type
>
open
suspend
fun
<
Type
:
HasUserId
>
save
(
instance
:
Type
)
:
Type
const
val
USER_INJECT
:
String
package
de.comhix.database.config
Module Contents
class
DatabaseModule
:
AbstractModule
Module Contents
DatabaseModule
(
host
:
String
,
port
:
Int
,
dbName
:
String
,
user
:
String
,
password
:
String
,
authDatabase
:
String
=
DEFAULT_AUTH_DB
)
protected
fun
configure
(
)
:
Unit
const
val
DEFAULT_AUTH_DB
:
String
package
de.comhix.database.dao
Module Contents
open
class
BaseDao
:
SimpleDao
<
DatabaseObject
>
Module Contents
BaseDao
(
datastore
:
Datastore
)
open
suspend
fun
<
Type
:
DatabaseObject
>
delete
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Unit
open
suspend
fun
<
Type
:
DatabaseObject
>
get
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Type
?
open
suspend
fun
<
Type
:
DatabaseObject
>
query
(
typeClass
:
Class
<
Type
>
)
:
Query
<
Type
>
open
suspend
fun
<
Type
:
DatabaseObject
>
save
(
instance
:
Type
)
:
Type
open
class
Query
<
Type
>
Module Contents
protected
Query
(
)
Query
(
typeClass
:
Class
<
Type
>
,
datastore
:
Datastore
)
open
suspend
fun
find
(
)
:
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
:
KProperty
<
Any
>
)
:
Query
<
Type
>
open
fun
order
(
field
:
String
)
:
Query
<
Type
>
open
suspend
fun
query
(
)
:
QueryResult
<
Type
>
open
fun
skip
(
skip
:
Int
)
:
Query
<
Type
>
open
fun
<
AllowedValueType
>
with
(
field
:
KProperty
<
Any
?
>
,
operation
:
Operation
<
AllowedValueType
>
,
value
:
AllowedValueType
)
:
Query
<
Type
>
open
fun
<
AllowedValueType
>
with
(
field
:
String
,
operation
:
Operation
<
AllowedValueType
>
,
value
:
AllowedValueType
)
:
Query
<
Type
>
interface
SimpleDao
<
ObjectBase
:
DatabaseObject
>
Module Contents
abstract
suspend
fun
<
Type
:
ObjectBase
>
delete
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Unit
open
suspend
fun
<
Type
:
ObjectBase
>
delete
(
id
:
String
,
typeClass
:
KClass
<
Type
>
)
:
Unit
abstract
suspend
fun
<
Type
:
ObjectBase
>
get
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Type
?
open
suspend
fun
<
Type
:
ObjectBase
>
get
(
id
:
String
,
typeClass
:
KClass
<
Type
>
)
:
Type
?
abstract
suspend
fun
<
Type
:
ObjectBase
>
query
(
typeClass
:
Class
<
Type
>
)
:
Query
<
Type
>
open
suspend
fun
<
Type
:
ObjectBase
>
query
(
typeClass
:
KClass
<
Type
>
)
:
Query
<
Type
>
abstract
suspend
fun
<
Type
:
ObjectBase
>
save
(
instance
:
Type
)
:
Type
interface
SimpleTypeDao
<
ObjectBase
:
DatabaseObject
>
Module Contents
abstract
suspend
fun
delete
(
id
:
String
)
:
Unit
abstract
suspend
fun
get
(
id
:
String
)
:
ObjectBase
?
abstract
suspend
fun
query
(
)
:
Query
<
ObjectBase
>
abstract
suspend
fun
save
(
instance
:
ObjectBase
)
:
ObjectBase
open
class
SyncDaoWrapper
<
ObjectBase
:
DatabaseObject
>
Module Contents
SyncDaoWrapper
(
dao
:
SimpleDao
<
ObjectBase
>
)
fun
<
Type
:
ObjectBase
>
delete
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Unit
fun
<
Type
:
ObjectBase
>
get
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Type
?
fun
<
Type
:
ObjectBase
>
query
(
typeClass
:
Class
<
Type
>
)
:
Query
<
Type
>
fun
<
Type
:
ObjectBase
>
save
(
instance
:
Type
)
:
Type
open
class
SyncTypeDaoWrapper
<
ObjectBase
:
DatabaseObject
>
Module Contents
SyncTypeDaoWrapper
(
dao
:
SimpleTypeDao
<
ObjectBase
>
)
fun
delete
(
id
:
String
)
:
Unit
fun
get
(
id
:
String
)
:
ObjectBase
?
fun
query
(
)
:
Query
<
ObjectBase
>
fun
save
(
object
:
ObjectBase
)
:
ObjectBase
open
class
TypeDao
<
Type
:
DatabaseObject
>
:
SimpleTypeDao
<
Type
>
Module Contents
TypeDao
(
baseDao
:
BaseDao
,
typeClass
:
KClass
<
Type
>
)
TypeDao
(
baseDao
:
BaseDao
,
@Named
(
"NAMED_TYPE_INJECT_PARAM"
)
typeClass
:
Class
<
Type
>
)
open
suspend
fun
delete
(
id
:
String
)
:
Unit
open
suspend
fun
get
(
id
:
String
)
:
Type
?
const
val
NAMED_TYPE_INJECT_PARAM
:
String
open
suspend
fun
query
(
)
:
Query
<
Type
>
open
suspend
fun
save
(
instance
:
Type
)
:
Type
fun
<
reified
Type
:
DatabaseObject
>
TypeDao
(
baseDao
:
BaseDao
)
:
TypeDao
<
Type
>
open
class
TypeUserDao
<
Type
:
HasUserId
>
:
SimpleTypeDao
<
Type
>
Module Contents
TypeUserDao
(
userDao
:
UserDao
,
typeClass
:
KClass
<
Type
>
)
TypeUserDao
(
userDao
:
UserDao
,
typeClass
:
Class
<
Type
>
)
open
suspend
fun
delete
(
id
:
String
)
:
Unit
open
suspend
fun
get
(
id
:
String
)
:
Type
?
open
suspend
fun
query
(
)
:
Query
<
Type
>
open
suspend
fun
save
(
instance
:
Type
)
:
Type
open
class
UserDao
:
SimpleDao
<
HasUserId
>
Module Contents
UserDao
(
baseDao
:
BaseDao
,
@Named
(
"User_Inject"
)
user
:
String
)
open
suspend
fun
<
Type
:
HasUserId
>
delete
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Unit
open
suspend
fun
<
Type
:
HasUserId
>
get
(
id
:
String
,
typeClass
:
Class
<
Type
>
)
:
Type
?
open
suspend
fun
<
Type
:
HasUserId
>
query
(
typeClass
:
Class
<
Type
>
)
:
Query
<
Type
>
open
suspend
fun
<
Type
:
HasUserId
>
save
(
instance
:
Type
)
:
Type
const
val
USER_INJECT
:
String
package
de.comhix.database.dao.test
Module Contents
open
class
MockQuery
<
Type
>
:
Query
<
Type
>
Module Contents
MockQuery
(
vararg
data
:
Type
)
MockQuery
(
data
:
Collection
<
Type
>
=
Lists.newArrayList()
)
open
suspend
fun
find
(
)
:
Type
?
open
fun
limit
(
limit
:
Int
)
:
Query
<
Type
>
open
fun
order
(
field
:
String
)
:
Query
<
Type
>
open
suspend
fun
query
(
)
:
QueryResult
<
Type
>
open
fun
skip
(
skip
:
Int
)
:
Query
<
Type
>
open
fun
<
AllowedValueType
>
with
(
field
:
String
,
operation
:
Operation
<
AllowedValueType
>
,
value
:
AllowedValueType
)
:
Query
<
Type
>
package
de.comhix.database.objects
Module Contents
abstract
class
DatabaseObject
Module Contents
DatabaseObject
(
)
open
var
id
:
String
open
var
version
:
Long
abstract
class
HasUserId
:
DatabaseObject
Module Contents
HasUserId
(
)
open
var
userId
:
String
?
class
QueryResult
<
Type
>
:
ForwardingList
<
Type
>
Module Contents
QueryResult
(
objects
:
List
<
Type
>
,
count
:
Long
=
objects.size.toLong()
)
val
count
:
Long
protected
fun
delegate
(
)
:
List
<
Type
>
package
de.comhix.database.utility
Module Contents
class
IndexCreator
Module Contents
IndexCreator
(
datastore
:
Datastore
)
fun
ensureIndexes
(
)
:
Unit
kotlin.reflect.KClass
Module Contents
fun
<
reified
SuperType
:
Any
>
KClass
<
*
>
.
getSubTypes
(
)
:
List
<
KClass
<
out
SuperType
>
>
val
reflections
:
Reflections