예제 #1
0
 /**
  * @param mapping
  * @param target
  * @return The supplied mapping if it remains incomplete, else a new mapping mapped via the
  *     delegate
  */
 public MappingOperation<?, ?> setTarget(
     final MappingOperation<?, ?> mapping, final Model target) {
   if (mapping.getType() == null) {
     ((MappingPlaceholder) mapping).setTarget(target);
   }
   return update(mapping, mapping.getSource(), target, MAPPING_TARGET);
 }
예제 #2
0
 /**
  * @param mapping
  * @param source
  * @return The supplied mapping if it remains incomplete, else a new mapping mapped via the
  *     delegate
  */
 public MappingOperation<?, ?> setSource(
     final MappingOperation<?, ?> mapping, final Object source) {
   if (mapping.getType() == null) {
     ((MappingPlaceholder) mapping).setSource(source);
   }
   return update(mapping, source, (Model) mapping.getTarget(), MAPPING_SOURCE);
 }
예제 #3
0
 /**
  * @param mapping
  * @param language
  * @param expression
  * @return The supplied mapping if it remains incomplete, else a new mapping mapped via the
  *     delegate
  */
 public MappingOperation<?, ?> setSourceExpression(
     final MappingOperation<?, ?> mapping, final String language, final String expression) {
   if (mapping.getType() == null) {
     ((MappingPlaceholder) mapping).setSource(new ExpressionPlaceholder(language, expression));
   } else {
     delegate.removeMapping(mapping);
   }
   return update(mapping, language, expression, (Model) mapping.getTarget(), MAPPING_SOURCE);
 }