com.u2d.element
Class Field

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
All Implemented Interfaces:
Searchable, ChangeNotifier, ComplexEObject, EObject, PostChangeNotifier, PropertyChangeNotifier, Typed, Viewable, PersistorListener, AppEventNotifier, Restrictable, ValidationNotifier, java.awt.datatransfer.Transferable, java.io.Serializable
Direct Known Subclasses:
AssociationField, CompositeField, IndexedField

public abstract class Field
extends Member
implements java.io.Serializable, Restrictable

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.Class _clazz
           
protected  java.lang.reflect.Method _getter
           
protected  boolean _restrictEdit
           
protected  java.lang.reflect.Method _setter
           
protected  boolean _sortable
           
protected  java.lang.String _sortPropertyName
           
protected  ComplexType _type
           
static java.lang.String[] 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
Field()
           
Field(FieldParent parent, java.beans.PropertyDescriptor descriptor)
           
Field(FieldParent parent, java.lang.String name)
           
 
Method Summary
 void applyMetadata()
           
 void applyRestriction(Restriction restriction)
           
 int colsize()
           
 Field copy()
           
 EObject createInstance()
           
 int displaysize()
           
 boolean equals(java.lang.Object obj)
           
abstract  ComplexType fieldtype()
          1.
static Field forPath(java.lang.String fieldPath)
           
abstract  EObject get(ComplexEObject parent)
           
 java.lang.String getCleanPath()
           
 IntEO getColsize()
           
static java.lang.Class getCustomTypeImplementorClass()
           
 IntEO getDisplaysize()
           
 java.lang.String getFullPath()
           
 java.lang.Class getJavaClass()
           
 java.lang.String getNaturalPath()
           
 java.lang.String getPath()
           
 BooleanEO getRequired()
           
 Required getRequired(ComplexEObject parent)
           
 java.lang.String getSortPropertyName()
           
abstract  EView getView(ComplexEObject parent)
           
 int hashCode()
           
protected  void init(FieldParent parent, java.beans.PropertyDescriptor descriptor)
           
abstract  boolean isAbstract()
           
 boolean isAggregate()
           
 boolean isAssociable()
           
 boolean isAssociation()
           
 boolean isAtomic()
           
 boolean isChoice()
           
 boolean isComposite()
           
 boolean isEmpty(ComplexEObject parent)
           
 boolean isHidden()
           
 boolean isIndexed()
           
 boolean isInherited()
           
abstract  boolean isInterfaceType()
           
 boolean isSearchable()
           
 boolean isSortable()
           
 boolean isTabView()
           
 void liftRestriction(Restriction restriction)
           
 java.lang.Object reflectGet(EObject parent)
           
 boolean required()
           
 void restore(ComplexEObject parent, java.lang.Object value)
           
abstract  void set(ComplexEObject parent, java.lang.Object value)
           
 void setHidden(boolean hidden)
           
 void setInherited(boolean inherited)
           
 void setRequiredMethod(java.lang.reflect.Method method)
           
 void setSearchable(boolean value)
           
abstract  void setState(ComplexEObject parent, State state)
           
 void setTabView(boolean isTabView)
           
 Title title()
           
 java.lang.String toString()
           
abstract  int validate(ComplexEObject parent)
           
 
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

_clazz

protected java.lang.Class _clazz

_type

protected ComplexType _type

_getter

protected transient java.lang.reflect.Method _getter

_setter

protected transient java.lang.reflect.Method _setter

fieldOrder

public static java.lang.String[] fieldOrder

_sortPropertyName

protected java.lang.String _sortPropertyName

_sortable

protected boolean _sortable

_restrictEdit

protected boolean _restrictEdit
Constructor Detail

Field

public Field()

Field

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

Field

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

init

protected void init(FieldParent parent,
                    java.beans.PropertyDescriptor descriptor)

reflectGet

public java.lang.Object reflectGet(EObject parent)

get

public abstract EObject get(ComplexEObject parent)

set

public abstract void set(ComplexEObject parent,
                         java.lang.Object value)

restore

public void restore(ComplexEObject parent,
                    java.lang.Object value)

getView

public abstract EView getView(ComplexEObject parent)

validate

public abstract int validate(ComplexEObject parent)

setState

public abstract void setState(ComplexEObject parent,
                              State state)

createInstance

public EObject createInstance()

setInherited

public void setInherited(boolean inherited)

isInherited

public boolean isInherited()

isAssociable

public boolean isAssociable()

isInterfaceType

public abstract boolean isInterfaceType()

isAbstract

public abstract boolean isAbstract()

fieldtype

public abstract ComplexType fieldtype()
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


isAtomic

public boolean isAtomic()

isAggregate

public boolean isAggregate()

isChoice

public boolean isChoice()

isIndexed

public boolean isIndexed()

isComposite

public boolean isComposite()

isAssociation

public boolean isAssociation()

isSearchable

public boolean isSearchable()

setSearchable

public void setSearchable(boolean value)

getSortPropertyName

public java.lang.String getSortPropertyName()

isSortable

public boolean isSortable()

getJavaClass

public java.lang.Class getJavaClass()

getPath

public java.lang.String getPath()

getCleanPath

public java.lang.String getCleanPath()

getNaturalPath

public java.lang.String getNaturalPath()

getFullPath

public java.lang.String getFullPath()

isEmpty

public boolean isEmpty(ComplexEObject parent)

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class AbstractComplexEObject

toString

public java.lang.String toString()
Overrides:
toString in class ProgrammingElement

copy

public Field copy()
           throws java.beans.IntrospectionException
Throws:
java.beans.IntrospectionException

forPath

public static Field forPath(java.lang.String fieldPath)

getCustomTypeImplementorClass

public static java.lang.Class getCustomTypeImplementorClass()

title

public Title title()
Specified by:
title in interface EObject
Overrides:
title in class ProgrammingElement

isHidden

public boolean isHidden()

setHidden

public void setHidden(boolean hidden)

applyRestriction

public void applyRestriction(Restriction restriction)
Specified by:
applyRestriction in interface Restrictable

liftRestriction

public void liftRestriction(Restriction restriction)
Specified by:
liftRestriction in interface Restrictable

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getRequired

public BooleanEO getRequired()

required

public boolean required()

getColsize

public IntEO getColsize()

colsize

public int colsize()

getDisplaysize

public IntEO getDisplaysize()

displaysize

public int displaysize()

setRequiredMethod

public void setRequiredMethod(java.lang.reflect.Method method)

getRequired

public Required getRequired(ComplexEObject parent)

isTabView

public boolean isTabView()

setTabView

public void setTabView(boolean isTabView)

applyMetadata

public void applyMetadata()