Ontimize 5.2071EN

com.ontimize.gui.field
Class AbstractMultipleReferenceDataField

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bycom.ontimize.gui.field.DataField
                      extended bycom.ontimize.gui.field.AbstractMultipleReferenceDataField
All Implemented Interfaces:
AccessForm, javax.accessibility.Accessible, ApplicationPreferencesListener, CachedComponent, CreateForms, DataComponent, java.util.EventListener, FormComponent, HasHelpIdComponent, HasPreferenceComponent, IdentifiedElement, java.awt.image.ImageObserver, Internationalization, java.awt.MenuContainer, OpenDialog, ReferenceComponent, SecureElement, java.io.Serializable, ValueChangeDataComponent
Direct Known Subclasses:
MultipleReferenceComboDataField, MultipleReferenceDataField

public abstract class AbstractMultipleReferenceDataField
extends DataField
implements DataComponent, ReferenceComponent, OpenDialog, CreateForms, CachedComponent

Abstract class that implements a Multiple Reference Data Field.

Author:
Imatia Innovation
See Also:
Serialized Form

Nested Class Summary
protected  class AbstractMultipleReferenceDataField.CEJTextField
          The main class to create the EJTextField
protected  class AbstractMultipleReferenceDataField.CodFieldListener
          The main class to create a listener in a cod.
protected static interface AbstractMultipleReferenceDataField.InnerListener
          Interface to implement inner listener methods.
 
Nested classes inherited from class com.ontimize.gui.field.DataField
DataField.AuxPanel, DataField.CopyActionListener, DataField.ELabel, DataField.FieldButton, DataField.FieldFocusListener, DataField.InfoMouseListener, DataField.ToggleButton
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  CacheManager cacheManager
          A reference to cache manager.
protected  int cacheTime
          Defines the cache time.
static java.lang.String CACHETIME
          Cachetime property.
protected  AbstractMultipleReferenceDataField.CodFieldListener codListener
          An instance of cod field listener.
protected  java.util.ArrayList cods
          An ArrayList where will be inserted the data field names of codes
static java.lang.String CODS
          Cods property.
protected  java.util.ArrayList cols
           
static java.lang.String COLS
          Cols property.
protected  java.util.Hashtable dataCache
          A data cache.
protected  boolean dataCacheInitialized
          The condition about data cache initialization.
protected  java.lang.String entity
           
static java.lang.String ENTITY
          Entity property
protected  java.util.Hashtable formatColumn
          The format column.
protected  boolean initCacheOnSetValue
          The condition to initialize cache on setValue.
protected  AbstractMultipleReferenceDataField.InnerListener innerListener
          A reference to inner Listener.
protected  java.util.Hashtable jVisibleCods
          An hashtable to put the visible key-component pairs.
protected  java.util.ArrayList keys
          The reference to keys.
static java.lang.String KEYS
          Keys property.
protected  long lastCacheTime
          The last cache time.
protected  EntityReferenceLocator locator
          The Entity reference Locator that provides a locator to this entity
static java.lang.String ONSETVALUESET
          Typecods property.
protected  java.util.List onsetvaluesetAttributes
          The vector with attributes to update when data field value changed.
static java.lang.String PARENT_CODS
          Parentcods property.
static java.lang.String PARENT_KEYS
          Parentkeys property.
protected  java.util.ArrayList parentCods
          The reference to parent cods.
protected  boolean parentkeyCache
           
static java.lang.String PARENTKEYCACHE
           
protected  java.util.ArrayList parentkeys
          The reference to parent keys.
protected  java.lang.String separator
          A separator reference.
protected  java.util.ArrayList typecods
          An ArrayList where the possible types of codes will be inserted.
static java.lang.String TYPECODS
          Typecods property.
protected  boolean useCacheManager
          The condition to use cache manager.
protected  java.lang.Object value
          A reference to a value object.
protected  boolean valueEventDisabled
          The condition to disable events.
protected  java.util.ArrayList visibleCods
          An ArrayList where the visible column codes will be inserted .
static java.lang.String VISIBLECODS
          Visiblecods property.
