com.u2d.model
Class AbstractComplexEObject

java.lang.Object
  extended by com.u2d.model.AbstractEObject
      extended by com.u2d.model.AbstractComplexEObject
All Implemented Interfaces:
Searchable, ChangeNotifier, ComplexEObject, EObject, PostChangeNotifier, PropertyChangeNotifier, Typed, Viewable, PersistorListener, AppEventNotifier, ValidationNotifier, java.awt.datatransfer.Transferable, java.io.Serializable
Direct Known Subclasses:
AbstractChoiceEO, Business, BusinessContact, CalendarEO, Calendrier, CalEvent, ComplexType, CompositeQuery, Contact, EmploymentInfo, Folder, LoggedEvent, Name, Note, NullComplexEObject, Person, ProgrammingElement, QuerySpecification, Restriction, Role, Schedule, ScheduleEO, SimpleQuery, SimpleReport, USAddress, User

public abstract class AbstractComplexEObject
extends AbstractEObject
implements ComplexEObject

Author:
Eitan Suez
See Also:
Serialized Form

Nested Class Summary
 class AbstractComplexEObject.EditState
           
 class AbstractComplexEObject.NullState
           
 class AbstractComplexEObject.ReadState
           
 class AbstractComplexEObject.TransientState
           
 
Field Summary
protected  java.util.Map _associations
           
protected  javax.swing.event.SwingPropertyChangeSupport _changeSupport
           
protected  DateTime _createdOn
           
protected  State _currentState
           
protected  State _editState
           
protected  State _nullState
           
protected  State _readState
           
protected  java.util.Map _stateMap
           
protected  State _transientState
           
protected  ComplexType _type
           
static java.lang.String[] commandOrderEditState
           
static java.lang.String[] commandOrderReadState
           
static java.lang.String[] commandOrderTransientState
           
static java.lang.String[] readOnly
           
 
Fields inherited from class com.u2d.model.AbstractEObject
_listenerList, _postListeners, _validationEvent, _validationListenerList, changeEvent
 
Constructor Summary
AbstractComplexEObject()
           
 
Method Summary
 void addAppEventListener(java.lang.String evtType, AppEventListener l)
           
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
           
 Association association(java.lang.String propName)
           
 void cancelTransition()
           
 java.util.List childFields()
           
static java.lang.String cleanCGILibEnhancer(java.lang.Object obj)
           
 void clearEditor()
           
 Command command(java.lang.String commandName)
           
 Command command(java.lang.String commandName, State state)
           
 Onion commands()
           
 ComplexEObject createInstance(java.lang.Class typeClass)
           
 Command defaultCommand()
           
 java.lang.String defaultCommandName()
           
 void delete()
           
 boolean doSave()
           
 boolean equals(java.lang.Object obj)
           
 Field field(java.lang.String propName)
           
 java.util.List<Field> fieldSublist(java.lang.String[] fieldnameList)
           
 void fireAppEventNotification(java.lang.String evtType)
           
 void fireAppEventNotification(java.lang.String evtType, java.lang.Object target)
           
 void firePropertyChange(java.beans.PropertyChangeEvent event)
           
 void firePropertyChange(java.lang.String propertyName, boolean oldValue, boolean newValue)
           
 void firePropertyChange(java.lang.String propertyName, int oldValue, int newValue)
           
 void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
           
 DateTime getCreatedOn()
           
 BooleanEO getDeleted()
           
 DateTime getDeletedOn()
           
 ComplexEView getExpandableView()
           
 ComplexEView getFormView()
           
 ComplexEView getIconView()
           
 java.lang.Long getID()
           
 java.util.List getInequalities()
           
 ComplexEView getListItemView()
           
 EView getMainView()
           
 State getState()
           
 ComplexEView getTabBodyView()
           
 java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
           
 java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
           
 ComplexEView getTreeView()
           
 EView getView()
           
 javax.swing.Icon iconLg()
           
 javax.swing.Icon iconSm()
           
 void initialize()
           
 boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor f)
           
 boolean isEditableState()
           
 boolean isEditState()
           
 boolean isEmpty()
           
 boolean isMeta()
           
 boolean isNullState()
           
 boolean isTransientState()
           
static void log(java.lang.String typeString, EOCommand cmd, java.lang.String msg)
           
 EObject makeCopy()
           
 void onBeforeCreate()
           
 void onBeforeSave()
           
 void onCreate()
           
 void onDelete()
           
 void onLoad()
           
 void onSave()
           
protected  void popState()
           
protected  void pushState(State state)
           
 void removeAppEventListener(java.lang.String evtType, AppEventListener l)
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
           
 void restoreCopy()
           
 State restoredState()
           
 void restoreState()
           
 void save()
           
 void saveCopy()
           
 void setEditor(Editor editor)
           
 void setEditState()
           
 void setID(java.lang.Long id)
           
 void setNullState()
           
 void setReadState()
           
 void setStartState()
           
 void setState(State state)
           
