DefaultGeneralConverter<Domain extends BasicDomainObject<IntIdentifier> , Entity extends BasicEntityObject<Domain> > class
Null safety
Default implementation of GeneralConverter
EXAMPLE: See BasicEntityObject for ParentEntity's example code See BasicDomainObject for ParentDomain's example code
class ParentConverter
extends DefaultGeneralConverter<ParentDomain, ParentEntity> {
@override
ParentDomain toDomain(ParentEntity entity) {
return entity.toDomain();
}
@override
ParentEntity toEntity(ParentDomain domain) {
return ParentEntity.fromDomain(domain);
}
}
- Inheritance
- Object
- GeneralConverter<
Domain, Entity> - DefaultGeneralConverter
Constructors
Properties
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toDomain(
Entity entity) → Domain -
By default calling Entity.toDomain()
override
-
toDomainAll(
List< Entity> entities) → List<Domain> -
By default converting one by one into a new list
using the single toDomain(entity) converter.
override
-
toEntity(
Domain domain) → Entity -
By default ....
override
-
toEntityAll(
List< Domain> domains) → List<Entity> -
By default converting one by one into a new list
using the single toEntity(domain) converter.
override
-
toString(
) → String -
A string representation of this object. [...]
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited