Features

  • a mapping isn't just a static document with mapping rules such as XML

    A Nomin mapping listing is nothing else as a groovy class or script. So you are able to use all mechanisms Groovy provides. Although you may not know Groovy at all you can easily use Nomin.

  • intuitively looking mapping, even a non-developer can read it

    In the majority of cases a mapping rule is looking as usual assignment. For example,

      a.name = b.firstName
    

    means "map property 'name' of the first class to property 'firstName' of the second class and vice versa"

  • map arbitrary expressions

    In other words now you can map result of calulating arbitrary block of code to properties. Expressions have access to objects being mapped and will be calculated at runtime.

  • method invocation

    So there is the ability to map result of method invocation on some property.

  • automapping facility

    Nomin can automatically create mapping rules between properties of the same names.

  • abilities to easily customize the mapping engine behavior

    You can choose a class introspector, advise the engine what is the type of a property with hints including dynamic hints which are calculated at mapping time. You are not restricted to use only JavaBeans naming convention, you can use anything suitable for your needs.

  • hooks

    Sometimes it needs to perform pre and/or postprocessing entities being mapped. So that code can be placed right in a mapping.

  • context management

    Expressions and hooks can use objects from the context passed to the mapper. Context can be just a Map instance with string keys. Also there is integration with Spring, so you are able to use beans defined in the Spring context.

  • high performance and thread-safety

    Nomin is developed for working in multi-threading environments. Its performance exceeds performance of frameworks with the same functionality, the following table show the comparison results.

    Environment / frameworkNomin 1.1.0Dozer 5.3.1
    Mapping complex objects, 400000 iterations
    Pentium Dual E2180 2GHz, RAM 3 GB Win 32 XP SP 3, JVM 1.6.0_18with ReflectionIntrospector ~5.51 s 
    with ExplodingIntrospector ~4.96 s 
    with FastIntrospector ~3.49 s 
    with disabled statistics 60.93 s
    AMD x64 2GHz, RAM 2 GB Win 7 x64, JVM x64 1.6.0_22with ReflectionIntrospector ~4.33 s 
    with ExplodingIntrospector ~4.17 s 
    with FastIntrospector ~3.68 s 
    with disabled statistics 33.87 s
  • recursive mapping of complex types
  • full supporting collections, arrays and maps
  • implicit conversions of primitive/wrapper types
  • type and null-safe
  • ready for deployment into OSGi container