ma.glasnost.orika.metadata
Class ClassMapBuilderForLists<A,B>

java.lang.Object
  extended by ma.glasnost.orika.metadata.ClassMapBuilder<A,B>
      extended by ma.glasnost.orika.metadata.ClassMapBuilderForMaps<A,B>
          extended by ma.glasnost.orika.metadata.ClassMapBuilderForLists<A,B>
Type Parameters:
A -
B -
All Implemented Interfaces:
MappedTypePair<A,B>
Direct Known Subclasses:
ClassMapBuilderForArrays

public class ClassMapBuilderForLists<A,B>
extends ClassMapBuilderForMaps<A,B>

ClassMapBuilderForMaps is a custom ClassMapBuilder instance which is used for mapping standard JavaBeans to Map instances.


Nested Class Summary
static class ClassMapBuilderForLists.Factory
           
 
Constructor Summary
protected ClassMapBuilderForLists(Type<A> aType, Type<B> bType, MapperFactory mapperFactory, PropertyResolverStrategy propertyResolver, DefaultFieldMapper... defaults)
           
 
Method Summary
 FieldMapBuilder<A,B> fieldMap(String fieldNameA, String fieldNameB, boolean byDefault)
          Create a fieldMap for the particular field mapping
protected  boolean isATypeBean()
           
protected  boolean isSpecialCaseType(Type<?> type)
          Test whether the provided type is the special case type for this Builder (as in, not the standard Java Bean type)
protected  int resolveAndIncrementIndex(String expr)
           
protected  Property resolveCustomProperty(String expr, Type<?> propertyType)
           
protected  ClassMapBuilderForLists<A,B> self()
           
 
Methods inherited from class ma.glasnost.orika.metadata.ClassMapBuilderForMaps
byDefault, getParentExpression, resolveProperty
 
Methods inherited from class ma.glasnost.orika.metadata.ClassMapBuilder
addFieldMap, byDefault, byDefault, constructorA, constructorB, customize, customize, describeClassMap, exclude, field, field, field, field, field, field, field, fieldAToB, fieldBToA, fieldMap, fieldMap, fieldMap, fieldMap, fieldMap, fieldMap, fieldMap, fieldMap, fieldMap, getAType, getBType, getDefaultFieldMappers, getMappedFields, getMappedPropertiesForTypeA, getMappedPropertiesForTypeB, getPropertiesForTypeA, getPropertiesForTypeB, getPropertyResolver, isNestedPropertyExpression, map, map, map, map, mapNulls, mapNullsInReverse, register, resolvePropertyForA, resolvePropertyForB, toClassMap, toString, use, use
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassMapBuilderForLists

protected ClassMapBuilderForLists(Type<A> aType,
                                  Type<B> bType,
                                  MapperFactory mapperFactory,
                                  PropertyResolverStrategy propertyResolver,
                                  DefaultFieldMapper... defaults)
Parameters:
aType -
bType -
propertyResolver -
defaults -
Method Detail

self

protected ClassMapBuilderForLists<A,B> self()
Overrides:
self in class ClassMapBuilderForMaps<A,B>

isATypeBean

protected boolean isATypeBean()
Overrides:
isATypeBean in class ClassMapBuilderForMaps<A,B>
Returns:
true if the A type for this Builder is the Java Bean type

isSpecialCaseType

protected boolean isSpecialCaseType(Type<?> type)
Description copied from class: ClassMapBuilderForMaps
Test whether the provided type is the special case type for this Builder (as in, not the standard Java Bean type)

Overrides:
isSpecialCaseType in class ClassMapBuilderForMaps<A,B>
Returns:

resolveAndIncrementIndex

protected int resolveAndIncrementIndex(String expr)

fieldMap

public FieldMapBuilder<A,B> fieldMap(String fieldNameA,
                                     String fieldNameB,
                                     boolean byDefault)
Description copied from class: ClassMapBuilder
Create a fieldMap for the particular field mapping

Overrides:
fieldMap in class ClassMapBuilderForMaps<A,B>
Parameters:
fieldNameA - the name of the field in type A
fieldNameB - the name of the field in type B
byDefault - whether the field mapping has been provided by default
Returns:

resolveCustomProperty

protected Property resolveCustomProperty(String expr,
                                         Type<?> propertyType)
Overrides:
resolveCustomProperty in class ClassMapBuilderForMaps<A,B>


Copyright © 2013 Glasnost. All Rights Reserved.