com.u2d.field
Class AssociationField

java.lang.Object
  extended by com.u2d.model.AbstractEObject
      extended by com.u2d.model.AbstractComplexEObject
          extended by com.u2d.element.ProgrammingElement
              extended by com.u2d.element.Member
                  extended by com.u2d.element.Field
                      extended by com.u2d.field.AssociationField
All Implemented Interfaces:
Associable, Bidi, Searchable, ChangeNotifier, ComplexEObject, EObject, PostChangeNotifier, PropertyChangeNotifier, Typed, Viewable, PersistorListener, AppEventNotifier, Restrictable, ValidationNotifier, java.awt.datatransfer.Transferable, java.io.Serializable

public class AssociationField
extends Field
implements Bidi, Associable

Author:
Eitan Suez
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.u2d.model.AbstractComplexEObject
AbstractComplexEObject.EditState, AbstractComplexEObject.NullState, AbstractComplexEObject.ReadState, AbstractComplexEObject.TransientState
 
Field Summary
protected  java.lang.reflect.Method _associator
           
protected  ComplexEObject _defaultValue
           
protected  java.lang.reflect.Method _dissociator
           
 
Fields inherited from class com.u2d.element.Field
_clazz, _getter, _restrictEdit, _setter, _sortable, _sortPropertyName, _type, fieldOrder
 
Fields inherited from class com.u2d.element.Member
_mnemonic, _parent
 
Fields inherited from class com.u2d.element.ProgrammingElement
_label, _name
 
Fields inherited from class com.u2d.model.AbstractComplexEObject
_associations, _changeSupport, _createdOn, _currentState, _editState, _nullState, _readState, _stateMap, _transientState, commandOrderEditState, commandOrderReadState, commandOrderTransientState, readOnly
 
Fields inherited from class com.u2d.model.AbstractEObject
_listenerList, _postListeners, _validationEvent, _validationListenerList, changeEvent
 
Constructor Summary
AssociationField(FieldParent parent, java.beans.PropertyDescriptor descriptor)
           
AssociationField(FieldParent parent, java.lang.String name)
           
 
Method Summary
 Association association(ComplexEObject parent)
           
 ComplexType fieldtype()
          1.
 EObject get(ComplexEObject parent)
           
 ComplexEObject getDefaultValue()
           
 EView getView(ComplexEObject parent)
           
protected  boolean hasAssociateMethod()
           
 boolean isAbstract()
           
 boolean isInterfaceType()
           
protected  void reflectAssociate(EObject parent, java.lang.Object value)
           
protected  void reflectMethod(java.lang.reflect.Method method, EObject parent, java.lang.Object value)
           
protected  void reflectSet(EObject parent, java.lang.Object value)
           
 void restore(ComplexEObject parent, java.lang.Object value)
           
 void set(ComplexEObject parent, java.lang.Object value)
           
 void setDefaultSpec(java.lang.String spec)
           
 void setInverse(java.lang.String inverseFieldName)
           
 void setInverseField(Field inverseField)
           
 void setState(ComplexEObject parent, State state)
           
 int validate(ComplexEObject parent)
           
 
Methods inherited from class com.u2d.element.Field
applyMetadata, applyRestriction, colsize, copy, createInstance, displaysize, equals, forPath, getCleanPath, getColsize, getCustomTypeImplementorClass, getDisplaysize, getFullPath, getJavaClass, getNaturalPath, getPath, getRequired, getRequired, getSortPropertyName, hashCode, init, isAggregate, isAssociable, isAssociation, isAtomic, isChoice, isComposite, isEmpty, isHidden, isIndexed, isInherited, isSearchable, isSortable, isTabView, liftRestriction, reflectGet, required, setHidden, setInherited, setRequiredMethod, setSearchable, setTabView, title, toString
 
Methods inherited from class com.u2d.element.Member
getMnemonic, hasMnemonic, member, nameComparator, parent, setMnemonic
 
Methods inherited from class com.u2d.element.ProgrammingElement
deriveLabel, deriveLabel, getLabel, getName, isMeta, label, name
 