protected  java.util.Hashtable visiblesize
          An hashtable to put the visible parameters-position in multiple data field
 
Fields inherited from class com.ontimize.gui.field.DataField
advancedQueryMode, ALIGN, ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, alignment, ASTERISK_REQUIRED_STYLE, ATTR, attribute, backgroundColor, BGCOLOR, bold, BOLD, BORDER, BORDER_REQUIRED_STYLE, borderText, BOTTOM, CENTER, CLIPBOARD_COPY, CLIPBOARD_COPY_es_ES, CLIPBOARD_CUT, CLIPBOARD_CUT_es_ES, CLIPBOARD_PASTE, CLIPBOARD_PASTE_es_ES, conditions, dataField, DEFAULT_BORDER, DEFAULT_BOTTOM_MARGIN, DEFAULT_FIELD_LEFT_MARGIN, DEFAULT_FIELD_RIGHT_MARGIN, DEFAULT_LABEL_LEFT_MARGIN, DEFAULT_LABEL_RIGHT_MARGIN, DEFAULT_PARENT_MARGIN, DEFAULT_PARENT_MARGIN_FOR_SCROLL, DEFAULT_TOP_MARGIN, defaultAsteriskColor, DEFAULTBORDER, defaultDisableBackgroundColor, defaultFieldButtonHigh, defaultPreferenceTextNotRetrievedFromPreferences, DEFINE_HELP_FIELD_PREFERENCE, dim, DIM, disabledbgcolor, DISABLEDBGCOLOR, empty, enabled, ENABLED, FIELD_HELP_TIP, fieldlistenerFocus, fieldSize, fireValueEvents, FOCUS_BACKGROUNDCOLOR, FONT, fontColor, FONTCOLOR, fontSize, FONTSIZE, height, HEIGHT, incrementalFont, initPreferenceHelpText, isEnabled, LABELALIGN, labelComponent, LABELFONT, LABELFONTCOLOR, labelPosition, LABELPOSITION, LABELSIZE, labelText, LABELVISIBLE, LEFT, locale, LOWERED, menuCopy, menuCut, menuDefineHelpPreference, menuHelpPreferences, menuPaste, modifiable, NO_STR, NONE, noRequiredBorder, OPAQUE, originalSize, OUTBORDER, panel, parentForm, permissionActivate, permissionVisible, popupMenu, RAISED, redimensionPanel, redimensJTextField, required, REQUIRED, requiredBorder, REQUIREDBORDER, requiredFieldBackgroundColor, resources, restricted, RIGHT, show, showLabel, SIZE, TEXT_STR, TEXTALIGN, textAlignment, textHelpPreference, TIP, tipKey, TOP, validData, VALIGN, Valignment, valueListener, valueSave, VISIBLE, VISUALIZE_HELP_FIELD_PREFERENCE, weightDataFieldH, weightPanelH, width, WIDTH, x, X, y, Y, YES_STR
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface com.ontimize.gui.field.DataComponent
COMP_FOCUS_YELLOW, GREEN_VERY_LIGHT, LIGHT_GRAY_BLUE, LIGHT_GREYISH_BLUE, VERY_LIGHT_BLUE, VERY_LIGHT_GRAY, VERY_LIGHT_PINK, VERY_LIGHT_RED, VERY_LIGHT_SKYBLUE, VERY_LIGHT_YELLOW, VERY_LIGHT_YELLOW_2
 
Fields inherited from interface com.ontimize.gui.field.FormComponent
DEBUG
 
Fields inherited from interface com.ontimize.gui.i18n.Internationalization
DEBUG_LANGUAGE
 
Fields inherited from interface com.ontimize.gui.SecureElement
DESACTIVATE_COMPONENT_BY_PERMISSION_TIP
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, PROPERTIES, SOMEBITS
 
Constructor Summary
AbstractMultipleReferenceDataField()
           
 
Method Summary
protected  void addFormat(java.lang.String column, java.text.Format format)
          Adds the format to columns.
static boolean compareMultipleValue(java.lang.Object v1, java.lang.Object v2, java.util.List keys)
          Compares multiple values from key list.
