Package com.codiform.moo

Examples of com.codiform.moo.UnsupportedTranslationException


        updateCollectionWithMatcher( sourceCollection, destinationCollection, translationSource, property );
      } else {
        updateCollectionInOrder( sourceCollection, destinationCollection, translationSource, property );
      }
    } else {
      throw new UnsupportedTranslationException( "Cannot update Collection from " + source.getClass().getName() );
    }
  }
View Full Code Here


  public void updateMap( Object source, Map<Object, Object> destinationMap, TranslationSource translationSource, MapProperty property ) {
    if ( source instanceof Map ) {
      Map<Object, Object> sourceMap = (Map<Object, Object>)source;
      updateMapByKey( sourceMap, destinationMap, translationSource, property );
    } else {
      throw new UnsupportedTranslationException( "Cannot update Map from " + source.getClass().getName() );
    }
  }
View Full Code Here

        return translatorFactory.getArrayTranslator().copyTo( value, fieldType );
      } else {
        return translatorFactory.getArrayTranslator().translate( value, fieldType.getComponentType(), translationSource );
      }
    } else {
      throw new UnsupportedTranslationException( String.format( "Cannot translate from source array type %s[] to destination type %s",
          valueType.getComponentType(), fieldType.getName() ) );
    }
  }
View Full Code Here

    }
  }

  private Map<?, ?> copyMap(Map<?, ?> values, CollectionProperty property) {
    if( property.shouldItemsBeTranslated() ) {
      throw new UnsupportedTranslationException(
          "Support for translated maps not yet built." );
    } else if( configuration.isPerformingDefensiveCopies() ) {
      return new HashMap<Object, Object>(
          values );
    } else {
View Full Code Here

        return defensivelyCopySortedMap( value );
      } else {
        return value;
      }
    } else {
      throw new UnsupportedTranslationException(
          "Support for translated sorted maps not yet built" );
    }
  }
View Full Code Here

      Class<?> annotationValue = property.getItemTranslationType();
      if( Comparable.class.isAssignableFrom( annotationValue ) ) {
        return copyAndTranslateSortedSet( original, translationSource,
            annotationValue );
      } else {
        throw new UnsupportedTranslationException(
            "Naturally sorted set cannot be translated into another naturally-sorted set if the destination type is not comparable: "
                + annotationValue );
      }
    } else {
      throw new UnsupportedTranslationException(
          "Support for translated sorted sets with comparators not yet built" );
    }
  }
View Full Code Here

    if( source instanceof Map ) {
      Map<Object, Object> sourceMap = (Map<Object, Object>) source;
      updateMapByKey( sourceMap, destinationMap,
          translationSource, property );
    } else {
      throw new UnsupportedTranslationException(
          "Cannot update Map from "
              + source.getClass().getName() );
    }
  }
View Full Code Here

        updateCollectionInOrder( sourceCollection,
            destinationCollection,
            translationSource, property );
      }
    } else {
      throw new UnsupportedTranslationException(
          "Cannot update Collection from "
              + source.getClass().getName() );
    }
  }
View Full Code Here

TOP

Related Classes of com.codiform.moo.UnsupportedTranslationException

Copyright © 2018 www.massapicom. 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.