protected  void setState(State state, boolean shallow)
           
 void setTransientState()
           
 void setValue(EObject value)
           
 void setValue(EObject value, boolean forCopy)
           
 State startState()
           
abstract  Title title()
           
 java.lang.String toString()
           
 javax.swing.tree.TreeModel treeModel()
           
 ComplexType type()
           
 int 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, hashCode, 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

_type

protected ComplexType _type

_transientState

protected transient State _transientState

_editState

protected transient State _editState

_readState

protected transient State _readState

_nullState

protected transient State _nullState

_stateMap

protected transient java.util.Map _stateMap

_currentState

protected transient State _currentState

readOnly

public static java.lang.String[] readOnly

_associations

protected java.util.Map _associations

_changeSupport

protected transient javax.swing.event.SwingPropertyChangeSupport _changeSupport

commandOrderEditState

public static java.lang.String[] commandOrderEditState

commandOrderTransientState

public static java.lang.String[] commandOrderTransientState

commandOrderReadState

public static java.lang.String[] commandOrderReadState

_createdOn

protected final DateTime _createdOn
Constructor Detail

AbstractComplexEObject

public AbstractComplexEObject()
Method Detail

initialize

public void initialize()
Specified by:
initialize in interface ComplexEObject

type

public ComplexType type()
Specified by:
type in interface ComplexEObject
Specified by:
type in interface Typed

onLoad

public void onLoad()
Specified by:
onLoad in interface PersistorListener

onDelete

public void onDelete()
Specified by:
onDelete in interface PersistorListener

onBeforeSave

public void onBeforeSave()
Specified by:
onBeforeSave in interface PersistorListener

onSave

public void onSave()
Specified by:
onSave in interface PersistorListener

onBeforeCreate

public void onBeforeCreate()
Specified by:
onBeforeCreate in interface PersistorListener

onCreate

public void onCreate()
Specified by:
onCreate in interface PersistorListener

setStartState

public void setStartState()
Specified by:
setStartState in interface ComplexEObject

restoreState

public void restoreState()
Specified by:
restoreState in interface ComplexEObject

startState

public State startState()

restoredState

public State restoredState()

setReadState

public void setReadState()
Specified by:
setReadState in interface ComplexEObject

isEditState

public boolean isEditState()
Specified by:
isEditState in interface ComplexEObject

setEditState

public void setEditState()
Specified by:
setEditState in interface ComplexEObject

isTransientState

public boolean isTransientState()
Specified by:
isTransientState in interface ComplexEObject

setTransientState

public void setTransientState()
Specified by:
setTransientState in interface ComplexEObject

isEditableState

public boolean isEditableState()
Specified by:
isEditableState in interface ComplexEObject

isNullState

public boolean isNullState()
Specified by:
isNullState in interface ComplexEObject

setNullState

public void setNullState()
Specified by:
setNullState in interface ComplexEObject

getState

public State getState()
Specified by:
getState in interface ComplexEObject

setState

public void setState(State state)
Specified by:
setState in interface ComplexEObject

setState

protected void setState(State state,
                        boolean shallow)

pushState

protected void pushState(State state)

popState

protected void popState()

cancelTransition

public void cancelTransition()
Specified by:
cancelTransition in interface ComplexEObject

childFields

public java.util.List childFields()
Specified by:
childFields in interface ComplexEObject

field

public Field field(java.lang.String propName)
Specified by:
field in interface ComplexEObject

fieldSublist

public java.util.List<Field> fieldSublist(java.lang.String[] fieldnameList)

association

public Association association(java.lang.String propName)
Specified by:
association in interface ComplexEObject

command

public Command command(java.lang.String commandName)
Specified by:
command in interface ComplexEObject

command

public Command command(java.lang.String commandName,
                       State state)

commands

public Onion commands()
Specified by:
commands in interface EObject
Specified by:
commands in class AbstractEObject

defaultCommandName

public java.lang.String defaultCommandName()
Specified by:
defaultCommandName in interface ComplexEObject

defaultCommand

public Command defaultCommand()
Specified by:
defaultCommand in interface ComplexEObject

setEditor

public void setEditor(Editor editor)
Specified by:
setEditor in interface ComplexEObject

clearEditor

public void clearEditor()
Specified by:
clearEditor in interface ComplexEObject

iconSm

public javax.swing.Icon iconSm()
Specified by:
iconSm in interface EObject

iconLg

public javax.swing.Icon iconLg()
Specified by:
iconLg in interface EObject

title

public abstract Title title()
Specified by:
title in interface EObject
Specified by:
title in class AbstractEObject