protected  void createCodeComponents()
          Creates a code component.
protected  void createComponent()
          Creates component.
 void deleteData()
          Deletes data.
 void deleteUserData()
          Deletes the user data.
protected  void deleteUserData(boolean withcods)
          Deletes the user data.
protected  void enableInnerListener(boolean enable)
          Enables the inner listener.
 void free()
           
 java.util.Vector getAttributes()
          Gets the vector with all columns and keys.
protected  java.lang.Object getCodData(java.lang.Integer type, java.lang.String value)
          Gets the cod data to check type.
protected  java.lang.String getDescription(java.lang.Object value)
          Gets the description for all columns in multiple value object.
 java.lang.String getEntity()
           
protected  java.text.Format getFormat(java.lang.String column)
          Gets the format to column.
protected  java.lang.Object getInnerValue()
          Gets the inner value.
protected  long getLastCacheTime()
           
 java.util.Hashtable getParentKeyValues()
           
 int getSQLDataType()
          Returns the sql data type according to java.sql.Types
protected  java.lang.Integer getSQLType(java.lang.String s)
          Checks whether data are integer, string or float, in other case returns an integer.
 java.lang.Object getValue()
          Gets the value of a component.
 java.util.Hashtable getValuesToCode(java.lang.Object code)
          Returns the associated values for a code to set in onsetvalueset attributes.
 boolean hasParentKeys()
           
 void init(java.util.Hashtable parameters)
          Initializes parameters and throws IllegalArgumentException when required parameters are not present.
 void initCache()
          Initializes cache.
 void invalidateCache()
          Invalidates the cache.
 boolean isEmpty()
          Checks the data existence in component.
protected  EntityResult queryByCode(java.lang.Object value)
          Prepares the object value to perform a query by code.
 void setCacheManager(CacheManager c)
           
protected  void setCode(java.lang.Object codeValue, int valueEventType)
          Sets a code to object.
 void setFormatCods(java.lang.Object value)
          Sets the format to visible cods.
protected abstract  void setFormatValue(java.lang.Object originalValue)
           
 void setFormBuilder(FormBuilder constructor)
           
protected  void setInnerValue(java.lang.Object o)
          Sets the inner value.
 void setParentFrame(java.awt.Frame parentFrame)
          This method is called from Form for each component that implements this interface.
 void setReferenceLocator(EntityReferenceLocator referenceLocator)
          Establishes the reference locator that will be used by component.
 void setValue(java.lang.Object originalValue)
          Sets the value for component.
 void setValue(java.lang.Object originalValue, boolean intern)
          Sets the value to object.
protected  void updateOnSetValueSetAttributes(java.util.Hashtable data)
          Parameters on this method are used to update the fields whose attributes are contained in onsetvaluesetAttributes
 
Methods inherited from class com.ontimize.gui.field.DataField
addFocusListener, addHelpMenuPopup, addValueChangeListener, changeButton, changeOpacity, checkDefineHelpPermission, checkEnabledPermission, checkVisiblePermission, configurePopupMenuHelp, createFocusListener, createInstanceConditionCombo, createPopupMenu, defineHelpField, finalize, fireValueChanged, getAttribute, getBorder, getConstraints, getDataField, getDisabledbgcolor, getFontColor, getHelpIdString, getHelpPreferenceKey, getLabelComponent, getLabelComponentText, getLabelFontColor, getLabelText, getParentForm, getPreferenceHelpText, getText, getTextsToTranslate, getValueChangeListeners, hasHelpInPreferences, initPermissions, initPreferences, installFocusListener, installHelpId, installPopupMenuListener, installPreferenceHelpListener, isAdvancedQueryMode, isEnabled, isHidden, isLabelVisible, isModifiable, isModified, isRequired, isRestricted, parseBoolean, preferenceChanged, removeFocusListener, removeValueChangeListener, requestFocus, seeHelpField, setBold, setComponentLocale, setDisabledbgcolor, setEnabled, setFont, setFontColor, setFontSize, setLabelFontColor, setModifiable, setParentForm, setRequired, setRequiredFieldBackground, setResourceBundle, setVisible, showPopupMenu, updateBackgroundColor, updateBackgroundColor, updateFont, updateTip, updateUI, validateComponentPositions
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ontimize.gui.field.DataComponent
getLabelComponentText, isHidden, isModifiable, isModified, isRequired, setModifiable, setRequired
 
