com.u2d.model
Class ComplexType

java.lang.Object
  extended by com.u2d.model.AbstractEObject
      extended by com.u2d.model.AbstractComplexEObject
          extended by com.u2d.model.ComplexType
All Implemented Interfaces:
Searchable, ChangeNotifier, ComplexEObject, EObject, FieldParent, PostChangeNotifier, PropertyChangeNotifier, Typed, Viewable, PersistorListener, AppEventNotifier, ValidationNotifier, java.awt.datatransfer.Transferable, java.io.Serializable

public class ComplexType
extends AbstractComplexEObject
implements FieldParent

Author:
Eitan Suez
See Also:
Serialized Form

Nested Class Summary
 class ComplexType.AssociationSearchNode
           
 
Nested classes/interfaces inherited from class com.u2d.model.AbstractComplexEObject
AbstractComplexEObject.EditState, AbstractComplexEObject.NullState, AbstractComplexEObject.ReadState, AbstractComplexEObject.TransientState
 
Field Summary
protected  javax.swing.Icon _iconLg
           
protected  javax.swing.Icon _iconsLg
           
protected  javax.swing.Icon _iconSm
           
protected  javax.swing.Icon _iconsSm
           
static java.lang.String[] commandOrder
           
static java.lang.Class commandsListType
           
static javax.swing.Icon DEFAULTICON_LG
           
static javax.swing.Icon DEFAULTICON_SM
           
static java.lang.Class fieldsListType
           
static javax.swing.Icon LISTICON_LG
           
static javax.swing.Icon LISTICON_SM
           
static java.lang.Class queriesType
           
 
Fields inherited from class com.u2d.model.AbstractComplexEObject
_associations, _changeSupport, _createdOn, _currentState, _editState, _nullState, _readState, _stateMap, _transientState, _type, commandOrderEditState, commandOrderReadState, commandOrderTransientState, readOnly
 
Fields inherited from class com.u2d.model.AbstractEObject
_listenerList, _postListeners, _validationEvent, _validationListenerList, changeEvent
 
Method Summary
 ComplexType abstractType()
           
 void addQuery(CompositeQuery query)
           
static void associateQueries()
           
 AbstractListEO Browse(CommandInfo cmdInfo)
           
 ComplexEObject bufferCopy()
           
 void bufferCopy(ComplexEObject bufferCopy)
           
 java.awt.Color colorCode()
           
 Command command(java.lang.String commandName)
           
 Command command(java.lang.String commandName, java.lang.Class stateClass)
           
 Command command(java.lang.String commandName, State state)
           
 Onion commands()
           
 Onion commands(java.lang.Class stateClass)
           
 Onion commands(State state)
           
 AbstractListEO concreteTypes()
           
 java.lang.String defaultCommandName()
           
 void defaultSearchField(java.lang.String fieldName)
           
 void defaultSearchFieldPath(java.lang.String fieldPath)
           
 boolean equals(java.lang.Object obj)
           
 Field field(java.lang.String propName)
           
 java.util.List fields()
           
 View Find(CommandInfo cmdInfo)
           
 Command findCommand(java.lang.String commandName)
          note it tries to locate a command from the commandslist used only for restoring a command that was saved to persistencemechanism
 void fireAppEventNotification(java.lang.String evtType)
           
 void fireAppEventNotification(java.lang.String evtType, java.lang.Object target)
           
static ComplexType forClass(java.lang.Class targetClass)
           
static ComplexType forObject(ComplexEObject targetObject)
           
 ComplexType[] getAbstractTypes()
           
 RelationalList getCommandsList()
           
static java.lang.Class getCustomTypeImplementorClass()
           
 Field getDefaultSearchField()
           
 RelationalList getFieldsList()
           
 java.awt.datatransfer.DataFlavor getFlavor()
           
 java.lang.Class getJavaClass()
           
 java.lang.String getNaturalName()
           
 java.lang.String getPluralName()
           
 java.lang.String getQualifiedName()
           
 RelationalList getQueries()
           
protected  Onion harvestTypeCommands()
          The reason that cannot just fall back to type().commands() is that static command methods on the class are unique per class and need to be harvested per class.
 boolean hasDefaultSearchField()
           
 int hashCode()
           
 javax.swing.Icon iconLg()
           
 javax.swing.Icon iconsLg()
           
 javax.swing.Icon iconSm()
           
 javax.swing.Icon iconsSm()
           
 java.lang.String ImportFromXML(CommandInfo info)
           
 ComplexEObject instance()
           
 boolean isAbstract()
           
static boolean isAbstract(java.lang.Class cls)
           
 boolean isAssignableFrom(ComplexType type)
           
 boolean isChoice()
           
 boolean isEmpty()
           
 boolean isInterfaceType()
           
 boolean isMeta()
           
 boolean isSingleton()
           
 boolean isSortable()
           
 AbstractListEO list()
           
 java.lang.String name()
           
 ComplexEObject New(CommandInfo cmdInfo)
           
 ComplexEObject New(CommandInfo cmdInfo, ComplexType type)
           
 FieldParent parent()
           
static java.lang.String pluralName()
           
static Reflector reflector()
           
 void removeQuery(CompositeQuery query)
           
 javax.swing.tree.TreeModel searchTreeModel()
           
 void setDefaultSearchField(Field field)
           
 CompositeQuery SmartList(CommandInfo cmdInfo)
           
 java.lang.String sortBy()
           
 Field sortField()
           
 Onion staticCommands()
           
 Title title()
           
 int validate(ComplexEObject instance)
           
 
