• Modules
    • By category
    • By name
    • Most popular
    • Most downloaded
    • Repository
  • Register
  • Log in
  • Help
    • Start using Ceylon Herd
    • Publish your first module
    • Module publishing guidelines
    • All about Ceylon
    • Keyboard Shortcuts

    • s Focus search module bar
      ? Open this information panel
      j Move selection down
      k Move selection up
      enter Open current selection
Module info
Name
Voitech / herd.gecon.core.api / 0
Backends JVM JavaScript
Maven coordinates
Compatible Ceylon release JVM: 1.2.x, 1.3.x (latest)
JavaScript: Unknown (10/0)
Published May 27, 2019
Stats Downloads (JVM): 121
Downloads (JS): 27
Source downloads: 109
Authors Wojciech Potiopa
Description

Core API module for the Codamo framework. Provides stable API for transformations of data models. Available transformations:

  • Conversion - Initial entry point for conversion, takes source object and converts it into result type object. Whole flow can be implemented using single Conversion or it can delegate to other transformations. Default implementation of this interface is Converter which should be used for defining Conversion.

  • Resolvance - Chooses implementation of specific interface, abstract class, or any other type which is ambigous in compile time. The most common use case is selecting collection implementation for interface like List<String>. Should this be LinkedList<String> , or maybe ArrayList<String> ? This is handled by implementaton of Resolvance interface. Default implementation of this interface is Resolver which should be used for defining Resolvance.

  • Creation - Creates specific result type object from provided result type and arguments. Creation can be undestood as a constructor / initializer. In cases where conversion is generic and type arguments are not available in compile type it is sometimes usefull to delegate to Creation. Default implementation of this interface is Creator which should be used for defining Creation.

  • Mapping - Maps result type parts to source parts values using Dictionary object. Default implementation of this interface is Mapper, which should be used for defining Mapping. Example usecase is when converting from json to model object and the naming of fields are different in model than in json.

Dependencies
ceylon.language/1.3.3
herd.type.support/0.1.0
Usage
  • Import
 import herd.gecon.core.api "0";
Module links Members
Imported By
Browse
Download .car
Download .js
Download source archive
Download module documentation
View API documentation

Ceylon Herd v1.24 Copyright 2012-2022 Red Hat. About