Examples of DtoToEntityMatcher


Examples of com.inspiresoftware.lib.dto.geda.adapter.DtoToEntityMatcher

         InspectionInvalidDtoInstanceException, InspectionInvalidEntityInstanceException, NotEntityRetrieverException,
         EntityRetrieverNotFoundException, NotValueConverterException, ValueConverterNotFoundException,
         AnnotationMissingBeanKeyException, DtoToEntityMatcherNotFoundException, NotDtoToEntityMatcherException {
   
    Assembler assembler = null;
    final DtoToEntityMatcher matcher = this.meta.getDtoToEntityMatcher(converters);
    for (Object dtoKey : dtos.keySet()) {
     
      final Object dtoItem = dtos.get(dtoKey);

      boolean toAdd = true;
      for (Object orItem : original) {
       
        if (matcher.match(dtoKey, orItem)) {
          assembler = lazyCreateAssembler(assembler, dtoItem, orItem, entityBeanFactory);
          assembler.assembleEntity(dtoItem, orItem, converters, entityBeanFactory);
          toAdd = false;
          break;
        }
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.adapter.DtoToEntityMatcher

             InspectionInvalidDtoInstanceException, InspectionInvalidEntityInstanceException, NotEntityRetrieverException,
             EntityRetrieverNotFoundException, NotValueConverterException, ValueConverterNotFoundException,
             AnnotationMissingBeanKeyException, DtoToEntityMatcherNotFoundException, NotDtoToEntityMatcherException {

        Assembler assembler = null;
        final DtoToEntityMatcher matcher = this.meta.getDtoToEntityMatcher(converters);
        final boolean useKey = this.meta.isEntityMapKey();
        for (Object dtoKey : dtos.keySet()) {

          final Object dtoItem = dtos.get(dtoKey);
            boolean toAdd = true;
            for (Map.Entry orEntry : (Set<Map.Entry>) original.entrySet()) {

                if (matcher.match(dtoKey, orEntry.getKey())) {
                  if (useKey) {
                    assembler = lazyCreateAssembler(assembler, dtoKey, orEntry.getKey(), entityBeanFactory);
                      assembler.assembleEntity(dtoKey, orEntry.getKey(), converters, entityBeanFactory);
                      original.put(orEntry.getKey(), dtoItem);
                  } else {
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.adapter.DtoToEntityMatcher

        }
    }

    private void removeDeletedItems(final Map<String, Object> converters, final BeanFactory entityBeanFactory, final Collection original,
      final Map dtosthrows DtoToEntityMatcherNotFoundException, NotDtoToEntityMatcherException {
      final DtoToEntityMatcher matcher = this.meta.getDtoToEntityMatcher(converters);
      Iterator orIt = original.iterator();
      while (orIt.hasNext()) { // must be iterator to avoid concurrent modification exception while #remove()
       
        final Object orItem = orIt.next();
       
        boolean isRemoved = true;
        for (Object dtoKey : dtos.keySet()) {
         
          if (matcher.match(dtoKey, orItem)) {
            isRemoved = false;
            break;
          }
        }
       
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.adapter.DtoToEntityMatcher

      }
    }
   
    private void removeDeletedItems(final Map<String, Object> converters, final BeanFactory entityBeanFactory, final Map original,
      final Map dtosthrows DtoToEntityMatcherNotFoundException, NotDtoToEntityMatcherException {
      final DtoToEntityMatcher matcher = this.meta.getDtoToEntityMatcher(converters);
      final List keysToRemove = new ArrayList(); // must save to avoid concurrent modification exception while #remove(key)
      for (Object orKey : original.keySet()) {
         
            boolean isRemoved = true;
            for (Object dtoKey : dtos.keySet()) {

                if (matcher.match(dtoKey, orKey)) {
                    isRemoved = false;
                    break;
                }
            }
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.adapter.DtoToEntityMatcher

             InspectionScanningException, InspectionPropertyNotFoundException, InspectionBindingNotFoundException,
             AnnotationMissingBindingException, AnnotationValidatingBindingException, GeDARuntimeException,
             AnnotationDuplicateBindingException, DtoToEntityMatcherNotFoundException, NotDtoToEntityMatcherException {

        Assembler assembler = null;
        final DtoToEntityMatcher matcher = this.meta.getDtoToEntityMatcher(converters);
        for (Object dtoItem : dtos) {

            boolean toAdd = true;
            for (Object orItem : original) {

                if (matcher.match(dtoItem, orItem)) {
                  assembler = lazyCreateAssembler(assembler, dtoItem, orItem, entityBeanFactory);
                    assembler.assembleEntity(dtoItem, orItem, converters, entityBeanFactory);
                    toAdd = false;
                    break;
                }
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.adapter.DtoToEntityMatcher

    }

    private void removeDeletedItems(final Collection original, final Collection dtos, final Map<String, Object> converters,
          final BeanFactory entityBeanFactory) throws DtoToEntityMatcherNotFoundException, NotDtoToEntityMatcherException {

        final DtoToEntityMatcher matcher = this.meta.getDtoToEntityMatcher(converters);
        Iterator orIt = original.iterator();
        while (orIt.hasNext()) {

            final Object orItem = orIt.next();

            boolean isRemoved = true;
            for (Object dtoItem : dtos) {

                if (matcher.match(dtoItem, orItem)) {
                    isRemoved = false;
                    break;
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.