Methods inherited from class com.u2d.model.AbstractComplexEObject
addAppEventListener, addPropertyChangeListener, addPropertyChangeListener, association, cancelTransition, childFields, cleanCGILibEnhancer, clearEditor, command, command, commands, createInstance, defaultCommand, defaultCommandName, delete, doSave, field, fieldSublist, fireAppEventNotification, fireAppEventNotification, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCreatedOn, getDeleted, getDeletedOn, getExpandableView, getFormView, getIconView, getID, getInequalities, getListItemView, getMainView, getState, getTabBodyView, getTransferData, getTransferDataFlavors, getTreeView, getView, iconLg, iconSm, initialize, isDataFlavorSupported, isEditableState, isEditState, isEmpty, isNullState, isTransientState, log, makeCopy, onBeforeCreate, onBeforeSave, onCreate, onDelete, onLoad, onSave, popState, pushState, removeAppEventListener, removePropertyChangeListener, removePropertyChangeListener, restoreCopy, restoredState, restoreState, save, saveCopy, setEditor, setEditState, setID, setNullState, setReadState, setStartState, setState, setState, setTransientState, setValue, setValue, startState, treeModel, type, validate
 
Methods inherited from class com.u2d.model.AbstractEObject
addChangeListener, addPostChangeListener, addValidationListener, currentUser, field, fireStateChanged, fireValidationException, fireValidationException, hbmPersistor, parentObject, persistor, removeChangeListener, removePostChangeListener, removeValidationListener, setField, vmech
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.u2d.model.EObject
field, parentObject, setField
 
Methods inherited from interface com.u2d.validation.ValidationNotifier
addValidationListener, fireValidationException, fireValidationException, removeValidationListener
 
Methods inherited from interface com.u2d.model.ChangeNotifier
addChangeListener, fireStateChanged, removeChangeListener
 
Methods inherited from interface com.u2d.model.PostChangeNotifier
addPostChangeListener, fireStateChanged, removePostChangeListener
 

Field Detail

_defaultValue

protected ComplexEObject _defaultValue

_associator

protected transient java.lang.reflect.Method _associator

_dissociator

protected transient java.lang.reflect.Method _dissociator
Constructor Detail

AssociationField

public AssociationField(FieldParent parent,
                        java.lang.String name)
                 throws java.beans.IntrospectionException
Throws:
java.beans.IntrospectionException

AssociationField

public AssociationField(FieldParent parent,
                        java.beans.PropertyDescriptor descriptor)
Method Detail

setInverse

public void setInverse(java.lang.String inverseFieldName)

setInverseField

public void setInverseField(Field inverseField)
Specified by:
setInverseField in interface Bidi

association

public Association association(ComplexEObject parent)
Specified by:
association in interface Associable

get

public EObject get(ComplexEObject parent)
Specified by:
get in class Field

restore

public void restore(ComplexEObject parent,
                    java.lang.Object value)
Overrides:
restore in class Field

set

public void set(ComplexEObject parent,
                java.lang.Object value)
Specified by:
set in class Field

hasAssociateMethod

protected boolean hasAssociateMethod()

reflectSet

protected void reflectSet(EObject parent,
                          java.lang.Object value)

reflectAssociate

protected void reflectAssociate(EObject parent,
                                java.lang.Object value)

reflectMethod

protected void reflectMethod(java.lang.reflect.Method method,
                             EObject parent,
                             java.lang.Object value)

getView

public EView getView(ComplexEObject parent)
Specified by:
getView in class Field

validate

public int validate(ComplexEObject parent)
Specified by:
validate in class Field

setState

public void setState(ComplexEObject parent,
                     State state)
Specified by:
setState in class Field

getDefaultValue

public ComplexEObject getDefaultValue()

setDefaultSpec

public void setDefaultSpec(java.lang.String spec)

isInterfaceType

public boolean isInterfaceType()
Specified by:
isInterfaceType in class Field

isAbstract

public boolean isAbstract()
Specified by:
isAbstract in class Field

fieldtype

public ComplexType fieldtype()
Description copied from class: Field
1. lazy derivation of type from class avoids infinite recursion when harvesting if this were placed eagerly in Field's constructor 2. named fieldtype() so as not to conflict with complexeobject.type() which now has become a superclass of field

Specified by:
fieldtype in class Field