ThinkUI SQL Client 1.1.3 API

thinkui.sqlclient.commands
Class ViewDataObjectEditorCommand

java.lang.Object
  extended bythinkui.db.AbstractDataObject
      extended bythinkui.command.AbstractCommand
          extended bythinkui.desktop.AbstractSwingCommand
              extended bythinkui.sqlclient.AbstractSQLClientCommand
                  extended bythinkui.sqlclient.commands.ViewDataObjectEditorCommand
All Implemented Interfaces:
thinkui.common.Abortable, thinkui.common.CaptionSupport, thinkui.common.ClassNameSupport, java.lang.Cloneable, thinkui.command.Command, thinkui.command.CommandErrorHandler, java.lang.Comparable, thinkui.db.DataClassSupport, DataObject, java.io.Serializable

public class ViewDataObjectEditorCommand
extends AbstractSQLClientCommand

Command to view the currently selected data object for editing. If a data class or table data is selected instead, a new empty data object will be created for inserting new records.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class thinkui.desktop.AbstractSwingCommand
DATA_CLASS
 
Fields inherited from interface thinkui.command.Command
NO_RESULT
 
Fields inherited from interface thinkui.db.DataObject
INDEX_SEPARATOR, NAME_SEPARATOR
 
Constructor Summary
ViewDataObjectEditorCommand()
          ViewDataObjectEditorCommand constructor.
ViewDataObjectEditorCommand(boolean updateOnSelectionChange)
          ViewDataObjectEditorCommand constructor.
 
Method Summary
static thinkui.desktop.SwingAction createExportAction(thinkui.desktop.SwingCommandContext ctx, DataObject dataObject, java.lang.String attrName, thinkui.desktop.components.AttributeComponent targetAttributeComponent, thinkui.desktop.DataObjectViewer objectViewer)
          Helper method to create a swing action to export to the given data object attribute.
static thinkui.desktop.SwingAction createImportAction(thinkui.desktop.SwingCommandContext ctx, DataObject dataObject, java.lang.String attrName, thinkui.desktop.components.AttributeComponent targetAttributeComponent, thinkui.desktop.DataObjectViewer objectViewer)
          Helper method to create a swing action to import to the given data object attribute.
static thinkui.desktop.SwingAction createZoomAction(thinkui.desktop.SwingCommandContext ctx, boolean useApplicationDataObjectManager, DataObject dataObject, java.lang.String attrName, thinkui.desktop.components.AttributeComponent targetAttributeComponent, thinkui.desktop.DataObjectViewer objectViewer)
          Helper method to create a swing action to zoom to the given data object attribute.
 java.lang.Object execute(thinkui.command.CommandContext context)
          Execute the command with the specified context.
 java.lang.String getHeaderCaption()
           
 thinkui.desktop.DelegateFrameViewer getParentFrameViewer()
           
 boolean isMakeCopy()
           
 boolean isNewButton()
           
 boolean isPrecondition(thinkui.command.CommandContext commandContext)
           
 boolean isShowChildren()
           
 ViewDataObjectEditorCommand setHeaderCaption(java.lang.String headerCaption)
          Sets header caption to display.
 ViewDataObjectEditorCommand setMakeCopy(boolean makeCopy)
          Sets whether or not to make a copy of the data object data argument.
 ViewDataObjectEditorCommand setNewButton(boolean newButton)
          Sets whether or not to show the new button.
 void setParentFrameViewer(thinkui.desktop.DelegateFrameViewer parentFrameViewer)
          Sets the parent frame viewer to use or null to use default behaviour.
 ViewDataObjectEditorCommand setShowChildren(boolean showChildren)
          Sets whether or not to show children/related data objects.
 void setSourceAttributeNames(java.util.List sourceAttributeNames)
          Sets the source attribute names.
 void setTargetAttributeComponents(java.util.List targetAttributeComponents)
          Sets the target attribute components.
 ViewDataObjectEditorCommand setUseDialogViewer(boolean useDialogViewer)
          Sets whether or not to render to a JDialog instead of a JFrame.
 
Methods inherited from class thinkui.sqlclient.AbstractSQLClientCommand
canTranslateToDataClass, canTranslateToTableData, filterDataObjects, getDataObjectManager, getMetaDataManager, handleError, isUseApplicationDataObjectManager, postExecute, preExecute, setUseApplicationDataObjectManager, translateToDataClass, translateToTableData, translateToTableData, translateToTableData, translateToTableData
 
Methods inherited from class thinkui.desktop.AbstractSwingCommand
getCommandManager, getDataClass, getLabel, getSelectedObject, getSelectedObjects, setCommandManager, setLabel
 
Methods inherited from class thinkui.command.AbstractCommand
abort, equals, getData, getExecutionState, getInitCommand, getNextCommand, getObjectClassName, isAbortable, isAbortRequested, isEnabled, setAbortRequested, setData, setEnabled, setExecutionState, setInitCommand, setNextCommand
 