Methods inherited from class com.u2d.model.AbstractComplexEObject
addAppEventListener, addPropertyChangeListener, addPropertyChangeListener, association, cancelTransition, childFields, cleanCGILibEnhancer, clearEditor, createInstance, defaultCommand, delete, doSave, fieldSublist, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCreatedOn, getDeleted, getDeletedOn, getExpandableView, getFormView, getIconView, getID, getInequalities, getListItemView, getMainView, getState, getTabBodyView, getTransferData, getTransferDataFlavors, getTreeView, getView, initialize, isDataFlavorSupported, isEditableState, isEditState, 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, toString, 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

commandOrder

public static java.lang.String[] commandOrder

_iconSm

protected javax.swing.Icon _iconSm

_iconLg

protected javax.swing.Icon _iconLg

_iconsSm

protected javax.swing.Icon _iconsSm

_iconsLg

protected javax.swing.Icon _iconsLg

DEFAULTICON_SM

public static javax.swing.Icon DEFAULTICON_SM

DEFAULTICON_LG

public static javax.swing.Icon DEFAULTICON_LG

LISTICON_SM

public static javax.swing.Icon LISTICON_SM

LISTICON_LG

public static javax.swing.Icon LISTICON_LG

fieldsListType

public static java.lang.Class fieldsListType

commandsListType

public static java.lang.Class commandsListType

queriesType

public static java.lang.Class queriesType
Method Detail

forClass

public static ComplexType forClass(java.lang.Class targetClass)

forObject

public static ComplexType forObject(ComplexEObject targetObject)

isAbstract

public static boolean isAbstract(java.lang.Class cls)

isAbstract

public boolean isAbstract()
Specified by:
isAbstract in interface FieldParent

isInterfaceType

public boolean isInterfaceType()

isChoice

public boolean isChoice()

isAssignableFrom

public boolean isAssignableFrom(ComplexType type)

concreteTypes

public AbstractListEO concreteTypes()

getAbstractTypes

public ComplexType[] getAbstractTypes()

reflector

public static Reflector reflector()

harvestTypeCommands

protected Onion harvestTypeCommands()
The reason that cannot just fall back to type().commands() is that static command methods on the class are unique per class and need to be harvested per class.


commands

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

staticCommands

public Onion staticCommands()

commands

public Onion commands(State state)

commands

public Onion commands(java.lang.Class stateClass)

command

public Command command(java.lang.String commandName,
                       java.lang.Class stateClass)

command

public Command command(java.lang.String commandName,
                       State state)
Overrides:
command in class AbstractComplexEObject

command

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

findCommand

public Command findCommand(java.lang.String commandName)
note it tries to locate a command from the commandslist used only for restoring a command that was saved to persistencemechanism


defaultCommandName

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

getJavaClass

public java.lang.Class getJavaClass()
Specified by:
getJavaClass in interface FieldParent

parent

public FieldParent parent()
Specified by:
parent in interface FieldParent

fields

public java.util.List fields()
Specified by:
fields in interface FieldParent

field

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

name

public java.lang.String name()
Specified by:
name in interface FieldParent

getQualifiedName

public java.lang.String getQualifiedName()

getNaturalName

public java.lang.String getNaturalName()

getPluralName

public java.lang.String getPluralName()

iconSm

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

iconLg

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

iconsSm

public javax.swing.Icon iconsSm()

iconsLg

public javax.swing.Icon iconsLg()

title

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

colorCode

public java.awt.Color colorCode()

sortBy

public java.lang.String sortBy()

sortField

public Field sortField()

isSortable

public boolean isSortable()

Browse

public AbstractListEO Browse(CommandInfo cmdInfo)

list

public AbstractListEO list()

New

public ComplexEObject New(CommandInfo cmdInfo)

New

public ComplexEObject New(CommandInfo cmdInfo,
                          ComplexType type)

abstractType

public ComplexType abstractType()

Find

public View Find(CommandInfo cmdInfo)

SmartList

public CompositeQuery SmartList(CommandInfo cmdInfo)

ImportFromXML

public java.lang.String ImportFromXML(CommandInfo info)

getFlavor

public java.awt.datatransfer.DataFlavor getFlavor()

bufferCopy

public ComplexEObject bufferCopy()

bufferCopy

public void bufferCopy(ComplexEObject bufferCopy)

equals

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

hashCode

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

isSingleton

public boolean isSingleton()

instance

public ComplexEObject instance()

searchTreeModel

public javax.swing.tree.TreeModel searchTreeModel()

getFieldsList

public RelationalList getFieldsList()

getCommandsList

public RelationalList getCommandsList()

isEmpty

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

getQueries

public RelationalList getQueries()

addQuery

public void addQuery(CompositeQuery query)

removeQuery

public void removeQuery(CompositeQuery query)

validate

public int validate(ComplexEObject instance)

pluralName

public static java.lang.String pluralName()

getCustomTypeImplementorClass

public static java.lang.Class getCustomTypeImplementorClass()

associateQueries

public static void associateQueries()

isMeta

public boolean isMeta()
Specified by:
isMeta in interface ComplexEObject
Overrides:
isMeta in class AbstractComplexEObject

getDefaultSearchField

public Field getDefaultSearchField()

setDefaultSearchField

public void setDefaultSearchField(Field field)

defaultSearchField

public void defaultSearchField(java.lang.String fieldName)

defaultSearchFieldPath

public void defaultSearchFieldPath(java.lang.String fieldPath)

hasDefaultSearchField

public boolean hasDefaultSearchField()

fireAppEventNotification

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

fireAppEventNotification

public void fireAppEventNotification(java.lang.String evtType,
                                     java.lang.Object target)
Overrides:
fireAppEventNotification in class AbstractComplexEObject