Example usage for java.lang.reflect ParameterizedType getActualTypeArguments

List of usage examples for java.lang.reflect ParameterizedType getActualTypeArguments

Introduction

In this page you can find the example usage for java.lang.reflect ParameterizedType getActualTypeArguments.

Prototype

Type[] getActualTypeArguments();

Source Link

Document

Returns an array of Type objects representing the actual type arguments to this type.

Usage

From source file:org.openmrs.module.webservices.rest.web.DelegatingCrudResourceTest.java

/**
 * This test looks at all subclasses of DelegatingCrudResource, and test all {@link RepHandler}
 * methods to make sure they are all capable of running without exceptions. It also checks that
 *//*from  ww  w  .j  a  v a2s  .c  o m*/
@SuppressWarnings("rawtypes")
@Test
@Ignore
public void testAllReprsentationDescriptions() throws Exception {
    ClassPathScanningCandidateComponentProvider provider = new ClassPathScanningCandidateComponentProvider(
            true);
    //only match subclasses of BaseDelegatingResource
    provider.addIncludeFilter(new AssignableTypeFilter(BaseDelegatingResource.class));

    // scan in org.openmrs.module.webservices.rest.web.resource package 
    Set<BeanDefinition> components = provider
            .findCandidateComponents("org.openmrs.module.webservices.rest.web.resource");
    if (CollectionUtils.isEmpty(components))
        Assert.fail("Faile to load any resource classes");

    for (BeanDefinition component : components) {
        Class resourceClass = Class.forName(component.getBeanClassName());
        for (Method method : ReflectionUtils.getAllDeclaredMethods(resourceClass)) {
            ParameterizedType parameterizedType = (ParameterizedType) resourceClass.getGenericSuperclass();
            Class openmrsClass = (Class) parameterizedType.getActualTypeArguments()[0];
            //User Resource is special in that the Actual parameterized Type isn't a standard domain object, so we also
            //need to look up fields and methods from the org.openmrs.User class 
            boolean isUserResource = resourceClass.equals(UserResource1_8.class);
            List<Object> refDescriptions = new ArrayList<Object>();

            if (method.getName().equals("getRepresentationDescription")
                    && method.getDeclaringClass().equals(resourceClass)) {
                //get all the rep definitions for all representations
                refDescriptions
                        .add(method.invoke(resourceClass.newInstance(), new Object[] { Representation.REF }));
                refDescriptions.add(
                        method.invoke(resourceClass.newInstance(), new Object[] { Representation.DEFAULT }));
                refDescriptions
                        .add(method.invoke(resourceClass.newInstance(), new Object[] { Representation.FULL }));
            }

            for (Object value : refDescriptions) {
                if (value != null) {
                    DelegatingResourceDescription des = (DelegatingResourceDescription) value;
                    for (String key : des.getProperties().keySet()) {
                        if (!key.equals("uri") && !key.equals("display") && !key.equals("auditInfo")) {
                            boolean hasFieldOrPropertySetter = (ReflectionUtils.findField(openmrsClass,
                                    key) != null);
                            if (!hasFieldOrPropertySetter) {
                                hasFieldOrPropertySetter = hasSetterMethod(key, resourceClass);
                                if (!hasFieldOrPropertySetter && isUserResource)
                                    hasFieldOrPropertySetter = (ReflectionUtils.findField(User.class,
                                            key) != null);
                            }
                            if (!hasFieldOrPropertySetter)
                                hasFieldOrPropertySetter = hasSetterMethod(key, resourceClass);

                            //TODO replace this hacky way that we are using to check if there is a get method for a 
                            //collection that has no actual getter e.g activeIdentifers and activeAttributes for Patient
                            if (!hasFieldOrPropertySetter) {
                                hasFieldOrPropertySetter = (ReflectionUtils.findMethod(openmrsClass,
                                        "get" + StringUtils.capitalize(key)) != null);
                                if (!hasFieldOrPropertySetter && isUserResource)
                                    hasFieldOrPropertySetter = (ReflectionUtils.findMethod(User.class,
                                            "get" + StringUtils.capitalize(key)) != null);
                            }

                            if (!hasFieldOrPropertySetter)
                                hasFieldOrPropertySetter = isallowedMissingProperty(resourceClass, key);

                            Assert.assertTrue(
                                    "No property found for '" + key + "' for " + openmrsClass
                                            + " nor setter method on resource " + resourceClass,
                                    hasFieldOrPropertySetter);
                        }
                    }
                }
            }
        }
    }
}

