Object temp = _handler.getValue(target);
Object temp = _handler.getValue(target);
Object val = _handler.getValue(target); if (val == null) { return val;
Object val = _handler.getValue(target); if (val == null) { return val;
Object val = _handler.getValue(target); if (val == null) { return val;
/** * Returns the value of the field from the object. If mode is MODE_CHILD_LINK or mode is MODE_AUTO * and the object is a ContainerElement, then the value of the parent is returned. Otherwise, a * new ContainerElement is returned. The value of this new ContainerElement is the value of the * provided object and the parent of the new ContainerElement is the provided object. * * @param object The object to get the value of * @return The value of the field * @throws IllegalStateException The Java object has changed and is no longer supported by this * handler, or the handler is not compatible with the Java object */ public Object getValue(final Object object) throws IllegalStateException { int mode = _mode; if (mode == MODE_AUTO) { if (object instanceof ContainerElement) { mode = MODE_CHILD_LINK; } else { mode = MODE_PARENT_LINK; } } if (mode == MODE_CHILD_LINK) { return _handler.getValue(((ContainerElement) object).getParent()); } // MODE_PARENT_LINK ContainerElement container = new ContainerElement(_handler.getValue(object)); container.setParent(object); return container; } // -- getValue
/** * Acquires the version of the specified object by accessing the given * field. * * @param versionField * the version field. * @param jdoNature * the {@link ClassDescriptorJDONature}. * @param object * the object. * @return the object's version. */ private Long getObjectVersion(final String versionField, final ClassDescriptorJDONature jdoNature, final Object object) { FieldDescriptor versionFieldDescriptor = jdoNature.getField(versionField); return (Long) versionFieldDescriptor.getHandler().getValue(object); }
Object val = _handler.getValue(target); if (val == null) { return val;
private Object followPath(final Object parent) { ClassDescriptor curClassDesc = _classDescriptor; Object curObject = parent; for (int i = 1; i < _pathInfo.size(); i++) { String curFieldName = _pathInfo.elementAt(i); try { ClassDescriptorJDONature nature; nature = new ClassDescriptorJDONature(curClassDesc); FieldDescriptor curFieldDesc = nature.getField(curFieldName); FieldHandler handler = curFieldDesc.getHandler(); curObject = handler.getValue(curObject); curClassDesc = curFieldDesc.getClassDescriptor(); } catch (Exception ex) { throw new NoSuchElementException( "An exception was thrown trying to access get methods to follow " + "the path expression. " + ex.toString()); } } return curObject; } }
if (nestedAtts[i].getHandler().getValue(object) == null) { nestedAtts[i] = null; --nestedAttCount;
Object value = _handler.getValue(object); if ((_autoCollectionIteration) && (value != null)) {
if (fieldHandler != null) { try { id = fieldHandler.getValue(object); } catch (IllegalStateException ise) { err = ise.toString();
/** * Returns the value of the field from the object. * * @param object The object * @return The value of the field * @throws IllegalStateException The Java object has changed and is no longer supported by this * handler, or the handler is not compatiable with the Java object */ public final Object getValue(Object object) throws IllegalStateException { if (_handler == null) { throw new IllegalStateException(NULL_HANDLER_ERR); } Object value = _handler.getValue(object); if ((_autoCollectionIteration) && (value != null)) { if (value instanceof java.util.Enumeration) { return new GFHConverterEnumeration(this, (Enumeration) value); } // -- other collection type? if (CollectionHandlers.hasHandler(value.getClass())) { CollectionHandler colHandler = null; try { colHandler = CollectionHandlers.getHandler(value.getClass()); } catch (MappingException mx) { throw new IllegalStateException(mx.getMessage()); } return new GFHConverterEnumeration(this, colHandler.elements(value)); } } return convertUponGet(value); } // -- getValue
if (fieldHandler != null) { try { id = fieldHandler.getValue(object);
value = _handler.getValue(object); } else if (_field != null) { value = _field.get(object);
Object containerObject = containerFieldDesc.getHandler().getValue(target);
FieldDescriptor fieldDescriptor = classDescriptor.getIdentity(); FieldHandler fieldHandler = fieldDescriptor.getHandler(); id = (String) fieldHandler.getValue(object); } catch (Exception e) { String err = "The object associated with IDREF \"" + object + "\" of type "
FieldDescriptor fieldDescriptor = classDescriptor.getIdentity(); FieldHandler fieldHandler = fieldDescriptor.getHandler(); id = (String) fieldHandler.getValue(object); } catch (Exception e) { String err = "The object associated with IDREF \"" + object
FieldHandler fieldHandler = versionFieldDescriptor.getHandler(); locker.setVersion((Long) fieldHandler.getValue(proposedObject .getEntity()));