/** * Clear an association *-to-one * @see net.mdatools.modelant.core.operation.element.NavigateObjectPath#processLast(javax.jmi.reflect.RefFeatured, javax.jmi.reflect.RefFeatured, java.lang.String, javax.jmi.reflect.RefFeatured) */ protected RefFeatured processLast(RefFeatured start, RefFeatured current, String itemName, RefFeatured associated) { current.refSetValue( itemName, value ); return current; }
String prefixNested; metaObject = (MofClass) object.refMetaObject(); prefixNested = prefix+" "; value = object.refGetValue( contents );
result = ((RefFeatured) startFrom).refGetValue( itemName ); } catch (JmiException ex) { throw new IllegalArgumentException(" Retrieving the value of field '"+itemName+"'"
/** * Clear an association *-to-one * @see net.mdatools.modelant.core.operation.element.NavigateObjectPath#processLast(javax.jmi.reflect.RefFeatured, javax.jmi.reflect.RefFeatured, java.lang.String, javax.jmi.reflect.RefFeatured) */ protected RefFeatured processLast(RefFeatured start, RefFeatured current, String itemName, RefFeatured associated) { current.refSetValue( itemName, value ); return current; }
/** * Clear an association *-to-one * @see net.mdatools.modelant.core.operation.element.NavigateObjectPath#processLast(javax.jmi.reflect.RefFeatured, javax.jmi.reflect.RefFeatured, java.lang.String, javax.jmi.reflect.RefFeatured) */ protected RefFeatured processLast(RefFeatured start, RefFeatured current, String itemName, RefFeatured associated) { current.refSetValue( itemName, null ); return current; }
/** * @see net.mdatools.modelant.core.operation.element.NavigateObjectPath#processLast(javax.jmi.reflect.RefFeatured, javax.jmi.reflect.RefFeatured, java.lang.String, java.lang.Object) */ protected RefFeatured processLast(RefFeatured start, RefFeatured current, String itemName, Object value) { if ( value instanceof Collection ) { // clear association to many ((Collection) value).clear(); } else { // clearing an attribute current.refSetValue( itemName, null ); } return current; } }
/** * @see net.mdatools.modelant.core.operation.element.NavigateObjectPath#processLast(javax.jmi.reflect.RefFeatured, javax.jmi.reflect.RefFeatured, java.lang.String, java.lang.Object) */ protected RefFeatured processLast(RefFeatured start, RefFeatured current, String itemName, Object actualValue) { if ( actualValue instanceof Collection ) { // association to many if ( value instanceof Collection) { // associate to many ((Collection) actualValue).clear(); ((Collection) actualValue).addAll( (Collection) value ); } else { // associate to one ((Collection) actualValue).clear(); ((Collection) actualValue).add( value ); } } else { // set an attribute current.refSetValue(itemName, value ); } return current; } }