Methods inherited from interface com.ontimize.gui.field.FormComponent
getConstraints, isEnabled, setEnabled, setVisible
 
Methods inherited from interface com.ontimize.gui.i18n.Internationalization
getTextsToTranslate, setComponentLocale, setResourceBundle
 
Methods inherited from interface com.ontimize.gui.field.IdentifiedElement
getAttribute
 
Methods inherited from interface com.ontimize.gui.SecureElement
initPermissions, isRestricted
 

Field Detail

CODS

public static final java.lang.String CODS
Cods property.

See Also:
Constant Field Values

TYPECODS

public static final java.lang.String TYPECODS
Typecods property.

See Also:
Constant Field Values

ONSETVALUESET

public static final java.lang.String ONSETVALUESET
Typecods property.

See Also:
Constant Field Values

PARENT_CODS

public static final java.lang.String PARENT_CODS
Parentcods property.

See Also:
Constant Field Values

VISIBLECODS

public static final java.lang.String VISIBLECODS
Visiblecods property.

See Also:
Constant Field Values

KEYS

public static final java.lang.String KEYS
Keys property.

See Also:
Constant Field Values

PARENT_KEYS

public static final java.lang.String PARENT_KEYS
Parentkeys property.

See Also:
Constant Field Values

COLS

public static final java.lang.String COLS
Cols property.

See Also:
Constant Field Values

ENTITY

public static final java.lang.String ENTITY
Entity property

See Also:
Constant Field Values

CACHETIME

public static final java.lang.String CACHETIME
Cachetime property.

See Also:
Constant Field Values

PARENTKEYCACHE

public static final java.lang.String PARENTKEYCACHE
See Also:
Constant Field Values

parentkeyCache

protected boolean parentkeyCache

locator

protected EntityReferenceLocator locator
The Entity reference Locator that provides a locator to this entity


onsetvaluesetAttributes

protected java.util.List onsetvaluesetAttributes
The vector with attributes to update when data field value changed. By default, null.


cods

protected java.util.ArrayList cods
An ArrayList where will be inserted the data field names of codes


typecods

protected java.util.ArrayList typecods
An ArrayList where the possible types of codes will be inserted. If no other specification(String,Float,Double) exists, the type will be Integer by default. The order must be the same that cods have in Arraylist cods.


visibleCods

protected java.util.ArrayList visibleCods
An ArrayList where the visible column codes will be inserted . If it is empty all codes will be hidden and by default all codes will be visible.


jVisibleCods

protected java.util.Hashtable jVisibleCods
An hashtable to put the visible key-component pairs.


visiblesize

protected java.util.Hashtable visiblesize
An hashtable to put the visible parameters-position in multiple data field


parentCods

protected java.util.ArrayList parentCods
The reference to parent cods. By default, null.


keys

protected java.util.ArrayList keys
The reference to keys. By default, null.


parentkeys

protected java.util.ArrayList parentkeys
The reference to parent keys. By default, null.


cols

protected java.util.ArrayList cols

separator

protected java.lang.String separator
A separator reference. By default, ' '.


value

protected java.lang.Object value
A reference to a value object. By default, null.


entity

protected java.lang.String entity

cacheTime

protected int cacheTime
Defines the cache time. By default, the Integer.MAX_VALUE


lastCacheTime

protected long lastCacheTime
The last cache time. By default, zero to query always the first time


dataCacheInitialized

protected boolean dataCacheInitialized
The condition about data cache initialization. By default, false.


dataCache

protected java.util.Hashtable dataCache
A data cache.


initCacheOnSetValue

protected boolean initCacheOnSetValue
The condition to initialize cache on setValue. By default, false.


useCacheManager

protected boolean useCacheManager
The condition to use cache manager. By default, true.


cacheManager

