All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nakedobjects.noa.reflect.ValueAssociation Maven / Gradle / Ivy

The newest version!
package org.nakedobjects.noa.reflect;

import org.nakedobjects.noa.adapter.NakedObject;
import org.nakedobjects.noa.adapter.NakedValue;


/**
 * Provides reflective access to a field on a domain object that is used to hold a value.
 */
public interface ValueAssociation extends ScalarAssociation, ValueFeature{

    /*/
     * Determines if this association can be cleared.  This will return false for Java primitive types.
     */
    boolean canClear();

    /**
     * Clear this value field (make it null if it is value object or pass on the clear request
     * to the value if it is a value holder) in the specified object.
     */
    void clearValue(NakedObject inObject);
    
    Formatter getFormatter();
    
    
    /**
     * Initialise this field in the specified object with the specified value
     */
    void initValue(NakedObject inObject, NakedValue value);
    

    /**
     * Determines if the specified value is valid for setting this field in the specified object.
     */
    Consent isValueValid(NakedObject inObject, NakedValue value);

    /**
     * Set up the field in the specified object with the specified value - this call sets up the logical state
     * of the object. To initialise a recreated object the initValue method should be used.
     * 
     * @see #initValue(NakedObject, NakedValue)
     */
    void setValue(NakedObject inObject, NakedValue value);

}
// Copyright (c) Naked Objects Group Ltd.




© 2015 - 2024 Weber Informatics LLC | Privacy Policy