toString

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

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface EObject
Specified by:
isEmpty in class AbstractEObject

equals

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

cleanCGILibEnhancer

public static java.lang.String cleanCGILibEnhancer(java.lang.Object obj)

getIconView

public ComplexEView getIconView()
Specified by:
getIconView in interface ComplexEObject

getListItemView

public ComplexEView getListItemView()
Specified by:
getListItemView in interface ComplexEObject

getFormView

public ComplexEView getFormView()
Specified by:
getFormView in interface ComplexEObject

getTabBodyView

public ComplexEView getTabBodyView()
Specified by:
getTabBodyView in interface ComplexEObject

getExpandableView

public ComplexEView getExpandableView()
Specified by:
getExpandableView in interface ComplexEObject

getTreeView

public ComplexEView getTreeView()
Specified by:
getTreeView in interface ComplexEObject

getView

public EView getView()
Specified by:
getView in interface Viewable
Specified by:
getView in class AbstractEObject

getMainView

public EView getMainView()
Specified by:
getMainView in interface Viewable

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               java.lang.Object oldValue,
                               java.lang.Object newValue)
Specified by:
firePropertyChange in interface PropertyChangeNotifier

firePropertyChange

public void firePropertyChange(java.beans.PropertyChangeEvent event)
Specified by:
firePropertyChange in interface PropertyChangeNotifier

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               int oldValue,
                               int newValue)
Specified by:
firePropertyChange in interface PropertyChangeNotifier

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               boolean oldValue,
                               boolean newValue)
Specified by:
firePropertyChange in interface PropertyChangeNotifier

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Specified by:
addPropertyChangeListener in interface PropertyChangeNotifier

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String propertyName,
                                      java.beans.PropertyChangeListener listener)
Specified by:
addPropertyChangeListener in interface PropertyChangeNotifier

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Specified by:
removePropertyChangeListener in interface PropertyChangeNotifier

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String propertyName,
                                         java.beans.PropertyChangeListener listener)
Specified by:
removePropertyChangeListener in interface PropertyChangeNotifier

doSave

public boolean doSave()
Specified by:
doSave in interface ComplexEObject

validate

public int validate()
Specified by:
validate in interface EObject
Specified by:
validate in class AbstractEObject

save

public void save()
Specified by:
save in interface ComplexEObject

delete

public void delete()
Specified by:
delete in interface ComplexEObject

saveCopy

public void saveCopy()

restoreCopy

public void restoreCopy()

makeCopy

public EObject makeCopy()
Specified by:
makeCopy in interface EObject
Specified by:
makeCopy in class AbstractEObject

setValue

public void setValue(EObject value)
Specified by:
setValue in interface EObject
Specified by:
setValue in class AbstractEObject

setValue

public void setValue(EObject value,
                     boolean forCopy)
Specified by:
setValue in interface ComplexEObject

getID

public java.lang.Long getID()
Specified by:
getID in interface ComplexEObject

setID

public void setID(java.lang.Long id)
Specified by:
setID in interface ComplexEObject

getCreatedOn

public DateTime getCreatedOn()
Specified by:
getCreatedOn in interface ComplexEObject

getDeleted

public BooleanEO getDeleted()

getDeletedOn

public DateTime getDeletedOn()

getTransferData

public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
                                 throws java.awt.datatransfer.UnsupportedFlavorException
Specified by:
getTransferData in interface java.awt.datatransfer.Transferable
Throws:
java.awt.datatransfer.UnsupportedFlavorException

getTransferDataFlavors

public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
Specified by:
getTransferDataFlavors in interface java.awt.datatransfer.Transferable

isDataFlavorSupported

public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor f)
Specified by:
isDataFlavorSupported in interface java.awt.datatransfer.Transferable

addAppEventListener

public void addAppEventListener(java.lang.String evtType,
                                AppEventListener l)
Specified by:
addAppEventListener in interface AppEventNotifier

removeAppEventListener

public void removeAppEventListener(java.lang.String evtType,
                                   AppEventListener l)
Specified by:
removeAppEventListener in interface AppEventNotifier

fireAppEventNotification

public void fireAppEventNotification(java.lang.String evtType)
Specified by:
fireAppEventNotification in interface AppEventNotifier

fireAppEventNotification

public void fireAppEventNotification(java.lang.String evtType,
                                     java.lang.Object target)

getInequalities

public java.util.List getInequalities()
Specified by:
getInequalities in interface Searchable

createInstance

public ComplexEObject createInstance(java.lang.Class typeClass)

treeModel

public javax.swing.tree.TreeModel treeModel()
Specified by:
treeModel in interface ComplexEObject

isMeta

public boolean isMeta()
Specified by:
isMeta in interface ComplexEObject

log

public static void log(java.lang.String typeString,
                       EOCommand cmd,
                       java.lang.String msg)