protected CacheManager cacheManager
A reference to cache manager. By default, null.


formatColumn

protected java.util.Hashtable formatColumn
The format column.


valueEventDisabled

protected boolean valueEventDisabled
The condition to disable events. By default, false.


innerListener

protected AbstractMultipleReferenceDataField.InnerListener innerListener
A reference to inner Listener. By default, null.


codListener

protected AbstractMultipleReferenceDataField.CodFieldListener codListener
An instance of cod field listener.

Constructor Detail

AbstractMultipleReferenceDataField

public AbstractMultipleReferenceDataField()
Method Detail

createComponent

protected void createComponent()
Creates component. Empty method.


createCodeComponents

protected void createCodeComponents()
Creates a code component. Uses visibleCods,visiblesize and adds listeners.


init

public void init(java.util.Hashtable parameters)
Initializes parameters and throws IllegalArgumentException when required parameters are not present.

Specified by:
init in interface FormComponent
Overrides:
init in class DataField
Parameters:
parameters - the Hashtable with parameters

attribute values default required meaning
attr yes An AbstractMultipleReferenceDataField object. It is used to get a reference for field
keys key1;key2;...;keyn yes This attribute contains columns that are keys in entity of current form.
cods cod1;cod2;...;codn keys yes This parameter refers to the keys of entity that is queried. We need keys and cods because, keys in entity and form accept different names.
visiblecods vcod1;vcod2;...;vcodn no The number of boxes showed on the left of description field. Each visible cods is used to select an individual cod.
typecods vtcod1;vtcod2;...;vtcodn Integer no The class type of cods. To indicate other types for cods, they should be ordered like cods
parentkeys pk1;pk2;...;pkn parentcods no Attribute used to filter MultipleReferenceDataField. It will contain all attributes whose values will be extracted of current form to filter the field.
parentcods pcod1;pcod2;...;pcodn parentkeys no This parameter refers to the parentkeys of entity that is queried. Sometimes, we need parentkeys and parentcods because columns in entity and form accept different names. This parameter must be ordered in same manner that parentkeys, to establish the correspondence position by position.
entity yes The entity to obtain the data
cols col1;col2;...;coln yes The cols to show both in description of field and in table to select records.
onsetvalueset Field attributes whose value will be set when field data change.

getSQLType

protected java.lang.Integer getSQLType(java.lang.String s)
Checks whether data are integer, string or float, in other case returns an integer.

Parameters:
s - the data type
Returns:
the SQL type

updateOnSetValueSetAttributes

protected void updateOnSetValueSetAttributes(java.util.Hashtable data)
Parameters on this method are used to update the fields whose attributes are contained in onsetvaluesetAttributes

Parameters:
data - Values to update

getValuesToCode

public java.util.Hashtable getValuesToCode(java.lang.Object code)
Returns the associated values for a code to set in onsetvalueset attributes.

Parameters:
code - the object where code are specified
Returns:
the key-value pairs

getCodData

protected java.lang.Object getCodData(java.lang.Integer type,
                                      java.lang.String value)
                               throws java.lang.Exception
Gets the cod data to check type.

Parameters:
type - the cod data type.
value - the string to check cod data.
Returns:
the type in function of Types
Throws:
java.lang.Exception - when Exception occurs.

getSQLDataType

public int getSQLDataType()
Description copied from interface: DataComponent
Returns the sql data type according to java.sql.Types

Specified by:
getSQLDataType in interface DataComponent
Returns:
the Integer type

getLastCacheTime

protected long getLastCacheTime()

getValue

public java.lang.Object getValue()
Description copied from interface: DataComponent
Gets the value of a component.

Specified by:
getValue in interface DataComponent
Returns:
the object with value.

setValue

public void setValue(java.lang.Object originalValue)
Description copied from interface: DataComponent
Sets the value for component.

Specified by:
setValue in interface DataComponent
Parameters:
originalValue - the object with value to set

setValue

public void setValue(java.lang.Object originalValue,
                     boolean intern)
Sets the value to object. Checks whether object is a multiple value.