Methods inherited from class thinkui.db.AbstractDataObject
clearValue, clearValues, compareTo, copy, copyFrom, copyFrom, copyFrom, copyNonEmptyValuesFrom, getAsString, getAttribute, getBigDecimal, getBigInteger, getBoolean, getCaption, getCharacter, getDate, getInteger, getLong, getModifiedAttrNames, getName, getNumber, getPersistentState, getPrimaryKey, getShort, getString, getTimestamp, getValue, getValuesMap, hashCode, initFrom, initFrom, initFrom, initValue, isAttribute, isModified, isModified, isNew, isOverridden, isReadOnly, isReadOnly, isValueEmpty, isValueSet, override, setModifiedAttrNames, setName, setPersistentState, setReadOnly, setValue, setValuesMap, toString, validate
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface thinkui.db.DataObject
clearValue, clearValues, copy, copyFrom, copyFrom, copyFrom, getAsString, getAttribute, getBigDecimal, getBigInteger, getBoolean, getCharacter, getDate, getInteger, getLong, getModifiedAttrNames, getName, getPersistentState, getPrimaryKey, getShort, getString, getTimestamp, getValue, getValuesMap, hashCode, initFrom, initFrom, initFrom, initValue, isAttribute, isModified, isModified, isNew, isOverridden, isReadOnly, isReadOnly, isValueEmpty, isValueSet, override, setModifiedAttrNames, setName, setPersistentState, setReadOnly, setValue, setValuesMap, toString, validate
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface thinkui.common.CaptionSupport
getCaption
 

Constructor Detail

ViewDataObjectEditorCommand

public ViewDataObjectEditorCommand()
ViewDataObjectEditorCommand constructor.


ViewDataObjectEditorCommand

public ViewDataObjectEditorCommand(boolean updateOnSelectionChange)
ViewDataObjectEditorCommand constructor.

Method Detail

createExportAction

public static final thinkui.desktop.SwingAction createExportAction(thinkui.desktop.SwingCommandContext ctx,
                                                                   DataObject dataObject,
                                                                   java.lang.String attrName,
                                                                   thinkui.desktop.components.AttributeComponent targetAttributeComponent,
                                                                   thinkui.desktop.DataObjectViewer objectViewer)
                                                            throws java.lang.Exception
Helper method to create a swing action to export to the given data object attribute. The attribute type must be either a BLOB or CLOB data type.

Returns:
the swing action to export the given data object attribute or null.
Throws:
java.lang.Exception

createImportAction

public static final thinkui.desktop.SwingAction createImportAction(thinkui.desktop.SwingCommandContext ctx,
                                                                   DataObject dataObject,
                                                                   java.lang.String attrName,
                                                                   thinkui.desktop.components.AttributeComponent targetAttributeComponent,
                                                                   thinkui.desktop.DataObjectViewer objectViewer)
                                                            throws java.lang.Exception
Helper method to create a swing action to import to the given data object attribute. The attribute type must be either a BLOB or CLOB data type.

Returns:
the swing action to import to the given data object attribute or null.
Throws:
java.lang.Exception

createZoomAction

public static final thinkui.desktop.SwingAction createZoomAction(thinkui.desktop.SwingCommandContext ctx,
                                                                 boolean useApplicationDataObjectManager,
                                                                 DataObject dataObject,
                                                                 java.lang.String attrName,
                                                                 thinkui.desktop.components.AttributeComponent targetAttributeComponent,
                                                                 thinkui.desktop.DataObjectViewer objectViewer)
                                                          throws java.lang.Exception
Helper method to create a swing action to zoom to the given data object attribute. If attribute specifies a foreign key column, the specified foreign key data object is displayed. If the foreign key data object does not exist, a creation screen is displayed to allow the object to be created. Once saved, the primary key of the foreign key data object will be copied to the target attribute component (if any).

Returns:
the swing action to zoom to the given data object attribute or null.
Throws:
java.lang.Exception

execute

public final java.lang.Object execute(thinkui.command.CommandContext context)
                               throws java.lang.Exception
Execute the command with the specified context.

Throws:
java.lang.Exception

getHeaderCaption

public final java.lang.String getHeaderCaption()
Returns:
the header caption to display or null.

getParentFrameViewer

public final thinkui.desktop.DelegateFrameViewer getParentFrameViewer()
Returns:
the parent frame viewer to use or null.

isMakeCopy

public final boolean isMakeCopy()
Returns:
whether or not to make a copy of the data object data argument.

isNewButton

public final boolean isNewButton()
Returns:
whether or not to show the new button.

isPrecondition

public boolean isPrecondition(thinkui.command.CommandContext commandContext)
Returns:
whether or not the precondition for the command has been met.

isShowChildren

public final boolean isShowChildren()
Returns:
whether or not to show children/related data objects.

setHeaderCaption

public final ViewDataObjectEditorCommand setHeaderCaption(java.lang.String headerCaption)
Sets header caption to display.


setMakeCopy

public final ViewDataObjectEditorCommand setMakeCopy(boolean makeCopy)
Sets whether or not to make a copy of the data object data argument.


setNewButton

public final ViewDataObjectEditorCommand setNewButton(boolean newButton)
Sets whether or not to show the new button.


setParentFrameViewer

public final void setParentFrameViewer(thinkui.desktop.DelegateFrameViewer parentFrameViewer)
Sets the parent frame viewer to use or null to use default behaviour.


setShowChildren

public final ViewDataObjectEditorCommand setShowChildren(boolean showChildren)
Sets whether or not to show children/related data objects.


setSourceAttributeNames

public final void setSourceAttributeNames(java.util.List sourceAttributeNames)
Sets the source attribute names.


setTargetAttributeComponents

public final void setTargetAttributeComponents(java.util.List targetAttributeComponents)
Sets the target attribute components.


setUseDialogViewer

public final ViewDataObjectEditorCommand setUseDialogViewer(boolean useDialogViewer)
Sets whether or not to render to a JDialog instead of a JFrame.


ThinkUI SQL Client 1.1.3 API

Copyright © 2007-2009. ThinkUI Software Inc. All rights reserved.