From source file:windows.webservices.JsonDeserializer.Deserializer.java

@Override
public E deserialize(JsonParser jp, DeserializationContext dc) throws IOException, JsonProcessingException {
    try {/*from  www  . ja v a 2s. c  o  m*/

        JsonNode json = jp.getCodec().readTree(jp);

        if (StringUtils.isEmpty(json.toString()) || json.toString().length() < 4) {
            return getNullValue(dc);
        }
        E instance = classChild.newInstance();
        ObjectMapper mapper = new ObjectMapper();
        SimpleModule modul = new SimpleModule("parroquia")
                .addDeserializer(Parroquia.class, new ParroquiaDeserializer())
                .addDeserializer(Semana.class, new SemanaDeserializer())
                .addDeserializer(Animal.class, new AnimalDeserializer())
                .addDeserializer(Semana.class, new SemanaDeserializer())
                .addDeserializer(Especie.class, new EspecieDeserializer())
                .addDeserializer(Persona.class, new PersonaDeserializer())
                .addDeserializer(Permiso.class, new PermisoDeserializer())
                .addDeserializer(Usuario.class, new UsuarioDeserializer())
                .addDeserializer(Cliente.class, new ClienteDeserializer())
                .addDeserializer(Municipio.class, new MunicipioDeserializer())
                .addDeserializer(Animal_has_Caso.class, new Animal_has_CasoDeserializer())
                .addDeserializer(Caso.class, new CasoDeserializer())
                .addDeserializer(Novedades.class, new NovedadesDeserializer())
                .addDeserializer(RegistroVacunacion.class, new RegistroVacunacionDeserializer())
                .addDeserializer(RegistroVacunacion_has_Animal.class,
                        new RegistroVacunacion_has_AnimalDeserializer())
                .addDeserializer(Vacunacion.class, new VacunacionDeserializer());
        mapper.registerModule(modul);

        for (Field field : ReflectionUtils.getAllFields(classChild)) {
            Object value = null;
            Iterator<String> it = json.fieldNames();
            String column = null;
            String fieldName = field.getName();
            JsonProperty property = field.getAnnotation(JsonProperty.class);
            if (property != null) {
                fieldName = property.value();
            }
            while (it.hasNext()) {
                String name = it.next();
                if (Objects.equals(name.trim(), fieldName)) {
                    column = name;
                    break;
                }
            }
            if (column == null) {
                System.out.println("No se reconoce la siguente columna : " + fieldName + " de : "
                        + classChild.getSimpleName());
                continue;
            }
            if (field.getType().equals(String.class)) {
                value = json.get(column).asText();
            } else if (Collection.class.isAssignableFrom(field.getType())) {
                if (StringUtils.isNotEmpty(json.get(column).toString())) {
                    ParameterizedType stringListType = (ParameterizedType) field.getGenericType();
                    Class<?> stringListClass = (Class<?>) stringListType.getActualTypeArguments()[0];
                    value = mapper.readValue(json.get(column).toString(),
                            mapper.getTypeFactory().constructCollectionType(List.class, stringListClass));
                } else {
                    value = null;
                }
            } else if (!field.getType().equals(Date.class)) {
                try {
                    value = mapper.convertValue(json.get(column), field.getType());
                } catch (IllegalArgumentException ex) {
                    value = null;
                }
            } else {
                String date = json.get(column).textValue();
                try {
                    if (date != null) {
                        value = d.parse(date.replace("-", "/"));
                    }
                } catch (ParseException ex) {
                    Logger.getLogger(Deserializer.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
            ReflectionUtils.runSetter(field, instance, value);
        }
        return instance;
    } catch (InstantiationException | IllegalAccessException ex) {
        Logger.getLogger(Deserializer.class.getName()).log(Level.SEVERE, null, ex);
    }
    return getNullValue(dc);
}

From source file:org.broadleafcommerce.openadmin.server.dao.provider.metadata.MapFieldsFieldMetadataProvider.java

@Override
public FieldProviderResponse addMetadataFromFieldType(
        AddMetadataFromFieldTypeRequest addMetadataFromFieldTypeRequest, Map<String, FieldMetadata> metadata) {
    if (!canHandleFieldForTypeMetadata(addMetadataFromFieldTypeRequest, metadata)) {
        return FieldProviderResponse.NOT_HANDLED;
    }/*from   w  w w  .j  a va 2  s  . co m*/
    //look for any map field metadata that was previously added for the requested field
    for (Map.Entry<String, FieldMetadata> entry : addMetadataFromFieldTypeRequest.getPresentationAttributes()
            .entrySet()) {
        if (entry.getKey().startsWith(
                addMetadataFromFieldTypeRequest.getRequestedPropertyName() + FieldManager.MAPFIELDSEPARATOR)) {
            TypeLocatorImpl typeLocator = new TypeLocatorImpl(new TypeResolver());

            Type myType = null;
            //first, check if an explicit type was declared
            String valueClass = ((BasicFieldMetadata) entry.getValue()).getMapFieldValueClass();
            if (valueClass != null) {
                myType = typeLocator.entity(valueClass);
            }
            if (myType == null) {
                SupportedFieldType fieldType = ((BasicFieldMetadata) entry.getValue()).getExplicitFieldType();
                Class<?> basicJavaType = getBasicJavaType(fieldType);
                if (basicJavaType != null) {
                    myType = typeLocator.basic(basicJavaType);
                }
            }
            if (myType == null) {
                java.lang.reflect.Type genericType = addMetadataFromFieldTypeRequest.getRequestedField()
                        .getGenericType();
                if (genericType instanceof ParameterizedType) {
                    ParameterizedType pType = (ParameterizedType) genericType;
                    Class<?> clazz = (Class<?>) pType.getActualTypeArguments()[1];
                    Class<?>[] entities = addMetadataFromFieldTypeRequest.getDynamicEntityDao()
                            .getAllPolymorphicEntitiesFromCeiling(clazz);
                    if (!ArrayUtils.isEmpty(entities)) {
                        myType = typeLocator.entity(entities[entities.length - 1]);
                    }
                }
            }
            if (myType == null) {
                throw new IllegalArgumentException(
                        "Unable to establish the type for the property (" + entry.getKey() + ")");
            }
            //add property for this map field as if it was a normal field
            super.addMetadataFromFieldType(
                    new AddMetadataFromFieldTypeRequest(addMetadataFromFieldTypeRequest.getRequestedField(),
                            addMetadataFromFieldTypeRequest.getTargetClass(),
                            addMetadataFromFieldTypeRequest.getForeignField(),
                            addMetadataFromFieldTypeRequest.getAdditionalForeignFields(),
                            addMetadataFromFieldTypeRequest.getMergedPropertyType(),
                            addMetadataFromFieldTypeRequest.getComponentProperties(),
                            addMetadataFromFieldTypeRequest.getIdProperty(),
                            addMetadataFromFieldTypeRequest.getPrefix(), entry.getKey(), myType,
                            addMetadataFromFieldTypeRequest.isPropertyForeignKey(),
                            addMetadataFromFieldTypeRequest.getAdditionalForeignKeyIndexPosition(),
                            addMetadataFromFieldTypeRequest.getPresentationAttributes(), entry.getValue(),
                            ((BasicFieldMetadata) entry.getValue()).getExplicitFieldType(),
                            myType.getReturnedClass(), addMetadataFromFieldTypeRequest.getDynamicEntityDao()),
                    metadata);
        }
    }
    return FieldProviderResponse.HANDLED;
}

From source file:cn.bzvs.excel.imports.base.ImportBaseService.java

/**
 * ??/* w w  w .  ja v  a 2 s . com*/
 * @param targetId
 * @param fields
 * @param excelParams
 * @param excelCollection
 * @param pojoClass
 * @param getMethods
 * @throws Exception
 */
public void getAllExcelField(String targetId, Field[] fields, Map<String, ExcelImportEntity> excelParams,
        List<ExcelCollectionParams> excelCollection, Class<?> pojoClass, List<Method> getMethods)
        throws Exception {
    ExcelImportEntity excelEntity = null;
    for (int i = 0; i < fields.length; i++) {
        Field field = fields[i];
        if (PoiPublicUtil.isNotUserExcelUserThis(null, field, targetId)) {
            continue;
        }
        if (PoiPublicUtil.isCollection(field.getType())) {
            // ?
            ExcelCollection excel = field.getAnnotation(ExcelCollection.class);
            ExcelCollectionParams collection = new ExcelCollectionParams();
            collection.setName(field.getName());
            Map<String, ExcelImportEntity> temp = new HashMap<String, ExcelImportEntity>();
            ParameterizedType pt = (ParameterizedType) field.getGenericType();
            Class<?> clz = (Class<?>) pt.getActualTypeArguments()[0];
            collection.setType(clz);
            getExcelFieldList(StringUtils.isNotEmpty(excel.id()) ? excel.id() : targetId,
                    PoiPublicUtil.getClassFields(clz), clz, temp, null);
            collection.setExcelParams(temp);
            collection.setExcelName(PoiPublicUtil
                    .getValueByTargetId(field.getAnnotation(ExcelCollection.class).name(), targetId, null));
            additionalCollectionName(collection);
            excelCollection.add(collection);
        } else if (PoiPublicUtil.isJavaClass(field)) {
            addEntityToMap(targetId, field, excelEntity, pojoClass, getMethods, excelParams);
        } else {
            List<Method> newMethods = new ArrayList<Method>();
            if (getMethods != null) {
                newMethods.addAll(getMethods);
            }
            //
            newMethods.add(PoiReflectorUtil.fromCache(pojoClass).getGetMethod(field.getName()));
            ExcelEntity excel = field.getAnnotation(ExcelEntity.class);
            getAllExcelField(StringUtils.isNotEmpty(excel.id()) ? excel.id() : targetId,
                    PoiPublicUtil.getClassFields(field.getType()), excelParams, excelCollection,
                    field.getType(), newMethods);
        }
    }
}

From source file:com.searchbox.framework.web.ApplicationConversionService.java

@Override
public void afterPropertiesSet() throws Exception {

    LOGGER.info("Scanning for SearchComponents");
    Map<Class<?>, String> conditionUrl = new HashMap<Class<?>, String>();
    ClassPathScanningCandidateComponentProvider scanner;

    // Getting all the SearchElements
    scanner = new ClassPathScanningCandidateComponentProvider(false);
    scanner.addIncludeFilter(new AnnotationTypeFilter(SearchCondition.class));
    for (BeanDefinition bean : scanner.findCandidateComponents("com.searchbox")) {
        try {/* www  .  java 2  s . c  om*/
            Class<?> clazz = Class.forName(bean.getBeanClassName());
            String urlParam = clazz.getAnnotation(SearchCondition.class).urlParam();
            conditionUrl.put(clazz, urlParam);
        } catch (Exception e) {
            LOGGER.error("Could not introspect SearchElement: " + bean, e);
        }
    }

    // Getting all converters for SearchConditions
    scanner = new ClassPathScanningCandidateComponentProvider(false);
    scanner.addIncludeFilter(new AnnotationTypeFilter(SearchConverter.class));
    for (BeanDefinition bean : scanner.findCandidateComponents("com.searchbox")) {
        try {
            Class<?> clazz = Class.forName(bean.getBeanClassName());
            for (Type i : clazz.getGenericInterfaces()) {
                ParameterizedType pi = (ParameterizedType) i;
                for (Type piarg : pi.getActualTypeArguments()) {
                    if (AbstractSearchCondition.class.isAssignableFrom(((Class<?>) piarg))) {
                        Class<?> conditionClass = ((Class<?>) piarg);
                        searchConditions.put(conditionUrl.get(conditionClass), ((Class<?>) piarg));
                        this.addConverter((Converter<?, ?>) clazz.newInstance());
                        LOGGER.info("Registered Converter " + clazz.getSimpleName() + " for "
                                + ((Class<?>) piarg).getSimpleName() + " with prefix: "
                                + conditionUrl.get(conditionClass));
                    }
                }
            }
        } catch (Exception e) {
            LOGGER.error("Could not create Converter for: " + bean.getBeanClassName(), e);
        }
    }

    this.addConverter(new Converter<String, SearchboxEntity>() {
        @Override
        public SearchboxEntity convert(String slug) {
            return searchboxRepository.findBySlug(slug);
        }
    });

    this.addConverter(new Converter<SearchboxEntity, String>() {
        @Override
        public String convert(SearchboxEntity searchbox) {
            return searchbox.getSlug();
        }
    });

    this.addConverter(new Converter<Long, SearchboxEntity>() {
        @Override
        public SearchboxEntity convert(java.lang.Long id) {
            return searchboxRepository.findOne(id);
        }
    });

    this.addConverter(new Converter<SearchboxEntity, Long>() {
        @Override
        public Long convert(SearchboxEntity searchbox) {
            return searchbox.getId();
        }
    });

    this.addConverter(new Converter<String, PresetEntity>() {
        @Override
        public PresetEntity convert(String slug) {
            return presetRepository.findPresetDefinitionBySlug(slug);
        }
    });

    this.addConverter(new Converter<Long, PresetEntity>() {
        @Override
        public PresetEntity convert(java.lang.Long id) {
            return presetRepository.findOne(id);
        }
    });

    this.addConverter(new Converter<PresetEntity, String>() {
        @Override
        public String convert(PresetEntity presetDefinition) {
            return new StringBuilder().append(presetDefinition.getSlug()).toString();
        }
    });

    this.addConverter(new Converter<Class<?>, String>() {
        @Override
        public String convert(Class<?> source) {
            return source.getName();
        }
    });

    this.addConverter(new Converter<String, Class<?>>() {

        @Override
        public Class<?> convert(String source) {
            try {
                // TODO Such a bad hack...
                if (source.contains("class")) {
                    source = source.replace("class", "").trim();
                }
                return context.getClassLoader().loadClass(source);
                // Class.forName(source);
            } catch (ClassNotFoundException e) {
                LOGGER.error("Could not convert \"" + source + "\" to class.", e);
            }
            return null;
        }

    });
}

From source file:com.evolveum.midpoint.repo.sql.query.definition.ClassDefinitionParser.java

private CollectionDefinition updateCollectionDefinition(CollectionDefinition definition,
        AnnotatedElement object, QName jaxbName, String jpaName) {
    Definition collDef;//from  w  w  w .j av a2 s  .  c o m
    if (object instanceof Method) {
        Method method = (Method) object;
        ParameterizedType type = (ParameterizedType) method.getGenericReturnType();
        Type type1 = type.getActualTypeArguments()[0];
        Class clazz;
        if (type1 instanceof Class) {
            clazz = ((Class) type1);
        } else {
            clazz = (Class) ((ParameterizedType) type1).getRawType();
        }

        QName realJaxbName = getJaxbName(method);
        Class jaxbType = getJaxbType(clazz);
        String realJpaName = getJpaName(method);
        collDef = createDefinition(realJaxbName, jaxbType, realJpaName, clazz);
    } else {
        Class clazz = (Class) object;

        Class jaxbType = getJaxbType(clazz);
        collDef = createDefinition(jaxbName, jaxbType, jpaName, clazz);
    }

    if (collDef instanceof EntityDefinition) {
        updateEntityDefinition((EntityDefinition) collDef);
    }

    definition.setDefinition(collDef);

    return definition;
}

From source file:org.craftercms.commerce.client.AbstractRestCRUDService.java

@SuppressWarnings("unchecked")
protected Class<? extends BaseType> getTypeArgument() {
    ParameterizedType parameterizedType = (ParameterizedType) getClass().getGenericSuperclass();
    return (Class<? extends BaseType>) parameterizedType.getActualTypeArguments()[0];
}

From source file:com.springinpractice.ch11.web.controller.AbstractCrudControllerTests.java

@SuppressWarnings("unchecked")
private Class<AbstractCrudController<T>> getControllerClass() {
    ParameterizedType paramType = (ParameterizedType) getClass().getGenericSuperclass();
    Class<T> entityClass = (Class<T>) paramType.getActualTypeArguments()[0];
    String ecName = entityClass.getSimpleName();
    String pkgName = ecName.toLowerCase();

    // Packages are an exception since "package" is a reserved word.
    // FIXME Move this somewhere else if we want to be purist here. Not worried about it for now.
    if (com.springinpractice.ch11.model.Package.class.equals(entityClass)) {
        pkgName = "pkg";
    }//from   w ww . j a v a 2s .com

    String ccName = CONTROLLER_PACKAGE + "." + pkgName + "." + ecName + "CrudController";
    try {
        return (Class<AbstractCrudController<T>>) Class.forName(ccName);
    } catch (ClassNotFoundException e) {
        throw new RuntimeException(e);
    }
}

From source file:org.zkybase.web.controller.AbstractCrudControllerTests.java

@SuppressWarnings("unchecked")
private Class<AbstractCrudController<T>> getControllerClass() {
    ParameterizedType paramType = (ParameterizedType) getClass().getGenericSuperclass();
    Class<T> entityClass = (Class<T>) paramType.getActualTypeArguments()[0];
    String ecName = entityClass.getSimpleName();
    String pkgName = ecName.toLowerCase();

    // Packages are an exception since "package" is a reserved word.
    // FIXME Move this somewhere else if we want to be purist here. Not worried about it for now.
    if (org.zkybase.model.Package.class.equals(entityClass)) {
        pkgName = "pkg";
    }//from   w ww.  ja v a 2 s .  com

    String ccName = CONTROLLER_PACKAGE + "." + pkgName + "." + ecName + "CrudController";
    try {
        return (Class<AbstractCrudController<T>>) Class.forName(ccName);
    } catch (ClassNotFoundException e) {
        throw new RuntimeException(e);
    }
}

From source file:fr.juanwolf.mysqlbinlogreplicator.component.DomainClassAnalyzer.java

@PostConstruct
public void postConstruct() throws BeansException, NoSuchMethodException, IllegalAccessException,
        InvocationTargetException, InstantiationException {
    mappingTablesExpected = new ArrayList<>();
    nestedTables = new ArrayList<>();
    Reflections reflections = new Reflections(scanMapping);
    Set<Class<?>> types = reflections.getTypesAnnotatedWith(MysqlMapping.class);
    final Iterator<Class<?>> iterator = types.iterator();
    while (iterator.hasNext()) {
        Class classDomain = iterator.next();
        MysqlMapping mysqlMapping = (MysqlMapping) classDomain.getAnnotation(MysqlMapping.class);
        DomainClass domainClass = new DomainClass();
        domainClass.setDomainClass(classDomain);
        mappingTablesExpected.add(mysqlMapping.table());
        CrudRepository crudRepository = (CrudRepository) applicationContext.getBean(mysqlMapping.repository());
        domainClass.setCrudRepository(crudRepository);
        domainClass.setTable(mysqlMapping.table());
        Map<String, SQLRequester> nestedClassesMap = new HashMap<>();
        for (Field field : classDomain.getDeclaredFields()) {
            NestedMapping nestedMapping = field.getAnnotation(NestedMapping.class);
            if (nestedMapping != null) {
                Class sqlRequesterClass = nestedMapping.sqlAssociaton().getRequesterClass();
                Constructor sqlRequesterConstructor = sqlRequesterClass.getConstructor();
                SQLRequester sqlRequester = (SQLRequester) sqlRequesterConstructor.newInstance();
                sqlRequester.setDatabaseName(databaseName);
                sqlRequester.setEntryTableName(mysqlMapping.table());
                sqlRequester.setExitTableName(nestedMapping.table());
                sqlRequester.setForeignKey(nestedMapping.foreignKey());
                sqlRequester.setPrimaryKeyForeignEntity(nestedMapping.primaryKey());
                sqlRequester.setEntryType(classDomain);
                sqlRequester.setAssociatedField(field);
                Class foreignType = field.getType();
                if (field.getGenericType() instanceof ParameterizedType) {
                    ParameterizedType genericType = (ParameterizedType) field.getGenericType();
                    Class properType = (Class) genericType.getActualTypeArguments()[0];
                    foreignType = properType;
                }//from  w ww.  j  ava 2  s .  co  m
                sqlRequester.setForeignType(foreignType);
                sqlRequester.setJdbcTemplate(jdbcTemplate);
                NestedRowMapper currentClassNestedRowMapper = new NestedRowMapper(classDomain, this,
                        mysqlMapping.table());
                NestedRowMapper foreignClassNestedRowMapper = new NestedRowMapper(foreignType, this,
                        mysqlMapping.table());
                sqlRequester.setRowMapper(currentClassNestedRowMapper);
                sqlRequester.setForeignRowMapper(foreignClassNestedRowMapper);
                nestedClassesMap.put(field.getName(), sqlRequester);
                nestedTables.add(nestedMapping.table());
                nestedDomainClassMap.put(nestedMapping.table(), domainClass);
            }
        }
        domainClass.setSqlRequesters(nestedClassesMap);
        domainClassMap.put(domainClass.getTable(), domainClass);
    }
    if (environment.getProperty("date.output") != null) {
        binlogOutputDateFormatter = new SimpleDateFormat(environment.getProperty("date.output"));
    }
}