EntityConverter<T> class
abstract
An abstract class that is used to convert an entity of type T
into a database Document and vice versa.
- Inheritance
-
- Object
- NitritePlugin
- EntityConverter
Constructors
Properties
- entityType → Type
-
Gets the entity type.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → Future< void> -
Closes the plugin instance.
inherited
-
fromDocument(
Document document, NitriteMapper nitriteMapper) → T -
Converts a Document to an entity of type
T
. -
initialize(
NitriteConfig nitriteConfig) → Future< void> -
Initializes the plugin instance.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDocument(
T entity, NitriteMapper nitriteMapper) → Document - Converts the entity to a Document.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromIterable<
I> (Iterable< I> ? iterable, NitriteMapper nitriteMapper) → dynamic -
Converts a collection of objects of type
I
to a list of Documents. If the typeI
is a registered value type, it will return the same list without converting its elements. -
fromList<
L> (List< L> ? list, NitriteMapper nitriteMapper) → dynamic -
Converts a list of objects of type
L
to a list of Documents. If the typeL
is a registered value type, it will return the same list without converting its elements. -
fromMap<
K, V> (Map< K, V> ? map, NitriteMapper nitriteMapper) → dynamic -
Converts a map of key-value pair to a map of Documents.
If the key type
K
or the value typeV
is a registered value type, it will not convert those objects to document and return as is. -
fromSet<
S> (Set< S> ? set, NitriteMapper nitriteMapper) → dynamic -
Converts a set of objects of type
S
to a set of Documents. If the typeS
is a registered value type, it will return the same set without converting its elements. -
toIterable<
I> (dynamic list, NitriteMapper nitriteMapper) → Iterable< I> -
Converts a collection of Documents to a list of object type
I
. -
toList<
L> (dynamic list, NitriteMapper nitriteMapper) → List< L> -
Converts a list of Documents to a list of object type
L
. -
toMap<
K, V> (dynamic map, NitriteMapper nitriteMapper) → Map< K, V> - Converts a map of Documents to a map of key value pair.
-
toSet<
S> (dynamic set, NitriteMapper nitriteMapper) → Set< S> -
Converts a set of Documents to a set of object type
S
.