Parameters:
originalValue - the object to set value
intern - the condition about intern listener state.

setFormatValue

protected abstract void setFormatValue(java.lang.Object originalValue)

setFormatCods

public void setFormatCods(java.lang.Object value)
Sets the format to visible cods.

Parameters:
value - the object to set the cods.

setReferenceLocator

public void setReferenceLocator(EntityReferenceLocator referenceLocator)
Description copied from interface: ReferenceComponent
Establishes the reference locator that will be used by component. This method is automatically called by Form when it is being loaded.

Specified by:
setReferenceLocator in interface ReferenceComponent
Parameters:
referenceLocator - a reference locator to set in component

setParentFrame

public void setParentFrame(java.awt.Frame parentFrame)
Description copied from interface: OpenDialog
This method is called from Form for each component that implements this interface. It fixes the parent frame for element. This frame is needed to open the modal dialog.

Specified by:
setParentFrame in interface OpenDialog
Parameters:
parentFrame - the frame

free

public void free()
          throws java.lang.Exception
Throws:
java.lang.Exception

setFormBuilder

public void setFormBuilder(FormBuilder constructor)
Specified by:
setFormBuilder in interface CreateForms

getEntity

public java.lang.String getEntity()
Specified by:
getEntity in interface CachedComponent

setCacheManager

public void setCacheManager(CacheManager c)
Specified by:
setCacheManager in interface CachedComponent

isEmpty

public boolean isEmpty()
Description copied from interface: DataComponent
Checks the data existence in component.

Specified by:
isEmpty in interface DataComponent
Returns:
true when component is empty

getAttributes

public java.util.Vector getAttributes()
Gets the vector with all columns and keys.

Specified by:
getAttributes in interface CachedComponent
Returns:
the vector with all columns and keys.

initCache

public void initCache()
Initializes cache. It uses the cachemanager when parentkeys are not present.


invalidateCache

public void invalidateCache()
Invalidates the cache. Sets dataCacheInitialized to false.


queryByCode

protected EntityResult queryByCode(java.lang.Object value)
Prepares the object value to perform a query by code.

Parameters:
value - the object to query
Returns:
the query result

deleteData

public void deleteData()
Deletes data. It sets null in all formats (value and cods).

Specified by:
deleteData in interface DataComponent

deleteUserData

public void deleteUserData()
Deletes the user data. Calls to deleteUserData(boolean) with true parameter.


deleteUserData

protected void deleteUserData(boolean withcods)
Deletes the user data.

Parameters:
withcods - the cods or no cods presence

getDescription

protected java.lang.String getDescription(java.lang.Object value)
Gets the description for all columns in multiple value object.

Parameters:
value - the multiple value object to get description
Returns:
the description

getFormat

protected java.text.Format getFormat(java.lang.String column)
Gets the format to column.

Parameters:
column - the name of column
Returns:
the current column format

addFormat

protected void addFormat(java.lang.String column,
                         java.text.Format format)
Adds the format to columns.

Parameters:
column - the column
format - the format to apply

enableInnerListener

protected void enableInnerListener(boolean enable)
Enables the inner listener.

Parameters:
enable - the condition to enable the listener

getInnerValue

protected java.lang.Object getInnerValue()
Gets the inner value.

Returns:
the inner value

setInnerValue

protected void setInnerValue(java.lang.Object o)
Sets the inner value.

Parameters:
o - the object to set the inner value.

setCode

protected void setCode(java.lang.Object codeValue,
                       int valueEventType)
Sets a code to object. It calls to setValue(Object) after looking the data cache or the queryByCode(Object).

Parameters:
codeValue - the hashtable to set the multiple value
valueEventType - the value event type

compareMultipleValue

public static boolean compareMultipleValue(java.lang.Object v1,
                                           java.lang.Object v2,
                                           java.util.List keys)
Compares multiple values from key list.

Parameters:
v1 - the object 1
v2 - the object 2
keys - the list of keys
Returns:
true when two multiple value objects are equals

hasParentKeys

public boolean hasParentKeys()

getParentKeyValues

public java.util.Hashtable getParentKeyValues()

Ontimize