Codota Logo
org.dozer.classmap
Code IndexAdd Codota to your IDE (free)

How to use org.dozer.classmap

Best Java code snippets using org.dozer.classmap (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: net.sf.dozer/dozer

public ConfigurationBuilder copyByReference(String typeMask) {
 CopyByReference copyByReference = new CopyByReference(typeMask);
 configuration.getCopyByReferences().add(copyByReference);
 return this;
}
origin: net.sf.dozer/dozer

private static void generateMapping(ClassMap classMap, Configuration configuration, List<ClassMappingGenerator> mappingGenerators) {
 if (!classMap.isWildcard()) {
  return;
 }
 for (ClassMappingGenerator generator : mappingGenerators) {
  if (generator.accepts(classMap)) {
   if (generator.apply(classMap, configuration)) {
    return;
   }
  }
 }
}
origin: net.sf.dozer/dozer

private ClassMap getClassMap(Class<?> srcClass, Class<?> destClass, String mapId) {
 ClassMap mapping = classMappings.find(srcClass, destClass, mapId);
 if (mapping == null) {
  // If mapping not found in existing custom mapping collection, create
  // default as an explicit mapping must not
  // exist. The create default class map method will also add all default
  // mappings that it can determine.
  mapping = ClassMapBuilder.createDefaultClassMap(globalConfiguration, srcClass, destClass);
  classMappings.addDefault(srcClass, destClass, mapping);
 }
 return mapping;
}
origin: net.sf.dozer/dozer

public static void applyGlobalCopyByReference(Configuration globalConfig, FieldMap fieldMap, ClassMap classMap) {
 CopyByReferenceContainer copyByReferenceContainer = globalConfig.getCopyByReferences();    
 String destFieldTypeName = null;
 Class<?> clazz = fieldMap.getDestFieldType(classMap.getDestClassToMap());
 if (clazz != null) {
  destFieldTypeName = clazz.getName();
 }
 if (copyByReferenceContainer.contains(destFieldTypeName) && !fieldMap.isCopyByReferenceOveridden()) {
  fieldMap.setCopyByReference(true);
 }
}
origin: net.sf.dozer/dozer

public List<Class<RuntimeException>> getAllowedExceptions() {
 if (!allowedExceptions.isEmpty()) {
  return allowedExceptions;
 } else {
  return globalConfiguration.getAllowedExceptions().getExceptions();
 }
}
origin: net.sf.dozer/dozer

public ConfigurationBuilder configuration() {
 Configuration configuration = new Configuration();
 data.setConfiguration(configuration);
 return new ConfigurationBuilder(configuration);
}
origin: org.openl.rules/org.openl.rules.mapping.dev.modified

public void relationshipType(RelationshipType value) {
  if (value == null) {
    configuration.setRelationshipType(DozerConstants.DEFAULT_RELATIONSHIP_TYPE_POLICY);
  } else {
    configuration.setRelationshipType(value);
  }
}
origin: net.sf.dozer/dozer

public MappingBuilder relationshipType(RelationshipType type) {
 classMap.setRelationshipType(type);
 return this;
}
origin: net.sf.dozer/dozer

public MappingBuilder mapNull(boolean value) {
 classMap.setMapNull(value);
 return this;
}
origin: net.sf.dozer/dozer

public MappingBuilder type(MappingDirection type) {
 classMap.setType(type);
 return this;
}
origin: net.sf.dozer/dozer

public MappingBuilder mapId(String id) {
 classMap.setMapId(id);
 return this;
}
origin: net.sf.dozer/dozer

public boolean contains(String typeName) {
 for (CopyByReference reference : copyByReferences) {
  if (reference.matches(typeName)) {
   return true;
  }
 }
 return false;
}
origin: org.openl.rules/org.openl.rules.mapping.dev.modified

public ConfigurationBuilder copyByReference(String typeMask) {
  CopyByReference copyByReference = new CopyByReference(typeMask);
  configuration.getCopyByReferences().add(copyByReference);
  return this;
}
origin: org.openl.rules/org.openl.rules.mapping.dev.dozer

public static void applyGlobalCopyByReference(Configuration globalConfig, FieldMap fieldMap, ClassMap classMap) {
  CopyByReferenceContainer copyByReferenceContainer = globalConfig.getCopyByReferences();
  String destFieldTypeName = null;
  Class<?> clazz = fieldMap.getDestFieldType(classMap.getDestClassToMap());
  if (clazz != null) {
    destFieldTypeName = clazz.getName();
  }
  if (copyByReferenceContainer.contains(destFieldTypeName) && !fieldMap.isCopyByReferenceOveridden()) {
    fieldMap.setCopyByReference(true);
  }
}
origin: org.openl.rules/org.openl.rules.mapping.dev.dozer

private static void generateMapping(ClassMap classMap,
    Configuration configuration,
    List<ClassMappingGenerator> mappingGenerators) {
  if (!classMap.isWildcard()) {
    return;
  }
  for (ClassMappingGenerator generator : mappingGenerators) {
    if (generator.accepts(classMap)) {
      if (generator.apply(classMap, configuration)) {
        return;
      }
    }
  }
}
origin: org.openl.rules/org.openl.rules.mapping.dev.dozer

public List<Class<RuntimeException>> getAllowedExceptions() {
  if (!allowedExceptions.isEmpty()) {
    return allowedExceptions;
  } else {
    return globalConfiguration.getAllowedExceptions().getExceptions();
  }
}
origin: net.sf.dozer/dozer

public void relationshipType(RelationshipType value) {
 if (value == null) {
  configuration.setRelationshipType(DozerConstants.DEFAULT_RELATIONSHIP_TYPE_POLICY);
 } else {
  configuration.setRelationshipType(value);
 }
}
origin: org.openl.rules/org.openl.rules.mapping.dev.dozer

public boolean contains(String typeName) {
  for (CopyByReference reference : copyByReferences) {
    if (reference.matches(typeName)) {
      return true;
    }
  }
  return false;
}
origin: org.openl.rules/org.openl.rules.mapping.dev.dozer

public ConfigurationBuilder copyByReference(String typeMask) {
  CopyByReference copyByReference = new CopyByReference(typeMask);
  configuration.getCopyByReferences().add(copyByReference);
  return this;
}
origin: org.openl.rules/org.openl.rules.mapping.dev.dozer

public void relationshipType(RelationshipType value) {
  if (value == null) {
    configuration.setRelationshipType(DozerConstants.DEFAULT_RELATIONSHIP_TYPE_POLICY);
  } else {
    configuration.setRelationshipType(value);
  }
}
org.dozer.classmap

Most used classes

  • ClassMappings
    Internal class that determines the appropriate class mapping to be used for the source and destinati
  • AllowedExceptionContainer
    Internal class used to hold any "allowed exceptions" that may have been specified in the mapping xml
  • ClassMap
    Internal class that represents a class mapping definition. Holds all of the information about a sing
  • ClassMapBuilder
    Internal class for adding implicit field mappings to a ClassMap. Also, builds implicit ClassMap for
  • Configuration
    Internal class that represents the configuration block specified in the mapping xml file(s). Only in
  • CopyByReferenceContainer,
  • DozerClass,
  • MappingDirection,
  • MappingFileData,
  • RelationshipType,
  • ClassMapBuilder$ClassMappingGenerator,
  • ClassMapKeyFactory,
  • BeanMappingGenerator$BeanFieldsDetector,
  • BeanMappingGenerator,
  • GeneratorUtils
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now