planetj.database
Class Row

java.lang.Object
  |
  +--planetj.database.Row
All Implemented Interfaces:
Cloneable, IBatchProcessObject, IBusinessObject, ICSVRow, IDistributedExecutableObject, IFDFObject, IGuarded, INamedCollection, INavigationObject, IRowCreator, IXMLObject, Serializable
Direct Known Subclasses:
ConnectionRow, CustomerRow, DEAuthorization, DEGroup, DEGroup2Authorization, DEUser, DEUser2Group, EmailRow, FieldDescriptorRow, FlatFileReferenceRow, MessageBoardRow, MessageRow, PossibleValueRow, PropertyRow, ReportBreakRow, Row.SpacingRow, SignOnAndRegistrationRow, TEST2Row, URLMonitoringRow

public class Row
extends Object
implements Cloneable, INavigationObject, IBatchProcessObject, IRowCreator, IGuarded, ICSVRow, IBusinessObject, Serializable, IXMLObject, IFDFObject, IDistributedExecutableObject, INamedCollection

Represents a logical row of a database. A Row object may be a subset (containing only some of the columns) of a row in the database. It may also contain columns from multiple tables of the database. A Row's fields can be obtained via the getFields() method. Changes can be made to a Row object, and then committed to the database with the update() method.

Author:
PlanetJ Corporation
See Also:
Serialized Form

Nested Class Summary
static class Row.SpacingRow
           
 
Field Summary
static String className
           
static int COPY
          Deprecated. use MODE_COPY instead
static int DELETE
          Deprecated. use MODE_DELETE instead
static int INSERT
          Deprecated. use MODE_INSERT instead
static int MODE_COPY
           
static int MODE_DELETE
           
static int MODE_INSERT
           
static int MODE_READ
           
static int MODE_SEARCH
           
static int MODE_UNKNOWN
           
static int MODE_UPDATE
           
static int READ
          Deprecated. use MODE_READ instead
static int UPDATE
          Deprecated. use MODE_UPDATE instead
 
Fields inherited from interface planetj.dataengine.security.IGuarded
TYPE_ID_UNKNOWN, TYPE_NAME_FIELD, TYPE_NAME_SQLOPERATION, TYPE_SECURED_BY_LEVEL, TYPE_SECURED_BY_OPERATION, TYPE_UNSECURED
 
Constructor Summary
Row()
           
 
Method Summary
 void add(Field pField)
          Adds the given Field to this Row's FieldCollection.
 void add(RowCollection pRowCollection)
          Adds the given RowCollection to the List of RowCollection's this Row belongs to.
 void addObject()
          Add an object to the system.
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a listener which is informed when any field of this Row which has its value changed.
 void addPropertyChangeListener(String property, PropertyChangeListener listener)
          Adds a listener which is informed when a specific property of this Row which has its value changed.
 void addRowEventListener(IRowEventListener pNewListener)
          Adds a new Listener to this Row.
 void addRowEventListeners(List listeners)
           
 void addTable(Table pTable)
          Sets the table to which this row belongs.
 StringBuffer appendDisplayType(StringBuffer sb)
          Deprecated. row shouldn't know how to display html stuff - moved logic back into htmltable, eventually we could check the row to see if its property group has a css to use and use that if needed
 void batchProcess()
          Process this Object.
 void clearFields()
          Removes all the Fiels from this Row.
 void clearTables()
          Removes all the Fiels from this Row.
 void clearValidationException()
          Clears any validation exceptions that have previously been set on each of this Row's Fields.
 Object clone()
          Clone this Row object.
 Row cloneRow()
          Clones this Row object.
 void commitFieldValues()
          Commits the values of the Fields in this Row.
 void commitFieldValues(Collection pFields)
          Commits the values of the Fields in the given Collection.
 void commitFieldValues(Map pFields)
          Commits the values of the Fields in the given Map.
 String concatenateFieldFullLengthValues(String[] pFieldNames, String pSeperator)
          Concat the field full length string values inserting the supplied seperator between values.
 String concatenateFieldValues(String[] pFieldNames, String pSeperator, boolean pTrimValues)
          Concat the field values inserting the supplied seperator between values and optionally trim the values before concating.
 boolean containsField(String fieldName)
          Check to see if this Row contains the Field with the given name.
 Row copy(boolean pFullCopy)
          Copy this Row.
 void copyIntoRowFieldsWithCommonFieldNames(Row rowToCopy)
          Copy the fields from the supplied Row with the same field name into this Row.
 void copyIntoRowFieldsWithCommonFieldNames(Row rowToCopy, boolean ignoreCase)
          Copy the fields from the supplied Row with the same field name into this Row.
 void copyIntoRowFieldsWithCommonUsageIds(Row rowToCopy)
          Copy the fields from the supplied Row with the same usageid into this Row.
 void copyIntoRowFieldsWithGivenFieldNames(List fieldNames, Row rowToCopy)
          Copy the fields from the supplied Row that has a name in the given list.
 void copyIntoRowFieldsWithGivenFieldNames(List fieldNames, Row rowToCopy, boolean ignoreCase)
          Copy the fields from the supplied Row that has a name in the given list.
static Row create(Class rowSubClass)
          Create and return a new Row of the given Class type using the given ExecutingContext to allow for security and/or personalization.
static Row create(RowCollection pRowCollection)
          Create and return a new Row and also set its Table.
static Row create(RowCollection pRowCollection, boolean initialRow)
          Create and return a new Row and also set its Table.
static Row create(Table table)
          Create and return a new Row of class Row.class and initializes the row with all of the tables fields.
static Row create(Table table, boolean initializeRow)
          Create and return a new Row of class Row.class and initializes the row with all of the tables fields if specified.
static Row create(Table table, boolean initializeRow, ExecutingContext ec)
          Create and return a new Row and also set its Table.
static Row create(Table table, Class rowSubClass)
          Create and return a new Row of the given Class type and also set its Table.
static Row create(Table table, Class rowSubClass, boolean initializeRow)
          Create and return a new Row of the given Class type and also set its Table.
static Row create(Table table, Class rowSubClass, boolean initializeRow, ExecutingContext pExecutingContext)
          Create and return a new Row of the given Class type and also set its Table.
static Row create(Table table, Class rowSubClass, ExecutingContext executingContext)
          Create and return a new Row of the given Class type and also set its Table.
static Row create(Table table, Class rowSubClass, List fieldNames, boolean initializeRow)
          Create and return a new Row of the given Class type and also set its Table.
static Row create(Table table, Class rowSubClass, List fieldNames, boolean initializeRow, ExecutingContext pExecutingContext)
          Create and return a new Row of the given Class type and also set its Table.
static Row create(Table table, List fieldNames, boolean initialize)
          Create and return a new Row for the given table and field names.
static Row create(Table table, List fieldNames, boolean initializeRow, ExecutingContext pExecutingContext)
          Create and return a new Row of the given Class type and also set its Table.
static Row create(Table table, List names, ExecutingContext ec)
          Create and return a new Row and also set its Table.
 Row createRow(Row pDefaultRow)
          Creates a new Row.
 void defaultMerge(RowCollection rc)
          Works similar to the merge method, except all the fields that are merged into this row have the default values for that field type instead of actual values.
 int delete()
          Deletes the row from the database file to which it belongs.
 int delete(Connection conn)
          Deletes the row from the database file to which it belongs.
 int delete(Connection conn, ExecutingContext ec)
          Deletes the row from the database file to which it belongs.
 int delete(ExecutingContext ec)
          Deletes the row from the database file to which it belongs.
 void deleteObject()
          Delete an object from the system.
 double divide(String fieldName, String fieldName2)
          Get the division of the first field with the second fields.
 void duplicateKey(ExecutingContext ec)
          Method called when a duplicate key is encountered attempting to insert this Row.
 boolean equals(Object otherRow)
          Tests if this Row is equal to another Row.
 boolean equals(Row row, List fieldNames)
          Tests if a group of fields in this row have the same values as a group of fields in another row
 boolean equalsInstance(Object otherRow)
          Tests if this Row is equal to another Row.
 void executeDistributedAction()
          Insert the method's description here.
 boolean fieldHasPossibleValuesSQLOperation(Field pField, ExecutingContext pContext)
          Tests if a field is possible values op.
 Object getAssociation(String fieldName)
          Gets the association for the given Field name.
 Object getAssociation(String fieldName, ExecutingContext ec)
          Gets the association for the given Field name.
 Object getAssociationByOperationUsageId(int usageId, ExecutingContext ec)
          Gets the association for the given operation usage id.
 Operation getAssociationOperation(String fieldName)
          Gets the association's operation for the Field having the given name.
 Object getAttribute(Object key)
          Map that allows general attributes about a Row to be set and retreived.
 RowCollection getChildren()
          Gets a RowCollection of children this Row has.
 int getColumnSpan(Field field, boolean isDetails)
          Get the number of columns the given field should take up.
 Row getCompleteRow()
          Gets a complete Row for this Row containing all of its Fields in the database.
 Row getCompleteRow(Connection pConnection)
          Gets a complete Row for this Row containing all of its Fields in using the specified connection if needed.
 Object getConfigProperty(String key, ExecutingContext executingContext)
          Get a config property for the given row.
 Map getCopiedFieldValues()
          Returns a Map of field values, keyed by field name.
 List getCSVRow()
          Returns a List of Fields that implement ICSVField or a list of Objects that provide a toString method which returns the desired text to be written to the CSV file.
 List getCSVRow(List fieldNames)
          Returns a List of Fields that implement ICSVField or a list of Objects that provide a toString method which returns the desired text to be written to the CSV file.
 Row getDatabaseRow(Connection conn)
          Rereads and returns this row as it exists in the database, or null if it doesn't exist in the database.
 Row getDatabaseRow(Connection conn, boolean includeDerivedFields)
          Rereads and returns this row as it exists in the database, or null if it doesn't exist in the database.
 String getDeleteConfirmation()
          Deprecated.  
 String getDeleteConfirmationMessage()
          Get the delete confirmation message.
 String getDisplayValue(String fieldName)
          Gets the display value for the field with the given name.
 URL getDistributedRequestorURL()
          Insert the method's description here.
 String getExternalName(String fieldName)
          Gets the external name of a field
 List getExternalNames()
          Gets the external names of this RowCollection's fields
 StringBuffer getFDFData(StringBuffer pFDFData)
          This returns a StringBuffer containing all necessary FDF data for this object.
 Table getFDTable()
          Get's a table to use when searching for FDs.
 Field getField(int pIndex)
          Returns the Field at the specified index in this Row.
 Field getField(String fieldName)
          Returns the Field for the given name, or null if no such Field exists.
 Field getField(String name, boolean create)
          Get the Field in this Row with the given name.
 Object getFieldDefaultValue(Field pField, ExecutingContext executingContext)
          Get the field's default value as a String.
 FieldDescriptorRow getFieldDescriptor(Field pField, FieldDescriptorRow pFieldDescriptor)
          Row subclasses can override this method to return the a clone of the default FD added by TJH Jun 22, 2004 11 : 49 : 27 PM to allow Rows to return different FDs for this field.
 FieldDescriptorRow getFieldDescriptor(String pFieldName)
          Return the IFieldDescriptor for the Field with the specified name.
 FieldDescriptorRow getFieldDescriptor(String pFieldName, Table pTable)
          Return the IFieldDescriptor for the Field with the specified name.
 List getFieldDescriptorsWithUsage()
          Get a Collection of FieldDescriptorRows for this Row that have a UsageId defined for them.
 List getFieldDescriptorsWithUsageId(int usageId)
          Get a Collection of FieldDescriptorRows for this Row that have the given UsageId defined for them.
 FieldDescriptorRow getFieldDescriptorWithUsageId(int usageId)
          Get a FieldDescriptorRow for this Row that have the given usage id defined for them.
 Object getFieldDisplayValue(String fldNam)
          Returns the display value for the Field with the specified name.
 List getFieldNames()
          Return a List of all the Field names in this Row.
 List getFields(Class pFieldClassType)
          Returns a List of Fields for requested Class type.
 Map getFields(List pFieldNames)
          Returns a Map of Fields in this Row from the names given in the List.
 List getFieldSets()
          Gets a List of the FieldSet objects, containing the fields in this Row
 Object getFieldSQLObject(String fieldName)
          Gets this field's value as an Object in SQL format.
 List getFieldsToDisplay()
          Return a List of all the Field names that will be displayed by default.
 List getFieldsToDisplayStrict(ExecutingContext pEc)
          Return a List of all the Field names that will be displayed by default.
 List getFieldsToDisplayStrict(List fieldNames, ExecutingContext pEc)
          Removes fields from the list that should not be displayed.
 String getFieldStyleClass(Field field, String value, String displayValue, ExecutingContext ec)
          Get a Field's style.
 Object getFieldValue(String pFieldName)
          Gets a field in this Row by name.
 Field getFieldWithUsageId(int usageId)
          Get the Field with the given usage id from this row.
 String getHeaderText(ExecutingContext ec)
          Returns information for the user that will be displayed in the header of the Row
 String getLibraryName()
          Returns the Library's name to which the Table belongs to.
 int getMaxFieldLengths()
          Returns the max lengths of each field in this row added together.
 int getMaxFieldLengths(FileDescriptor fled)
          Returns the max lengths of each field in this row added together.
 int getMaxInsertRetries()
          Number of times to attempt to re-insert a Row when a duplicate key exception was encountered.
 String getMetaDataSystemAlias()
          Returns the meta data alias of the system to which this Row belongs
 INamed getNamed(int i)
           
 List getNamesOfUpdatedFields()
          Return the names of all of the Fields in this Row that have been updated.
 String getNavigationKey()
          Get the key used to store/retrieve this Row to/from navigation.
 String getNavigationListKey()
          Get the key used to store and retrieve a List of Rows that have been put into navigation.
 double getPercentage(String[] fieldNames)
          Gets the percentage of the first field compared with all the fields given.
 List getPhysicalFieldNames()
          Gets a List of the names of all Fields in this Row, excluding logical Fields
 PropertyGroup getPropertyGroup(String groupName)
          Gets the first PropertyGroup with the given property group name.
 PropertyGroupList getPropertyGroups()
          Get all the property groups stored in this RowCollection's attributes.
 List getPropertyGroups(String groupName)
          Get this RowCollection's property groups with the given group name.
 RowCollection getRowCollection()
          Gets the first RowCollection this Row is contained in.
 String getRowDisplayAttributes()
          Return a String that provides HTML or other display characteristics of this Row.
 StringBuffer getRowDisplayAttributes(StringBuffer html)
          Return a String that provides HTML or other display characteristics of this Row.
 RowKey getRowKey()
          Gets the RowKey object for this row.
 int getSecuredTypeId()
          Gets the id of the secured type.
 String getSecuredTypeName()
          Gets the secured type name of the secured object.
 int getSecurityType()
          Gets the type of security being used.
 String getSQL()
          Gets the SQL statement used to create this Row.
 SQLContext getSQLContext()
          Returns SQLContext to which the RowCollection this Row belongs has.
 Object getStaticAttribute(Object key)
           
 double getSum(String[] pFieldNames)
          Returns the sum of all the fields represented in pFieldNames if that field is a number
 String getSystemAlias()
          Returns the alias of one of the systems to which this Row belongs.
 Table getTable()
          Get's this field's table.
 Table getTable(int pTableIndex)
           
 String getTableName()
          Returns the name of the Table of this Row.
 TableCollection getTables()
          Get's this field's table.
 long getTimestamp()
          Gets the time when this Row was read from the database, or Long.MIN_VALUE if the time cannot be determined
 Map getUpdatedFields()
          Return the names of all the fields.
 String getUserMessageForOperation(int pMode)
          Return a message to the user after an operation completes.
 short getUseWOWLibrary()
           
 ValidationExceptionCollection getValidationExceptions()
          Be careful when you call this method because it is derived and spins through all the fields.
 boolean getValueAsBoolean(String pFieldName)
          Returns a primitive that represents the value in the specified field.
 byte getValueAsByte(String pFieldName)
          Returns a primitive that represents the value in the specified field.
 Date getValueAsDate(String pFieldName)
          Returns a Date
 Date getValueAsDate(String pYearFldName, String pMonthFldName, String pDayFldName)
          Returns a Date that represents the Date value of 3 seperate fields.
 double getValueAsDouble(int fieldIndex)
          Gets a primitive that represents the value in the specified field.
 double getValueAsDouble(String pFieldName)
          Returns a primitive that represents the value in the specified field.
 float getValueAsFloat(String pFieldName)
          Returns a primitive that represents the value in the specified field.
 String getValueAsFullLengthString(String pFieldName)
          Returns a String that represents the value in the specified field.
 int getValueAsInt(String pFieldName)
          Returns a primitive that represents the value in the specified field.
 long getValueAsLong(String pFieldName)
          Returns a primitive that represents the value in the specified field.
 Number getValueAsNumber(int fieldIndex)
          Gets a primitive that represents the value in the specified field.
 Number getValueAsNumber(String pFieldName)
          Returns a Number that represents the value in the specified field.
 short getValueAsShort(String pFieldName)
          Returns a primitive that represents the value in the specified field.
 String getValueAsString(int fieldIndex)
          Gets a String that represents the value in the specified field.
 String getValueAsString(String pFieldName)
          Returns a String that represents the value in the specified field.
 Object getValueByUsageId(int usageId)
          Return the names of all the fields.
 Iterator getValues()
          Returns an iterator which iterates over the values in this Row
 StringBuffer getXMLData(StringBuffer pXMLData)
          This returns a StringBuffer containing all necessary XML data for this object.
 StringBuffer getXMLData(XMLFileDescriptor pDescriptor, StringBuffer pXMLData)
          This returns a StringBuffer containing all necessary XML data for this object.
 StringBuffer getXMLHeaderData(StringBuffer pXMLData)
          This returns a StringBuffer containing all XMLHeader data for this Row.
 void handleDistributed(String pActionName)
          Set the method that will be called after Row is deserialized on the target.
 boolean hasChildRows()
          Check to see if this Row has child rows.
 boolean hasMultipleStyleClasses(Field field, ExecutingContext ec)
          Check if the given Field possibly has more than one style class.
 boolean hasPropertyChangeListeners(String pProperty)
          Tests if any object are listening to this Row for changes in one of its properties.
 int insert()
          Inserts this Row into its table.
 int insert(Connection conn)
          Inserts this Row into its table.
 int insert(ExecutingContext ec)
          Inserts this Row into the specified database.
 int insert(SQLContext context)
          Inserts this Row into the specified database.
 boolean is(String pFieldName)
          Gets the specified field and returns the boolean value.
 boolean isARow()
          Return a boolean indicating if this object is a Row
 boolean isARowCollection()
          Return a boolean indicating if this object is a RowCollection
 boolean isChanged()
          Returns whether or not this Row's Fields have changed.
 boolean isChangedRealTime(boolean realTimeCheck)
          Deprecated.  
 boolean isChangedSinceLastCheck()
          This method has been created as a temporary fix.
 boolean isCloneNeeded()
          Test to see if tiis navigation object should be clone upon storing and retrieving.
 boolean isContainsAllFields()
          Returns whether or not this Row contains all the Fields of its Table.
 boolean isCopyable(ExecutingContext ec)
          Check to see if this Row may be copyable.
 boolean isDeletable(ExecutingContext ec)
          Check to see if this Row may be deletable.
 boolean isDistinctRow()
          Test to see if this Row was created with distinct values.
 boolean isDistributed()
          Should return true if serialized and distributed for web services.
 boolean isEditable(ExecutingContext ec)
          Check to see if this Row may be edited.
 boolean isEmpty()
          Returns whether or not this Row has any Fields.
 boolean isFieldApplicable(Field fld, ExecutingContext ec)
          Tests if a field is applicable in the current scenario
 boolean isFieldAuthorizedForEdit(Field pField, ExecutingContext pContext)
          Tests if a field is authorized for edit.
 boolean isFieldAuthorizedForRead(Field pField, ExecutingContext pContext)
          Tests if a field is authorized for read.
 boolean isFieldDisplayable(Field field, ExecutingContext ec)
          Check to see if this Field is displayable.
 boolean isFieldReadOnly(Field pField, ExecutingContext pContext)
          Tests if a field is read only.
 boolean isFieldRequired(Field pField, ExecutingContext pContext)
          Tests if a field is required or not.
 boolean isFieldRequiredOnSearch(Field pField, ExecutingContext pContext)
          Tests if a field is required or not.
 boolean isFieldsChanged(List names)
          Check to see if any of this Row's Fields have changed for the given list of Field names.
 boolean isFieldValueNotBlank(String fieldName)
          Returns whether or not this Field is not blank
 boolean isFieldValuesDatabaseDefaults(String[] pFieldNames)
          Deprecated. We should use the default value from the field descriptor instead.
 boolean isGenerateChildRows()
          Check to see if this Row has child rows and if they should be generated when this Row generates.
 boolean isGroupByRow()
          Return whether or not this Row was created with a group by in the SQL clause.
 boolean isGuarded()
          Check whether this Row is protected (secured)
 boolean isHasColumnNames(List columns)
          Checks to see if this RowCollection has all the columns in the given List.
 boolean isInARowCollection()
          Returns whether or not this Row belongs to a RowCollection.
 boolean isIncrementorResetAfterMaxInsertRetries(Field field)
          Check if the FieldIncrementor for the given Field should be reset after the max number of insert retries is attempted.
 boolean isInitializeDerivedFieldsEnabled()
          Tells whether or not to initialize Derived FDs upon row creation.
 boolean isJoinedRow()
          Check if Row was created from a join.
 boolean isKeyFieldsPresent()
          Returns whether or not this Row contains all the key Fields of its Table.
 boolean isLogicalRow()
          Tests if this Row is a logical Row.
 boolean isMultipleDeleteEnabled()
          Returns whether or not multiple record deletes are allowed.
 boolean isPhysicalRow()
          Tests if this Row is a physical Row.
 boolean isPropertyChangeEventsEnabled()
          Tests whether the changing of the value in one of this Row's fields will cause this Row to fire a PropertyChangeEvent or not.
 boolean isReturningFromPossibleValuesSearch()
          Creation date: (2/9/2003 2:02:05 PM)
 boolean isRowKeyed()
          Tests if this row has a key
 boolean isSelectable()
          Tests if the user may select a Row of this type.
 boolean isUnionRow()
          Check if Row was created with a union.
 boolean isValidateRequired()
          Tests if this Row must be validated before it is inserted/updated
 boolean isValidationRequiredForAutoPopulate(Field pField, ExecutingContext pEC)
          Tells whether or not the Field's validate method will be called before the Auto Populate action is executed.
 boolean isViewable(ExecutingContext ec)
          Check to see if this Row may be viewed.
 Iterator iterator()
          Creates and returns an iterator which iterates over the fields in this Row
 void merge(Row row)
          Merges the fields of another row into this one.
 Field newField(FieldDescriptorRow pFD)
          Creates and adds a Field to this Row, then returns the Field.
 Field newField(String pFieldName, FieldDescriptorRow pFD)
          Creates and adds a Field to this Row, then returns the Field.
 Field newField(String pFieldName, int pSQLType)
          Creates and adds a Field to this Row, then returns the Field.
 Field newField(String pFieldName, String pFieldClassName)
          Creates and adds a Field to this Row, then returns the Field.
 void populate(ResultSet pResults)
          Populates this Row with the data from the result set.
 void postCreate()
          Handles actions taken immidately after creation of this object Creation date: (7/11/2002 7:06:46 PM)
 Row prepareForDetails(ExecutingContext pEc)
          Gets the a proper Row for viewing this Rows details.
 Row prepareFromFieldNames(List pNames)
          Gets the a proper Row for viewing this Rows details.
 void removeNavigationKey()
          Clears out any navigation key that may have been set on this Row.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes a property change listener that was added via the addPropertyChangeListener() method.
 void removePropertyChangeListener(String property, PropertyChangeListener listener)
          Removes a property change listener that was added via the addPropertyChangeListener() method.
 void removeRowEventListener(IRowEventListener pNewListener)
          Removes a Listener from this Row
 void removeRowEventListeners(List listeners)
          Removes a Listener from this Row
 void replaceField(Field pField)
          Replace a Field with the given Field.
 List replaceFieldValues(Map nameValueMap)
          Replaces the values in one or more fields.
 Row rollbackChanges()
          Undoes any changes that have been made to this Row since it was read from or written to the database.
 void setAttribute(Object key, Object value)
          Map that allows general attributes about a Row to be set and retreived.
 void setDistributed(boolean pDistributed)
          Should be set to true if serialized and distributed for web services.
 void setDistributedRequestorURL(URL pRequestor)
          Insert the method's description here.
 void setDistributedTargetURL(URL pTarget)
          Insert the method's description here.
 void setFieldInitialValue(String fldNam, Object value)
          Sets the value of the specified field.
 void setFieldValue(String fldNam, double pDouble)
          Sets the current value of the Field to the specified value, and also sets the old value to the previous value.
 void setFieldValue(String fldNam, long pLong)
          Sets the current value of the Field to the specified value, and also sets the old value to the previous value.
 void setFieldValue(String fldNam, Object value)
          Sets the value of the specified field.
 void setFieldValueAsString(String fldNam, String value)
          Sets the value of the specified field.
 void setFieldValueAsString(String fldNam, String value, int startPos)
          Sets the value of the specified field from the starting position (zero indexed) without affecting other positions in this field.
 void setFieldValuesAsDate(String[] fieldNames, Date date)
          This method is for cases when the date is stored in 3 fields (year{2002}, month{5}, day{10}) in the database.
 void setFieldValuesToDefault(List fieldNames, boolean ignoreCase, ExecutingContext ec)
          Sets values from the source Row into this Row (the target) for all Fields that BOTH the source and the target have.
 void setFieldValuesWithCommonFieldNames(Row source)
          Sets values from the source Row into this Row (the target) for all Fields that BOTH the source and the target have.
 void setFieldValuesWithCommonFieldNames(Row source, boolean ignoreCase)
          Sets values from the source Row into this Row (the target) for all Fields that BOTH the source and the target have.
 void setFieldValuesWithCommonUsageIds(Row rowToCopy)
          Copy the field values from the supplied Row with the same usageid into this Row.
 void setFieldValueToDefault(String pName, ExecutingContext ec)
          Sets the fields value back to the default value Creation date: Jun 24, 2004 - 3:14:48 PM
 void setMultipleDeleteEnabled(boolean pMultipleDeleteEnabled)
          Sets whether or not multiple record deletes are allowed.
 void setNavigationKey(String key)
          Set the key used to store/retrieve this Row to/from navigation.
 void setPropertyChangeEventsEnabled(boolean newPropertyChangeEventsEnabled)
          Sets whether the changing of the value in one of this Row's fields will cause this Row to fire a PropertyChangeEvent or not.
 void setPropertyGroups(PropertyGroupList propertyGroups)
          Set the property groups stored in this RowCollection's attributes.
 void setReturningFromPossibleValuesSearch(boolean value)
          Insert the method's description here.
 void setSavepoint()
          Sets savepoints for the Fields in the this Row.
 void setSavepoint(Collection pFields)
          Sets savepoints for the Fields in the given Collection.
 void setSavepoint(Map pFields)
          Sets savepoints for the Fields in the given Map.
 void setStaticAttribute(Object key, Object value)
           
 void setTables(List pTables)
          Deprecated. Pass in a table collection instead
 void setTables(TableCollection pTables)
          Sets the table to which this row belongs.
 void setUseWOWLibrary(short newWOWSystemLibrary)
          Sets which WOW library should be used to execute this Row's context.
 void setValidateRequired(boolean newValidateRequired)
          Sets if this Row must be validated before it is inserted/updated
 void setValues(List pData)
          Sets the values of this Row
 int size()
          Returns the number of fields in this Row.
 void splitAndSetFieldValues(String[] fieldNames, int[] splitIndices, String valueToSplit)
          This method takes the specified value and splits it into mulitple values and then sets those values on the fields with the given field names.
 Row statusChanged(Field pField, ExecutingContext ec)
          Invoked when a status change takes place on of this Row's fields.
 StringBuffer toCSV(boolean pIncludeColumnHeadings, CSVFileDescriptor pCSVFileDescriptor)
          Returns a StringBuffer in CSV format containing all data in this Row Creation date: (2/6/2002 5:14:39 PM)
 StringBuffer toDOC(boolean pIncludeColumnHeadings, CSVFileDescriptor pFileDescriptor)
          Deprecated. Use the single argument method instead
 StringBuffer toDOC(CSVFileDescriptor pFileDescriptor)
          Returns a StringBuffer in Microsoft Word .doc format containing all data in this RowCollection.
 StringBuffer toFDF(FDFFileDescriptor pFileDescriptor)
          Returns a StringBuffer in FDF format containing all data in this Row.
 void toPDF(boolean pIncludeColumnHeadings, PDFFileDescriptor pFileDescriptor)
          Deprecated. Use the single argument method instead
 void toPDF(PDFFileDescriptor pFileDescriptor)
          Generates a PDF file from this Row.
 String toString(boolean includeTable)
          Returns a String representation of this Row.
 void toUpperCase()
          This method will UPPERCASE all the fields values in this Row if it is stored in the databse as a Char or it is a StringField.
 StringBuffer toXML(XMLFileDescriptor pFileDescriptor)
          Returns a StringBuffer in XML format containing all data in this Row.
 Row transferDataTo(Class pNewRowClass)
          Transfers all the data in this Row into a different Row.
 Row transferDataTo(Row pDestinationRow)
          Transfers all the data in this Row into a different Row.
 int update()
          Updates the database with the values in this Row.
 int update(Connection conn)
          Updates the database with the values in this Row.
 int update(Connection connection, ExecutingContext ec)
          Updates the database with the values in this Row.
 int update(ExecutingContext ec)
          Updates the database with the values in this Row.
 void updateObject()
          Deprecated. by WK on (8/10/2003 7:58:28 AM) because there were no references to this method in VAJ any where and all it does is call update()
 boolean validate(ExecutingContext context)
          Validate this Row based on it's configuration and field values.
 boolean validate(ExecutingContext pContext, Principal pUser)
          Deprecated. by WK on (8/9/2003 9:24:24 AM) because the executing context contains the user. Replaced with validate(ExecutingContext). This method will no longer be supported as of WOW 7.0.
 boolean validate(int pOperation, Principal pUser)
          Deprecated. Use the validate() method which takes in an ExecutingContext
 void validateRowOperation(int pOperation, Principal pUser)
          Validate if the operation can be performed on this Row.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

className

public static final String className

COPY

public static final int COPY
Deprecated. use MODE_COPY instead

See Also:
Constant Field Values

DELETE

public static final int DELETE
Deprecated. use MODE_DELETE instead

See Also:
Constant Field Values

INSERT

public static final int INSERT
Deprecated. use MODE_INSERT instead

See Also:
Constant Field Values

MODE_COPY

public static final int MODE_COPY
See Also:
Constant Field Values

MODE_DELETE

public static final int MODE_DELETE
See Also:
Constant Field Values

MODE_INSERT

public static final int MODE_INSERT
See Also:
Constant Field Values

MODE_READ

public static final int MODE_READ
See Also:
Constant Field Values

MODE_SEARCH

public static final int MODE_SEARCH
See Also:
Constant Field Values

MODE_UNKNOWN

public static final int MODE_UNKNOWN
See Also:
Constant Field Values

MODE_UPDATE

public static final int MODE_UPDATE
See Also:
Constant Field Values

READ

public static final int READ
Deprecated. use MODE_READ instead

See Also:
Constant Field Values

UPDATE

public static final int UPDATE
Deprecated. use MODE_UPDATE instead

See Also:
Constant Field Values
Constructor Detail

Row

public Row()
Method Detail

create

public static Row create(Class rowSubClass)
                  throws DataEngineException
Create and return a new Row of the given Class type using the given ExecutingContext to allow for security and/or personalization.

Parameters:
rowSubClass - subclass of Row to create
Returns:
Row
DataEngineException

create

public static Row create(RowCollection pRowCollection)
                  throws DataEngineException
Create and return a new Row and also set its Table.

Returns:
Row
DataEngineException

create

public static Row create(RowCollection pRowCollection,
                         boolean initialRow)
                  throws DataEngineException
Create and return a new Row and also set its Table.

Returns:
Row
DataEngineException

create

public static Row create(Table table)
                  throws DataEngineException
Create and return a new Row of class Row.class and initializes the row with all of the tables fields.

Returns:
Row
DataEngineException

create

public static Row create(Table table,
                         boolean initializeRow)
                  throws DataEngineException
Create and return a new Row of class Row.class and initializes the row with all of the tables fields if specified.

Returns:
Row
DataEngineException

create

public static Row create(Table table,
                         boolean initializeRow,
                         ExecutingContext ec)
                  throws DataEngineException
Create and return a new Row and also set its Table.

Returns:
Row
DataEngineException

create

public static Row create(Table table,
                         Class rowSubClass)
                  throws DataEngineException
Create and return a new Row of the given Class type and also set its Table.

Parameters:
table - Table
rowSubClass - Class
Returns:
Row
DataEngineException

create

public static Row create(Table table,
                         Class rowSubClass,
                         boolean initializeRow)
                  throws DataEngineException
Create and return a new Row of the given Class type and also set its Table.

Parameters:
table - Table
rowSubClass - Class
Returns:
Row
DataEngineException

create

public static Row create(Table table,
                         Class rowSubClass,
                         boolean initializeRow,
                         ExecutingContext pExecutingContext)
                  throws DataEngineException
Create and return a new Row of the given Class type and also set its Table. The executing context allows for security and personalization.

Parameters:
table - Table
rowSubClass - Class
pExecutingContext - ExecutingContext
Returns:
Row
DataEngineException

create

public static Row create(Table table,
                         Class rowSubClass,
                         ExecutingContext executingContext)
                  throws DataEngineException
Create and return a new Row of the given Class type and also set its Table.

Parameters:
table - Table
rowSubClass - Class
Returns:
Row
DataEngineException

create

public static Row create(Table table,
                         Class rowSubClass,
                         List fieldNames,
                         boolean initializeRow)
                  throws DataEngineException
Create and return a new Row of the given Class type and also set its Table. The executing context allows for security and personalization.

Parameters:
table - Table
rowSubClass - Class
Returns:
Row
DataEngineException

create

public static Row create(Table table,
                         Class rowSubClass,
                         List fieldNames,
                         boolean initializeRow,
                         ExecutingContext pExecutingContext)
                  throws DataEngineException
Create and return a new Row of the given Class type and also set its Table. The executing context allows for security and personalization.

Parameters:
table - Table
rowSubClass - Class
pExecutingContext - ExecutingContext
Returns:
Row
DataEngineException

create

public static Row create(Table table,
                         List fieldNames,
                         boolean initialize)
                  throws DataEngineException
Create and return a new Row for the given table and field names.

Parameters:
table - Table to create Row from
fieldNames - names of Fields to initialize Row with if specified
initialize - whethor or not to initialize the Row
Returns:
newly created Row
DataEngineException

create

public static Row create(Table table,
                         List fieldNames,
                         boolean initializeRow,
                         ExecutingContext pExecutingContext)
                  throws DataEngineException
Create and return a new Row of the given Class type and also set its Table. The executing context allows for security and personalization.

Parameters:
table - Table
pExecutingContext - ExecutingContext
Returns:
Row
DataEngineException

create

public static Row create(Table table,
                         List names,
                         ExecutingContext ec)
                  throws DataEngineException
Create and return a new Row and also set its Table.

Returns:
Row
DataEngineException

add

public void add(Field pField)
         throws DataEngineException
Adds the given Field to this Row's FieldCollection.

Parameters:
pField - Field
DataEngineException

add

public void add(RowCollection pRowCollection)
Adds the given RowCollection to the List of RowCollection's this Row belongs to.

Parameters:
pRowCollection - RowCollection

addObject

public void addObject()
               throws Exception
Add an object to the system.

Specified by:
addObject in interface IBusinessObject
Exception

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener which is informed when any field of this Row which has its value changed. The source of any PropertyChangeEvent passed to a listener is this object; the name of the Field whose value was changed will be included in the PropertyChangeObject.


addPropertyChangeListener

public void addPropertyChangeListener(String property,
                                      PropertyChangeListener listener)
Adds a listener which is informed when a specific property of this Row which has its value changed. The source of any PropertyChangeEvent passed to a listener is this object; the name of the Field whose value was changed will be included in the PropertyChangeObject.

Parameters:
property - The name of the property (or field) to which the listener will listen
listener - The object which to listen to the property

addRowEventListener

public void addRowEventListener(IRowEventListener pNewListener)
Adds a new Listener to this Row.


addRowEventListeners

public void addRowEventListeners(List listeners)

addTable

public void addTable(Table pTable)
Sets the table to which this row belongs.


appendDisplayType

public StringBuffer appendDisplayType(StringBuffer sb)
Deprecated. row shouldn't know how to display html stuff - moved logic back into htmltable, eventually we could check the row to see if its property group has a css to use and use that if needed

Appends a String describing the display type for this row. In HTML, this correpsonds to the CSS class that will be used to display this row. For example, if this method returned the String "XYZ" then the CSS class for displaying this Row would be "tr.results-XYZ-even" for even rows and "tr.results-XYZ-odd" for odd rows.


batchProcess

public void batchProcess()
                  throws CMException
Process this Object. This method may be overridden by subclasses to provide for special case processing of the Row.

Specified by:
batchProcess in interface IBatchProcessObject
CMException

clearFields

public void clearFields()
Removes all the Fiels from this Row.


clearTables

public void clearTables()
Removes all the Fiels from this Row.


clearValidationException

public void clearValidationException()
Clears any validation exceptions that have previously been set on each of this Row's Fields.


clone

public Object clone()
Clone this Row object.

Specified by:
clone in interface INavigationObject
Overrides:
clone in class Object

cloneRow

public Row cloneRow()
             throws CMException
Clones this Row object.

CMException

commitFieldValues

public void commitFieldValues()
Commits the values of the Fields in this Row. After invoking this method any fields with "old values" will have their old values remove, and will treat their current values as if they had been read from the database.


commitFieldValues

public void commitFieldValues(Collection pFields)
Commits the values of the Fields in the given Collection. After invoking this method any fields with "old values" will have their old values remove, and will treat their current values as if they had been read from the database.


commitFieldValues

public void commitFieldValues(Map pFields)
Commits the values of the Fields in the given Map. After invoking this method any fields with "old values" will have their old values remove, and will treat their current values as if they had been read from the database.


concatenateFieldFullLengthValues

public String concatenateFieldFullLengthValues(String[] pFieldNames,
                                               String pSeperator)
                                        throws CMException
Concat the field full length string values inserting the supplied seperator between values.

Parameters:
pFieldNames - String[] fieldNames to concat
pSeperator - String value to insert between fields
Returns:
FieldDescriptorRow
CMException

concatenateFieldValues

public String concatenateFieldValues(String[] pFieldNames,
                                     String pSeperator,
                                     boolean pTrimValues)
                              throws CMException
Concat the field values inserting the supplied seperator between values and optionally trim the values before concating. Example: custRow.concatenateFieldValues({"fname", "lname", " ", true) This will concat the first name to the last name with a space between triming both prior to concating

Parameters:
pFieldNames - String[] fieldNames to concat
pSeperator - String value to insert between fields
pTrimValues - boolean trim the values before concating
Returns:
FieldDescriptorRow
CMException

containsField

public boolean containsField(String fieldName)
Check to see if this Row contains the Field with the given name.

Parameters:
fieldName - name of Field to see if Row contains.
Returns:
true if Row contains a Field for the given name; false otherwise.

copy

public Row copy(boolean pFullCopy)
         throws CMException
Copy this Row. If specified, copy all of its Fields from the database.

Parameters:
pFullCopy - whether or not to copy the complete Row
Returns:
Row
CMException

copyIntoRowFieldsWithCommonFieldNames

public void copyIntoRowFieldsWithCommonFieldNames(Row rowToCopy)
                                           throws CMException
Copy the fields from the supplied Row with the same field name into this Row.

Parameters:
rowToCopy - the row that the values will be copied from
CMException

copyIntoRowFieldsWithCommonFieldNames

public void copyIntoRowFieldsWithCommonFieldNames(Row rowToCopy,
                                                  boolean ignoreCase)
                                           throws CMException
Copy the fields from the supplied Row with the same field name into this Row.

Parameters:
rowToCopy - the row that the values will be copied from
ignoreCase - whether or not to ignore the case of the field names
CMException

copyIntoRowFieldsWithCommonUsageIds

public void copyIntoRowFieldsWithCommonUsageIds(Row rowToCopy)
                                         throws CMException
Copy the fields from the supplied Row with the same usageid into this Row.

CMException

copyIntoRowFieldsWithGivenFieldNames

public void copyIntoRowFieldsWithGivenFieldNames(List fieldNames,
                                                 Row rowToCopy)
                                          throws CMException
Copy the fields from the supplied Row that has a name in the given list.

Parameters:
fieldNames - the names of the fields that will be eligible for the copy
rowToCopy - the row that the values will be copied from
CMException

copyIntoRowFieldsWithGivenFieldNames

public void copyIntoRowFieldsWithGivenFieldNames(List fieldNames,
                                                 Row rowToCopy,
                                                 boolean ignoreCase)
                                          throws CMException
Copy the fields from the supplied Row that has a name in the given list.

Parameters:
fieldNames - the names of the fields that will be eligible for the copy
rowToCopy - the row that the values will be copied from
ignoreCase - whether or not to ignore the case of the field names
CMException

createRow

public Row createRow(Row pDefaultRow)
              throws CMException
Creates a new Row. Information from the database is read into a default Row by the DataEngine; this method is then invoked to get a Row of the correct type based on the information in the default Row. Typically the data in the Row is examined by this method, a Row of the appropriate type is created, and then the transferDataTo() method is used to move the data from the default Row to the newly created Row. Override this method if the type of Row to add needs to be dynamically determined from the retrieved data.

Specified by:
createRow in interface IRowCreator
Parameters:
pDefaultRow - A Row containing data read from the database (it will always be equal to this)
Returns:
A Row which the DataEngine will add to a RowCollection
CMException

defaultMerge

public void defaultMerge(RowCollection rc)
                  throws CMException
Works similar to the merge method, except all the fields that are merged into this row have the default values for that field type instead of actual values.

CMException

delete

public final int delete()
                 throws CMException
Deletes the row from the database file to which it belongs. If it cannot be deleted because concurrent alterations to the database row prevent its deletion, a ConcurrentAlterationException is thrown.

Returns:
The number of row that were deleted.
CMException

delete

public final int delete(Connection conn)
                 throws CMException,
                        DistributedException
Deletes the row from the database file to which it belongs. If it cannot be deleted because concurrent alterations to the database row prevent its deletion, a ConcurrentAlterationException is thrown.

Parameters:
conn - The connection to use for the deletion.
Returns:
The number of row that were deleted.
CMException
DistributedException

delete

public int delete(Connection conn,
                  ExecutingContext ec)
           throws CMException,
                  DistributedException
Deletes the row from the database file to which it belongs. If it cannot be deleted because concurrent alterations to the database row prevent its deletion, a ConcurrentAlterationException is thrown.

Parameters:
conn - The connection to use for the deletion.
Returns:
The number of row that were deleted.
CMException
DistributedException

delete

public final int delete(ExecutingContext ec)
                 throws CMException
Deletes the row from the database file to which it belongs. If it cannot be deleted because concurrent alterations to the database row prevent its deletion, a ConcurrentAlterationException is thrown.

Returns:
The number of row that were deleted.
CMException

deleteObject

public void deleteObject()
                  throws Exception
Delete an object from the system. First call the BusinessObjectManager who can either delete it or veto the delete by throwing an Exception.

Specified by:
deleteObject in interface IBusinessObject
Exception

divide

public double divide(String fieldName,
                     String fieldName2)
              throws CMException
Get the division of the first field with the second fields. Example: double value = row.divide("NumeratorField", "DenominatorField");

Parameters:
fieldName - field name of numerator.
fieldName2 - field name of denominator.
Returns:
double representing the division of the two fields.
CMException

duplicateKey

public void duplicateKey(ExecutingContext ec)
                  throws CMException
Method called when a duplicate key is encountered attempting to insert this Row. Subclasses may override to provide additional logic before insert is attempted again.

Parameters:
ec - context in which the Row is being processed.
CMException

equals

public boolean equals(Object otherRow)
Tests if this Row is equal to another Row. Two Rows are equal if for every field in Row A, there is a corresponding field in Row B to which the field in Row A is equal.

Overrides:
equals in class Object

equals

public boolean equals(Row row,
                      List fieldNames)
Tests if a group of fields in this row have the same values as a group of fields in another row


equalsInstance

public boolean equalsInstance(Object otherRow)
Tests if this Row is equal to another Row.


executeDistributedAction

public void executeDistributedAction()
                              throws DistributedException
Insert the method's description here. Creation date: (1/23/2003 2:02:40 PM)

Specified by:
executeDistributedAction in interface IDistributedExecutableObject
DistributedException

fieldHasPossibleValuesSQLOperation

public boolean fieldHasPossibleValuesSQLOperation(Field pField,
                                                  ExecutingContext pContext)
Tests if a field is possible values op. The default behavior is to ask the FD, but subclasses may override this method and implement a different behavior.

Parameters:
pField - The whose read only status is being tested
pContext - The current executing context which may be null

getAssociation

public Object getAssociation(String fieldName)
                      throws CMException
Gets the association for the given Field name. If the association is 1 to 1, then a Row is returned. If it is 1 to Many, then a RowCollection is returned. Note: to retrieve any association containing user parameters, getAssociation(String, ExecutingContext) should be called passing in the current executing context which contians the current user.

Parameters:
fieldName - name of Field containing association
Returns:
Object retrieved from executing the association operation
CMException

getAssociation

public Object getAssociation(String fieldName,
                             ExecutingContext ec)
                      throws CMException
Gets the association for the given Field name. If the association is 1 to 1, then a Row is returned. If it is 1 to Many, then a RowCollection is returned.

Parameters:
fieldName - name of Field containing association
ec - current context in which user is executing
Returns:
Object as a result of executing the association
CMException

getAssociationByOperationUsageId

public Object getAssociationByOperationUsageId(int usageId,
                                               ExecutingContext ec)
                                        throws CMException
Gets the association for the given operation usage id. If the association is 1 to 1, then a Row is returned. If it is 1 to Many, then a RowCollection is returned.

Parameters:
usageId - usage id of the operation
ec - current context in which user is executing
Returns:
Object as a result of executing the association
CMException

getAssociationOperation

public Operation getAssociationOperation(String fieldName)
                                  throws CMException
Gets the association's operation for the Field having the given name.

Parameters:
fieldName - name of Field to get association operation from.
Returns:
association operation for the field.
CMException

getAttribute

public Object getAttribute(Object key)
Map that allows general attributes about a Row to be set and retreived. Return the object with the specified key Creation date: (2/19/2002 3:10:01 PM)

Returns:
Object

getChildren

public RowCollection getChildren()
                          throws CMException
Gets a RowCollection of children this Row has.

CMException

getColumnSpan

public int getColumnSpan(Field field,
                         boolean isDetails)
Get the number of columns the given field should take up.

Parameters:
field - to get column span for
isDetails - whether or not its details or results table being generated

getCompleteRow

public Row getCompleteRow()
                   throws CMException
Gets a complete Row for this Row containing all of its Fields in the database. NOTE: WK (4/12/2002 5:45:27 PM) method will not work for joined row.

Returns:
Row
CMException

getCompleteRow

public Row getCompleteRow(Connection pConnection)
                   throws CMException
Gets a complete Row for this Row containing all of its Fields in using the specified connection if needed. NOTE: WK (4/12/2002 5:45:27 PM) method will not work for joined row.

Returns:
Row
CMException

getConfigProperty

public final Object getConfigProperty(String key,
                                      ExecutingContext executingContext)
Get a config property for the given row.


getCopiedFieldValues

public Map getCopiedFieldValues()
                         throws CMException
Returns a Map of field values, keyed by field name. The returned Map is independent of the Row - alterations of the fields in the Row or the values in the Row's fields will not affect the values in the Map. Logical fields are not included in the Map

CMException

getCSVRow

public List getCSVRow()
Returns a List of Fields that implement ICSVField or a list of Objects that provide a toString method which returns the desired text to be written to the CSV file. Each row has a List of fields. Below is an example would return a List that has 5 elements (5 rows). Each row is a List with 2 elements (2 fields).

Tyler,Holm Justin,Epstein Paul,Holm Wes,King Nate,Levis

Creation date: (12/5/2001 1:52:02 AM)

Specified by:
getCSVRow in interface ICSVRow
Returns:
java.util.List that is unmodifiable

getCSVRow

public List getCSVRow(List fieldNames)
Returns a List of Fields that implement ICSVField or a list of Objects that provide a toString method which returns the desired text to be written to the CSV file. Each row has a List of fields. Below is an example would return a List that has 5 elements (5 rows). Each row is a List with 2 elements (2 fields).

Tyler,Holm Justin,Epstein Paul,Holm Wes,King Nate,Levis

Specified by:
getCSVRow in interface ICSVRow
Parameters:
fieldNames - Only the fields specified by the names in this argument should be returned in the List Creation date: (12/5/2001 1:52:02 AM)
Returns:
java.util.List that is unmodifiable

getDatabaseRow

public Row getDatabaseRow(Connection conn)
                   throws CMException
Rereads and returns this row as it exists in the database, or null if it doesn't exist in the database. Derived fields will NOT be returned from this method.

Parameters:
conn - the connection to the database
CMException

getDatabaseRow

public Row getDatabaseRow(Connection conn,
                          boolean includeDerivedFields)
                   throws CMException
Rereads and returns this row as it exists in the database, or null if it doesn't exist in the database.

Parameters:
conn - the connection to the database
CMException

getDeleteConfirmationMessage

public String getDeleteConfirmationMessage()
Get the delete confirmation message.


getDeleteConfirmation

public String getDeleteConfirmation()
Deprecated.  

Get the delete confirmation method to call.


getDisplayValue

public String getDisplayValue(String fieldName)
                       throws CMException
Gets the display value for the field with the given name.

CMException

getDistributedRequestorURL

public URL getDistributedRequestorURL()
Insert the method's description here. Creation date: (1/23/2003 3:33:22 PM)


getExternalName

public String getExternalName(String fieldName)
                       throws CMException
Gets the external name of a field

CMException

getExternalNames

public List getExternalNames()
                      throws CMException
Gets the external names of this RowCollection's fields

CMException

getFDFData

public StringBuffer getFDFData(StringBuffer pFDFData)
This returns a StringBuffer containing all necessary FDF data for this object. Creation date: (2/4/2002 4:11:45 PM)

Specified by:
getFDFData in interface IFDFObject

getFDTable

public Table getFDTable()
Get's a table to use when searching for FDs. This allows the user to override in cases where a View should use the same FDs as a physical table.


getField

public Field getField(int pIndex)
Returns the Field at the specified index in this Row. The first Field has an index of 1.

Parameters:
pIndex - int
Returns:
Field

getField

public Field getField(String fieldName)
Returns the Field for the given name, or null if no such Field exists.


getField

public Field getField(String name,
                      boolean create)
Get the Field in this Row with the given name. If the Field doesn't exist and the flag is set to create the Field, then the Field will be created. If the Field is derived it will be created no matter what if it doesn't exist.

Parameters:
name - name of Field
create - flag indicating if Field should be created.
Returns:
Field for the given name. null if doesn't exist.

getFieldDefaultValue

public Object getFieldDefaultValue(Field pField,
                                   ExecutingContext executingContext)
                            throws CMException
Get the field's default value as a String.

Parameters:
pField - The field whose default value will be used
CMException

getFieldDescriptor

public FieldDescriptorRow getFieldDescriptor(String pFieldName)
                                      throws CMException
Return the IFieldDescriptor for the Field with the specified name.

Parameters:
pFieldName - String
Returns:
IFieldDescriptor
CMException

getFieldDescriptor

public FieldDescriptorRow getFieldDescriptor(String pFieldName,
                                             Table pTable)
                                      throws CMException
Return the IFieldDescriptor for the Field with the specified name.

Parameters:
pFieldName - String
Returns:
IFieldDescriptor
CMException

getFieldDescriptor

public FieldDescriptorRow getFieldDescriptor(Field pField,
                                             FieldDescriptorRow pFieldDescriptor)
                                      throws CMException
Row subclasses can override this method to return the a clone of the default FD added by TJH Jun 22, 2004 11 : 49 : 27 PM to allow Rows to return different FDs for this field. This is useful in the case where the same field may be used for more than one case.

Parameters:
pField - Field
pFieldDescriptor - FieldDescriptorRow
Returns:
FieldDescriptorRow
CMException

hasChildRows

public boolean hasChildRows()
Check to see if this Row has child rows.


getFieldDescriptorsWithUsage

public List getFieldDescriptorsWithUsage()
                                  throws CMException
Get a Collection of FieldDescriptorRows for this Row that have a UsageId defined for them.

Returns:
List
CMException

getFieldDescriptorsWithUsageId

public List getFieldDescriptorsWithUsageId(int usageId)
                                    throws CMException
Get a Collection of FieldDescriptorRows for this Row that have the given UsageId defined for them.

Returns:
List
CMException

getFieldDescriptorWithUsageId

public FieldDescriptorRow getFieldDescriptorWithUsageId(int usageId)
                                                 throws CMException
Get a FieldDescriptorRow for this Row that have the given usage id defined for them. If more than one FD has the given usage id, the first one is returned.

Returns:
FieldDescriptorRow
CMException

getFieldDisplayValue

public Object getFieldDisplayValue(String fldNam)
                            throws CMException
Returns the display value for the Field with the specified name.

Returns:
Object
CMException

getFieldNames

public List getFieldNames()
Return a List of all the Field names in this Row.

Returns:
List

getFields

public List getFields(Class pFieldClassType)
Returns a List of Fields for requested Class type.


getFields

public Map getFields(List pFieldNames)
              throws CMException
Returns a Map of Fields in this Row from the names given in the List.

Parameters:
pFieldNames - List of Field names
Returns:
Map
CMException

getFieldSets

public List getFieldSets()
                  throws CMException
Gets a List of the FieldSet objects, containing the fields in this Row

CMException

getFieldSQLObject

public Object getFieldSQLObject(String fieldName)
                         throws CMException
Gets this field's value as an Object in SQL format.

CMException

getFieldsToDisplay

public List getFieldsToDisplay()
Return a List of all the Field names that will be displayed by default.

Returns:
List

getFieldsToDisplayStrict

public List getFieldsToDisplayStrict(ExecutingContext pEc)
Return a List of all the Field names that will be displayed by default. Same as getFieldsToDisplayExcept checks for DISPLAY_RULE_NEVER and !isAuthorizedForRead();

Returns:
List

getFieldsToDisplayStrict

public List getFieldsToDisplayStrict(List fieldNames,
                                     ExecutingContext pEc)
Removes fields from the list that should not be displayed.

Returns:
List

getFieldStyleClass

public String getFieldStyleClass(Field field,
                                 String value,
                                 String displayValue,
                                 ExecutingContext ec)
Get a Field's style. Row subclasses may override to special case handle custom styles for Fields.

Parameters:
field - The Field in which to get the style of
Returns:
Field's style.

getFieldValue

public Object getFieldValue(String pFieldName)
Gets a field in this Row by name.

Returns:
The field whose name was passed in, or Null if no such field exists in this Row

getFieldWithUsageId

public Field getFieldWithUsageId(int usageId)
                          throws CMException
Get the Field with the given usage id from this row.

CMException

getHeaderText

public String getHeaderText(ExecutingContext ec)
Returns information for the user that will be displayed in the header of the Row

Returns:
String

getLibraryName

public String getLibraryName()
Returns the Library's name to which the Table belongs to.

Returns:
String

getMaxFieldLengths

public int getMaxFieldLengths()
                       throws CMException
Returns the max lengths of each field in this row added together. Heading information is not included when calculating this value. Creation date: (1/24/2002 12:03:58 PM)

CMException

getMaxFieldLengths

public int getMaxFieldLengths(FileDescriptor fled)
                       throws CMException
Returns the max lengths of each field in this row added together.

CMException

getMaxInsertRetries

public int getMaxInsertRetries()
Number of times to attempt to re-insert a Row when a duplicate key exception was encountered. Upon duplicate key, autoincrement Fields are incremented and the insert is attempted again. Subclasses may override to allow for a different number insert retry attempts.

Returns:
number of retries on insert.

getMetaDataSystemAlias

public String getMetaDataSystemAlias()
Returns the meta data alias of the system to which this Row belongs

Returns:
String

getNamed

public INamed getNamed(int i)
Specified by:
getNamed in interface INamedCollection

getNamesOfUpdatedFields

public List getNamesOfUpdatedFields()
                             throws CMException
Return the names of all of the Fields in this Row that have been updated.

CMException

getNavigationKey

public String getNavigationKey()
Get the key used to store/retrieve this Row to/from navigation.

Specified by:
getNavigationKey in interface INavigationObject

getNavigationListKey

public String getNavigationListKey()
Get the key used to store and retrieve a List of Rows that have been put into navigation. If any subclasses need to be grouped separate, they can override this method and specify their own navigation list key.

Specified by:
getNavigationListKey in interface INavigationObject

getPercentage

public double getPercentage(String[] fieldNames)
                     throws CMException
Gets the percentage of the first field compared with all the fields given.

Example: {"A", "B"} would result in A / (A+B), and {"C", "A", "B"} would result in C / (C + A + B)

Parameters:
fieldNames - String[] of fields names to get percentage for.
CMException

getPhysicalFieldNames

public List getPhysicalFieldNames()
                           throws CMException
Gets a List of the names of all Fields in this Row, excluding logical Fields

CMException

getPropertyGroup

public PropertyGroup getPropertyGroup(String groupName)
Gets the first PropertyGroup with the given property group name.


getPropertyGroups

public PropertyGroupList getPropertyGroups()
Get all the property groups stored in this RowCollection's attributes.


getPropertyGroups

public List getPropertyGroups(String groupName)
Get this RowCollection's property groups with the given group name.


getRowCollection

public RowCollection getRowCollection()
Gets the first RowCollection this Row is contained in. (Null if no RowCollection)

Returns:
RowCollection

getRowDisplayAttributes

public String getRowDisplayAttributes()
                               throws CMException
Return a String that provides HTML or other display characteristics of this Row. Subclasses can override and return a String such as "background-color:red" which will be included in the HTMLGenerator.generateTable() method.

CMException

getRowDisplayAttributes

public StringBuffer getRowDisplayAttributes(StringBuffer html)
                                     throws CMException
Return a String that provides HTML or other display characteristics of this Row. Subclasses can override and return a String such as "class=\"pjr-yellow\"" which will be included in the HTMLGenerator.generateTable() method.

CMException

getRowKey

public RowKey getRowKey()
                 throws CMException
Gets the RowKey object for this row. This will be null if this row does not have a key

CMException

getSecuredTypeId

public int getSecuredTypeId()
Gets the id of the secured type.

Specified by:
getSecuredTypeId in interface IGuarded

getSecuredTypeName

public String getSecuredTypeName()
Gets the secured type name of the secured object.

Specified by:
getSecuredTypeName in interface IGuarded

getSecurityType

public int getSecurityType()
Gets the type of security being used. Below is a list of possible securities.

0 - Unsecured 1 - Secured 2 - Admins Only 3 - PJ Admins Only

Specified by:
getSecurityType in interface IGuarded
Returns:
security type

getSQL

public String getSQL()
Gets the SQL statement used to create this Row.


getSQLContext

public SQLContext getSQLContext()
Returns SQLContext to which the RowCollection this Row belongs has.


getStaticAttribute

public Object getStaticAttribute(Object key)

getSum

public double getSum(String[] pFieldNames)
              throws CMException
Returns the sum of all the fields represented in pFieldNames if that field is a number

Example: double totalCash = bankRow.getSum(new String[]{"TotalChecking", "TotalSavings", "TotalBonds");

Parameters:
pFieldNames - String[] fieldNames to add together
CMException

getSystemAlias

public String getSystemAlias()
Returns the alias of one of the systems to which this Row belongs.

Returns:
String

getTable

public Table getTable()
Get's this field's table. If row has more than one table, the first one is returned


getTable

public Table getTable(int pTableIndex)

getTableName

public String getTableName()
Returns the name of the Table of this Row.

Returns:
String

getTables

public TableCollection getTables()
Get's this field's table.


getTimestamp

public long getTimestamp()
Gets the time when this Row was read from the database, or Long.MIN_VALUE if the time cannot be determined


getUpdatedFields

public Map getUpdatedFields()
                     throws CMException
Return the names of all the fields.

Returns:
Map
CMException

getUserMessageForOperation

public String getUserMessageForOperation(int pMode)
Return a message to the user after an operation completes. This allows you to return something besides the generic "1 row updated, etc" By default, return null which will use the default message from the request.

See Also:
(see Row constants to find the modes.

getUseWOWLibrary

public short getUseWOWLibrary()

getValidationExceptions

public ValidationExceptionCollection getValidationExceptions()
Be careful when you call this method because it is derived and spins through all the fields. This will return a collection of al the Exceptions of each field Creation date: (4/5/2002 2:01:13 PM)

Returns:
planetj.exception.ValidationExceptionCollection

getValueAsBoolean

public boolean getValueAsBoolean(String pFieldName)
Returns a primitive that represents the value in the specified field.

Parameters:
pFieldName - java.lang.String The name of the field
Returns:
boolean

getValueAsByte

public byte getValueAsByte(String pFieldName)
Returns a primitive that represents the value in the specified field.

Parameters:
pFieldName - java.lang.String The name of the field
Returns:
byte

getValueAsDate

public Date getValueAsDate(String pFieldName)
Returns a Date

Parameters:
pFieldName - String that must be the field name of a DateField
Returns:
java.util.Date

getValueAsDate

public Date getValueAsDate(String pYearFldName,
                           String pMonthFldName,
                           String pDayFldName)
Returns a Date that represents the Date value of 3 seperate fields.

Returns:
java.util.Date

getValueAsDouble

public double getValueAsDouble(int fieldIndex)
Gets a primitive that represents the value in the specified field.

Parameters:
fieldIndex - Index of the Field in this Row
Returns:
double

getValueAsDouble

public double getValueAsDouble(String pFieldName)
Returns a primitive that represents the value in the specified field.

Parameters:
pFieldName - java.lang.String The name of the field
Returns:
double

getValueAsFloat

public float getValueAsFloat(String pFieldName)
Returns a primitive that represents the value in the specified field.

Parameters:
pFieldName - java.lang.String The name of the field
Returns:
float

getValueAsFullLengthString

public String getValueAsFullLengthString(String pFieldName)
                                  throws CMException
Returns a String that represents the value in the specified field. Pads any numberic fields with leading/trailing zeros to match their max defined sizes. Example: a Numberic 7 long will be returned as "0000044" while a Decimal 5,2 will be "00044.12"

Parameters:
pFieldName - java.lang.String The name of the field
Returns:
String
CMException

getValueAsInt

public int getValueAsInt(String pFieldName)
Returns a primitive that represents the value in the specified field.

Parameters:
pFieldName - java.lang.String The name of the field
Returns:
int

getValueAsLong

public long getValueAsLong(String pFieldName)
Returns a primitive that represents the value in the specified field.

Parameters:
pFieldName - java.lang.String The name of the field
Returns:
long

getValueAsNumber

public Number getValueAsNumber(int fieldIndex)
Gets a primitive that represents the value in the specified field.

Parameters:
fieldIndex - Index of the Field in this Row
Returns:
Number

getValueAsNumber

public Number getValueAsNumber(String pFieldName)
Returns a Number that represents the value in the specified field.

Parameters:
pFieldName - java.lang.String The name of the field
Returns:
Number

getValueAsShort

public short getValueAsShort(String pFieldName)
Returns a primitive that represents the value in the specified field.

Parameters:
pFieldName - java.lang.String The name of the field
Returns:
short

getValueAsString

public String getValueAsString(int fieldIndex)
Gets a String that represents the value in the specified field.

Parameters:
fieldIndex - Index of the Field in this Row
Returns:
String

getValueAsString

public String getValueAsString(String pFieldName)
Returns a String that represents the value in the specified field.

Parameters:
pFieldName - java.lang.String The name of the field
Returns:
String

getValueByUsageId

public Object getValueByUsageId(int usageId)
                         throws CMException
Return the names of all the fields.

Returns:
Object
CMException

getValues

public Iterator getValues()
Returns an iterator which iterates over the values in this Row


getXMLData

public StringBuffer getXMLData(StringBuffer pXMLData)
This returns a StringBuffer containing all necessary XML data for this object. Creation date: (1/21/2002 8:16:25 PM)

Specified by:
getXMLData in interface IXMLObject

getXMLData

public StringBuffer getXMLData(XMLFileDescriptor pDescriptor,
                               StringBuffer pXMLData)
This returns a StringBuffer containing all necessary XML data for this object. Creation date (1/21/2002 8:16:25 PM)

Parameters:
pDescriptor - Describes what XML data to output
pXMLData - StringBuffer to write to
Returns:
StringBuffer containing all necessary XML data for this object

getXMLHeaderData

public StringBuffer getXMLHeaderData(StringBuffer pXMLData)
This returns a StringBuffer containing all XMLHeader data for this Row. This information will be commented in the XML file and used for information only

Creation date: (2/12/2002 5:42:05 PM)


handleDistributed

public void handleDistributed(String pActionName)
                       throws DistributedException
Set the method that will be called after Row is deserialized on the target. Serialize this Row and attempt to upload to the target. Creation date: (1/23/2003 3:46:33 PM)

DistributedException

isGenerateChildRows

public boolean isGenerateChildRows()
Check to see if this Row has child rows and if they should be generated when this Row generates.


hasMultipleStyleClasses

public boolean hasMultipleStyleClasses(Field field,
                                       ExecutingContext ec)
Check if the given Field possibly has more than one style class.

Parameters:
field - Field to see if more than one style class exists
ec - current context in which code is executing
Returns:
whether or not Field has multiple styles

hasPropertyChangeListeners

public boolean hasPropertyChangeListeners(String pProperty)
Tests if any object are listening to this Row for changes in one of its properties.

Parameters:
pProperty - The property whose listeners are of interest

insert

public final int insert()
                 throws CMException
Inserts this Row into its table.

Returns:
The number of Rows that were inserted
CMException

insert

public final int insert(Connection conn)
                 throws CMException,
                        DistributedException
Inserts this Row into its table.

Returns:
The number of Rows that were inserted
CMException
DistributedException

insert

public int insert(ExecutingContext ec)
           throws CMException
Inserts this Row into the specified database.

Returns:
The number of Rows that were inserted
CMException

insert

public int insert(SQLContext context)
           throws CMException
Inserts this Row into the specified database.

Returns:
The number of Rows that were inserted
CMException

is

public boolean is(String pFieldName)
           throws DataEngineException
Gets the specified field and returns the boolean value. This method assumes that this field is a boolean field that has it's value specified as either 'true' or 'false'.

Parameters:
pFieldName - java.lang.String
Returns:
boolean
Throws:
Exception
DataEngineException

isARow

public final boolean isARow()
Return a boolean indicating if this object is a Row

Returns:
boolean

isARowCollection

public final boolean isARowCollection()
Return a boolean indicating if this object is a RowCollection

Returns:
boolean

isChanged

public boolean isChanged()
Returns whether or not this Row's Fields have changed. Ignore CURRENT VALUE fields.

Returns:
boolean

isChangedRealTime

public boolean isChangedRealTime(boolean realTimeCheck)
Deprecated.  

Returns whether or not this Row's Fields have changed. Accepts boolean to determine if RealTimeFields should be checked for change.

Returns:
boolean

isChangedSinceLastCheck

public boolean isChangedSinceLastCheck()
This method has been created as a temporary fix. Not safe concurrently. Should be remove after email issues resolved. Returns whether or not this Row's Fields have changed since the last time checked. Always set to false after check is performed.

Returns:
boolean

isCloneNeeded

public boolean isCloneNeeded()
Description copied from interface: INavigationObject
Test to see if tiis navigation object should be clone upon storing and retrieving.

Specified by:
isCloneNeeded in interface INavigationObject

isContainsAllFields

public boolean isContainsAllFields()
                            throws CMException
Returns whether or not this Row contains all the Fields of its Table.

Returns:
boolean
CMException

isCopyable

public boolean isCopyable(ExecutingContext ec)
Check to see if this Row may be copyable. By default, all Rows may be copyable. Subclasses may override to implement a different behavior.

Parameters:
ec - context in which application is executing.
Returns:
true if Row may be copyable; false otherwise.

isDeletable

public boolean isDeletable(ExecutingContext ec)
Check to see if this Row may be deletable. By default, all Rows may be deletable. Subclasses may override to implement a different behavior.

Parameters:
ec - context in which application is executing.
Returns:
true if Row may be deletable; false otherwise.

isDistinctRow

public boolean isDistinctRow()
Test to see if this Row was created with distinct values.

Returns:
boolean

isDistributed

public boolean isDistributed()
Should return true if serialized and distributed for web services. Creation date: (1/23/2003 2:08:25 PM)

Returns:
boolean

isEditable

public boolean isEditable(ExecutingContext ec)
Check to see if this Row may be edited. By default, all Rows may be edited. Subclasses may override to implement a different behavior.

Parameters:
ec - context in which application is executing.
Returns:
true if Row may be edited; false otherwise.

isEmpty

public boolean isEmpty()
Returns whether or not this Row has any Fields.


isFieldApplicable

public boolean isFieldApplicable(Field fld,
                                 ExecutingContext ec)
                          throws CMException
Tests if a field is applicable in the current scenario

Parameters:
fld - The field which may or may not be applicable
CMException

isFieldAuthorizedForEdit

public boolean isFieldAuthorizedForEdit(Field pField,
                                        ExecutingContext pContext)
Tests if a field is authorized for edit. The default behavior is to ask the FD, but subclasses may override this method and implement a different behavior.

Parameters:
pField - The whose read only status is being tested
pContext - The current executing context which may be null

isFieldAuthorizedForRead

public boolean isFieldAuthorizedForRead(Field pField,
                                        ExecutingContext pContext)
Tests if a field is authorized for read. The default behavior is to ask the FD, but subclasses may override this method and implement a different behavior.

Parameters:
pField - The whose read only status is being tested
pContext - The current executing context which may be null

isFieldDisplayable

public boolean isFieldDisplayable(Field field,
                                  ExecutingContext ec)
                           throws CMException
Check to see if this Field is displayable.

Parameters:
ec - context in which code is running.
Returns:
true if Field is displayable
CMException

isFieldReadOnly

public boolean isFieldReadOnly(Field pField,
                               ExecutingContext pContext)
Tests if a field is read only. The default behavior is to ask the FD, but subclasses may override this method and implement a different behavior.

Parameters:
pField - The whose read only status is being tested
pContext - The current executing context which may be null

isFieldRequired

public boolean isFieldRequired(Field pField,
                               ExecutingContext pContext)
Tests if a field is required or not. The default behavior is to ask the FD, but subclasses may override this method and implement a different behavior

Parameters:
pField - The whose required status is being tested
pContext - The current executing context which may be null

isFieldRequiredOnSearch

public boolean isFieldRequiredOnSearch(Field pField,
                                       ExecutingContext pContext)
Tests if a field is required or not. The default behavior is to ask the FD, but subclasses may override this method and implement a different behavior

Parameters:
pField - The whose required status is being tested
pContext - The current executing context which may be null

isFieldsChanged

public boolean isFieldsChanged(List names)
Check to see if any of this Row's Fields have changed for the given list of Field names.

Parameters:
names - names of Fields to check if changed. If null, all Fields are checked.
Returns:
true if any of this Row's Fields for the given names have changed

isFieldValueNotBlank

public boolean isFieldValueNotBlank(String fieldName)
Returns whether or not this Field is not blank


isFieldValuesDatabaseDefaults

public boolean isFieldValuesDatabaseDefaults(String[] pFieldNames)
                                      throws CMException
Deprecated. We should use the default value from the field descriptor instead.

Checks each field value of fieldNames[] to see if it matches the database default for that field

Parameters:
pFieldNames - String[] fieldNames to compare to default values
Returns:
boolean true if every value for each fieldNames[] equals(getDatabaseDefaultValue())
Throws:
CMException

isGroupByRow

public boolean isGroupByRow()
Return whether or not this Row was created with a group by in the SQL clause.

Returns:
boolean

isGuarded

public boolean isGuarded()
Check whether this Row is protected (secured)

Specified by:
isGuarded in interface IGuarded
Returns:
boolean

isHasColumnNames

public boolean isHasColumnNames(List columns)
                         throws CMException
Checks to see if this RowCollection has all the columns in the given List.

CMException

isInARowCollection

public boolean isInARowCollection()
Returns whether or not this Row belongs to a RowCollection.

Returns:
boolean

isIncrementorResetAfterMaxInsertRetries

public boolean isIncrementorResetAfterMaxInsertRetries(Field field)
Check if the FieldIncrementor for the given Field should be reset after the max number of insert retries is attempted.

Returns:
if incrementor should be reset for the given Field.

isInitializeDerivedFieldsEnabled

public boolean isInitializeDerivedFieldsEnabled()
Tells whether or not to initialize Derived FDs upon row creation. The default behavior is false. Subclassing rows can change this behavior.

Returns:
boolean

isJoinedRow

public boolean isJoinedRow()
Check if Row was created from a join.

Returns:
boolean

isKeyFieldsPresent

public boolean isKeyFieldsPresent()
                           throws CMException
Returns whether or not this Row contains all the key Fields of its Table.

Returns:
boolean
CMException

isLogicalRow

public boolean isLogicalRow()
Tests if this Row is a logical Row. A logical Row cannot exist in the database. Subclasses may override this method


isMultipleDeleteEnabled

public boolean isMultipleDeleteEnabled()
Returns whether or not multiple record deletes are allowed.


isPhysicalRow

public final boolean isPhysicalRow()
Tests if this Row is a physical Row. A physical Row may exist in the database.


isPropertyChangeEventsEnabled

public boolean isPropertyChangeEventsEnabled()
Tests whether the changing of the value in one of this Row's fields will cause this Row to fire a PropertyChangeEvent or not. The default is true, but if a customized PropertyChangeSupport is used, it may help performance to turn the default PropertyChangeSupport off.


isReturningFromPossibleValuesSearch

public boolean isReturningFromPossibleValuesSearch()
Creation date: (2/9/2003 2:02:05 PM)

Returns:
boolean

isRowKeyed

public boolean isRowKeyed()
                   throws CMException
Tests if this row has a key

CMException

isSelectable

public boolean isSelectable()
Tests if the user may select a Row of this type.


isUnionRow

public boolean isUnionRow()
Check if Row was created with a union.

Returns:
boolean

isValidateRequired

public boolean isValidateRequired()
Tests if this Row must be validated before it is inserted/updated


isValidationRequiredForAutoPopulate

public boolean isValidationRequiredForAutoPopulate(Field pField,
                                                   ExecutingContext pEC)
                                            throws CMException
Tells whether or not the Field's validate method will be called before the Auto Populate action is executed. The default behavior is true. Creation date: (11/25/2003 9:50:51 AM)

Parameters:
pField - planetj.database.Field
pEC - planetj.dataengine.ExecutingContext
Returns:
boolean
CMException

isViewable

public boolean isViewable(ExecutingContext ec)
Check to see if this Row may be viewed. By default, all Rows may be viewed. Subclasses may override to implement a different behavior.

Parameters:
ec - context in which application is executing.
Returns:
true if Row may be viewable; false otherwise.

iterator

public Iterator iterator()
Creates and returns an iterator which iterates over the fields in this Row


merge

public void merge(Row row)
           throws CMException
Merges the fields of another row into this one. Fields that are merged into this row retain their original table and FD. Fields in the other row that are named the same as fields in this row are not merged. The transfer of fields may leave the other row in an unstable condition.

CMException

newField

public Field newField(FieldDescriptorRow pFD)
               throws CMException
Creates and adds a Field to this Row, then returns the Field.

CMException

newField

public Field newField(String pFieldName,
                      FieldDescriptorRow pFD)
               throws CMException
Creates and adds a Field to this Row, then returns the Field.

Parameters:
pFieldName - String
pFD - planetj.fielddescriptors.FieldDescriptorRow
Returns:
Field
CMException

newField

public Field newField(String pFieldName,
                      int pSQLType)
               throws CMException
Creates and adds a Field to this Row, then returns the Field.

Parameters:
pFieldName - String
pSQLType - int
Returns:
Field
CMException

newField

public Field newField(String pFieldName,
                      String pFieldClassName)
               throws CMException
Creates and adds a Field to this Row, then returns the Field.

Parameters:
pFieldName - String
pFieldClassName - String
Returns:
Field
CMException

populate

public void populate(ResultSet pResults)
              throws CMException
Populates this Row with the data from the result set. This method will completely wipe out any existing values in this row.

Parameters:
pResults - The result set containing data which will be used to populate this Row. The cursor must be pointing to the row in the result set which will be used to populate this Row object.
CMException

postCreate

public void postCreate()
Handles actions taken immidately after creation of this object Creation date: (7/11/2002 7:06:46 PM)


prepareForDetails

public Row prepareForDetails(ExecutingContext pEc)
                      throws CMException
Gets the a proper Row for viewing this Rows details. Includes actions like skinnying or getting additional fields not already included.

CMException

prepareFromFieldNames

public Row prepareFromFieldNames(List pNames)
                          throws CMException
Gets the a proper Row for viewing this Rows details. Includes actions like skinnying or getting additional fields not already included.

CMException

removeNavigationKey

public void removeNavigationKey()
Clears out any navigation key that may have been set on this Row.

Specified by:
removeNavigationKey in interface INavigationObject

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a property change listener that was added via the addPropertyChangeListener() method.


removePropertyChangeListener

public void removePropertyChangeListener(String property,
                                         PropertyChangeListener listener)
Removes a property change listener that was added via the addPropertyChangeListener() method.


removeRowEventListener

public void removeRowEventListener(IRowEventListener pNewListener)
Removes a Listener from this Row


removeRowEventListeners

public void removeRowEventListeners(List listeners)
Removes a Listener from this Row


replaceField

public void replaceField(Field pField)
Replace a Field with the given Field. If the Row does not contain the same Field as the given one, then the given Field is added to the Row.

Parameters:
pField - Field to be added to this Row replacing the Field with the same name.

replaceFieldValues

public List replaceFieldValues(Map nameValueMap)
                        throws CMException
Replaces the values in one or more fields. You should avoid invoking this method unless you are fairly certain all of the replacement values will be accepted by their field - if setting a replacement value causes an exception to be thrown the fields may be left in an inconsistent state, some containing their original values, some containing their replacement values.

Parameters:
nameValueMap - A mapping of field names (String objects) to values. Every field in this Row whose name is in the key set of the Map has its value replaced by the corresponding value in the Map.
Returns:
A List containing the names in the Map for which there were no fields in this Row, and whose values were therefore not added.
CMException

rollbackChanges

public Row rollbackChanges()
                    throws CMException
Undoes any changes that have been made to this Row since it was read from or written to the database. This method will not undo any changes that have been saved to the database.

Returns:
This object
CMException

setAttribute

public void setAttribute(Object key,
                         Object value)
Map that allows general attributes about a Row to be set and retreived. Sets the value object at the specified key Creation date: (2/19/2002 3:10:01 PM)


setDistributed

public void setDistributed(boolean pDistributed)
Should be set to true if serialized and distributed for web services. Creation date: (1/23/2003 2:09:22 PM)


setDistributedRequestorURL

public void setDistributedRequestorURL(URL pRequestor)
Insert the method's description here. Creation date: (1/23/2003 3:33:22 PM)


setDistributedTargetURL

public void setDistributedTargetURL(URL pTarget)
Insert the method's description here. Creation date: (1/23/2003 3:33:22 PM)


setFieldInitialValue

public void setFieldInitialValue(String fldNam,
                                 Object value)
                          throws CMException
Sets the value of the specified field.

Parameters:
fldNam - The name of the field to set. If no such field exists in this Row, a skeleton field will be created to hold the value, and added to this row.
value - The value to set the field to.
CMException

setFieldValue

public void setFieldValue(String fldNam,
                          double pDouble)
                   throws CMException
Sets the current value of the Field to the specified value, and also sets the old value to the previous value. NOTE: This method will take int types also. If called and the Field is not updatable a CMException is thrown.

CMException

setFieldValue

public void setFieldValue(String fldNam,
                          long pLong)
                   throws CMException
Sets the current value of the Field to the specified value, and also sets the old value to the previous value. NOTE: This method will take int types also. If called and the Field is not updatable a CMException is thrown.

CMException

setFieldValue

public void setFieldValue(String fldNam,
                          Object value)
                   throws CMException
Sets the value of the specified field.

Parameters:
fldNam - The name of the field to set. If no such field exists in this Row, a skeleton field will be created to hold the value, and added to this row.
value - The value to set the field to.
CMException

setFieldValueAsString

public void setFieldValueAsString(String fldNam,
                                  String value)
                           throws CMException
Sets the value of the specified field.

Parameters:
fldNam - The name of the field to set. If no such field exists in this Row, a skeleton field will be created to hold the value, and added to this row.
value - The value to set the field to.
CMException

setFieldValueAsString

public void setFieldValueAsString(String fldNam,
                                  String value,
                                  int startPos)
                           throws CMException
Sets the value of the specified field from the starting position (zero indexed) without affecting other positions in this field.

Parameters:
fldNam - The name of the field to set. If no such field exists in this Row, a skeleton field will be created to hold the value, and added to this row.
value - The value to set the field to.
CMException

setFieldValuesAsDate

public void setFieldValuesAsDate(String[] fieldNames,
                                 Date date)
                          throws CMException
This method is for cases when the date is stored in 3 fields (year{2002}, month{5}, day{10}) in the database. You simply have to pass in the 3 field names and the date and this method will handle the rest. Creation date: (5/10/2002 11:11:27 AM)

CMException

setFieldValuesToDefault

public void setFieldValuesToDefault(List fieldNames,
                                    boolean ignoreCase,
                                    ExecutingContext ec)
                             throws CMException
Sets values from the source Row into this Row (the target) for all Fields that BOTH the source and the target have.

CMException

setFieldValueToDefault

public void setFieldValueToDefault(String pName,
                                   ExecutingContext ec)
                            throws CMException
Sets the fields value back to the default value Creation date: Jun 24, 2004 - 3:14:48 PM

CMException

setFieldValuesWithCommonFieldNames

public void setFieldValuesWithCommonFieldNames(Row source)
                                        throws CMException
Sets values from the source Row into this Row (the target) for all Fields that BOTH the source and the target have.

CMException

setFieldValuesWithCommonFieldNames

public void setFieldValuesWithCommonFieldNames(Row source,
                                               boolean ignoreCase)
                                        throws CMException
Sets values from the source Row into this Row (the target) for all Fields that BOTH the source and the target have.

CMException

setFieldValuesWithCommonUsageIds

public void setFieldValuesWithCommonUsageIds(Row rowToCopy)
                                      throws CMException
Copy the field values from the supplied Row with the same usageid into this Row.

CMException

setMultipleDeleteEnabled

public void setMultipleDeleteEnabled(boolean pMultipleDeleteEnabled)
Sets whether or not multiple record deletes are allowed.


setNavigationKey

public void setNavigationKey(String key)
Set the key used to store/retrieve this Row to/from navigation.

Specified by:
setNavigationKey in interface INavigationObject

setPropertyChangeEventsEnabled

public void setPropertyChangeEventsEnabled(boolean newPropertyChangeEventsEnabled)
Sets whether the changing of the value in one of this Row's fields will cause this Row to fire a PropertyChangeEvent or not. The default is true, but if a customized PropertyChangeSupport is used, it may help performance to turn the default PropertyChangeSupport off.


setPropertyGroups

public void setPropertyGroups(PropertyGroupList propertyGroups)
Set the property groups stored in this RowCollection's attributes.


setReturningFromPossibleValuesSearch

public void setReturningFromPossibleValuesSearch(boolean value)
Insert the method's description here. Creation date: (2/9/2003 2:02:31 PM)

Parameters:
value - boolean

setSavepoint

public void setSavepoint()
Sets savepoints for the Fields in the this Row. After invoking this method fields "old values" will be replaced with their new values. A rollback will reset the values to when their savepoint was set.


setSavepoint

public void setSavepoint(Collection pFields)
Sets savepoints for the Fields in the given Collection. After invoking this method fields "old values" will be replaced with their new values. A rollback will reset the values to when their savepoint was set.


setSavepoint

public void setSavepoint(Map pFields)
Sets savepoints for the Fields in the given Map. After invoking this method fields "old values" will be replaced with their new values. A rollback will reset the values to when their savepoint was set.


setStaticAttribute

public void setStaticAttribute(Object key,
                               Object value)

setTables

public void setTables(List pTables)
Deprecated. Pass in a table collection instead

Sets the table to which this row belongs.


setTables

public void setTables(TableCollection pTables)
Sets the table to which this row belongs.


setUseWOWLibrary

public void setUseWOWLibrary(short newWOWSystemLibrary)
Sets which WOW library should be used to execute this Row's context.


setValidateRequired

public void setValidateRequired(boolean newValidateRequired)
Sets if this Row must be validated before it is inserted/updated


setValues

public void setValues(List pData)
               throws CMException
Sets the values of this Row

Parameters:
pData - A List of values. The first field in this Row will be set to the first value in the List, the second field to the second value, etc.
CMException

size

public int size()
Returns the number of fields in this Row.

Specified by:
size in interface INamedCollection

splitAndSetFieldValues

public void splitAndSetFieldValues(String[] fieldNames,
                                   int[] splitIndices,
                                   String valueToSplit)
                            throws CMException
This method takes the specified value and splits it into mulitple values and then sets those values on the fields with the given field names. Note: the splitIndices array will always be 1 less then the number of field names. This is because the beginning and ending indices are the values start and end. The split indices mark the beginning of each field's value except excluding the first field. 0 is the first position in the value.

e.g. (scenario) 3 field names ["Month", Day", "Year"] Value to split = "04072002" Split indices = [2, 4] (result) Field "Month" = "04" "Day" = "07" "Year" = "2002" 01 23 4567 8 } Indices ------------ 04|07|2002

Parameters:
fieldNames - String[] of Field names to set values for
splitIndices - int[] of indices of where to split the given value
valueToSplit - String value to split into mulitple values
CMException

statusChanged

public Row statusChanged(Field pField,
                         ExecutingContext ec)
                  throws CMException
Invoked when a status change takes place on of this Row's fields. Subclasses may override this method, but they should call it on the superclass when they do.

Parameters:
pField - The field whose status has changed
ec - The current executing context
Returns:
The "new" row resulting from the status change. Usually this is this same row, but a row may choose to replace itself with another row and return that other row.
CMException

toCSV

public StringBuffer toCSV(boolean pIncludeColumnHeadings,
                          CSVFileDescriptor pCSVFileDescriptor)
                   throws CMException
Returns a StringBuffer in CSV format containing all data in this Row Creation date: (2/6/2002 5:14:39 PM)

CMException

toDOC

public StringBuffer toDOC(boolean pIncludeColumnHeadings,
                          CSVFileDescriptor pFileDescriptor)
                   throws CMException
Deprecated. Use the single argument method instead

Returns a StringBuffer in Microsoft Word .doc format containing all data in this RowCollection. Creation date: (2/13/2002 1:09:43 PM)

CMException

toDOC

public StringBuffer toDOC(CSVFileDescriptor pFileDescriptor)
                   throws CMException
Returns a StringBuffer in Microsoft Word .doc format containing all data in this RowCollection. Creation date: (2/13/2002 1:09:43 PM)

CMException

toFDF

public StringBuffer toFDF(FDFFileDescriptor pFileDescriptor)
                   throws CMException
Returns a StringBuffer in FDF format containing all data in this Row. Creation date: (2/11/2002 4:26:03 PM)

CMException

toPDF

public void toPDF(boolean pIncludeColumnHeadings,
                  PDFFileDescriptor pFileDescriptor)
           throws CMException
Deprecated. Use the single argument method instead

Generates a PDF file from this Row. The output will be sent to the ServletOutputStream if there is no fileName specified in pFileDescriptor, else the output will be sent to that file.

Creation date: (2/7/2002 12:39:11 PM)

CMException

toPDF

public void toPDF(PDFFileDescriptor pFileDescriptor)
           throws CMException
Generates a PDF file from this Row. The output will be sent to the ServletOutputStream if there is no fileName specified in pFileDescriptor, else the output will be sent to that file.

Creation date: (2/7/2002 12:39:11 PM)

CMException

toString

public String toString(boolean includeTable)
Returns a String representation of this Row.

Returns:
String

toUpperCase

public void toUpperCase()
                 throws CMException
This method will UPPERCASE all the fields values in this Row if it is stored in the databse as a Char or it is a StringField. Dates must be UPPERCASED incase the date format in the DB contains acutal month or day or timezone info Example: Tue May 14 12:23:53 PDT 2002 Times must be UPPERCASED incase the date format in the DB contains acutal month or day or timezone info Example: 14 May 2002 19:26:13 GMT Creation date: (5/14/2002 12:42:43 PM)

CMException

toXML

public StringBuffer toXML(XMLFileDescriptor pFileDescriptor)
                   throws CMException
Returns a StringBuffer in XML format containing all data in this Row. Creation date: (2/7/2002 12:28:56 PM)

CMException

transferDataTo

public Row transferDataTo(Class pNewRowClass)
                   throws CMException
Transfers all the data in this Row into a different Row. If this Row is part of one or more RowCollections, it is replaced in those RowCollections with the destination Row. This row will no longer contain any information after this method completes; any further operations involving this Row will fail or behave in unexpected ways. Note that property change listeners are removed from this Row, but are NOT transferred to the destination Row.

Parameters:
pNewRowClass - The new type of Row to copy the data to.
Returns:
The destination Row, containing the data from this Row. This same Row will be returned if it is already of the specified type
CMException

transferDataTo

public Row transferDataTo(Row pDestinationRow)
                   throws DataEngineException
Transfers all the data in this Row into a different Row. If this Row is part of one or more RowCollections, it is replaced in those RowCollections with the destination Row. This row will no longer contain any information after this method completes; any further operations involving this Row will fail or behave in unexpected ways. Note that property change listeners are removed from this Row, but are NOT transferred to the destination Row.

Parameters:
pDestinationRow - The Row to copy the data to.
Returns:
The destination Row, containing the data from this Row.
DataEngineException

update

public final int update()
                 throws CMException
Updates the database with the values in this Row. If concurrent alterations to the database prevent this row from being updated, a ConcurrentAlterationException is thrown.

Returns:
The number of updated rows
CMException

update

public final int update(Connection conn)
                 throws CMException,
                        DistributedException
Updates the database with the values in this Row. If concurrent alterations to the database prevent this row from being updated, a ConcurrentAlterationException is thrown.

Parameters:
conn - The connection to use for the update
Returns:
The number of updated rows
CMException
DistributedException

update

public int update(Connection connection,
                  ExecutingContext ec)
           throws CMException,
                  DistributedException
Updates the database with the values in this Row. If concurrent alterations to the database prevent this row from being updated, a ConcurrentAlterationException is thrown.

Returns:
The number of updated rows
CMException
DistributedException

update

public final int update(ExecutingContext ec)
                 throws CMException
Updates the database with the values in this Row. If concurrent alterations to the database prevent this row from being updated, a ConcurrentAlterationException is thrown.

Parameters:
ec - context in which to update this Row
Returns:
number of rows updated in database
CMException

updateObject

public void updateObject()
                  throws Exception
Deprecated. by WK on (8/10/2003 7:58:28 AM) because there were no references to this method in VAJ any where and all it does is call update()

update an object from the system.

Specified by:
updateObject in interface IBusinessObject
Exception

validate

public boolean validate(ExecutingContext context)
                 throws CMException
Validate this Row based on it's configuration and field values.

Returns:
true, if Row and Fields are valid; false otherwise.
CMException

validate

public final boolean validate(ExecutingContext pContext,
                              Principal pUser)
                       throws CMException
Deprecated. by WK on (8/9/2003 9:24:24 AM) because the executing context contains the user. Replaced with validate(ExecutingContext). This method will no longer be supported as of WOW 7.0.

Validate this Row based on its configuration and field values. If the field values are valid, return true, if not return an exception that encapsulates the error.

CMException

validate

public boolean validate(int pOperation,
                        Principal pUser)
                 throws CMException
Deprecated. Use the validate() method which takes in an ExecutingContext

Validate this Row based on its configuration and field values. If the field values are valid, return true, if not return an exception that encapsulates the error.

Returns:
boolean true if valid else and exception will be thrown
CMException

validateRowOperation

public void validateRowOperation(int pOperation,
                                 Principal pUser)
                          throws DataEngineException
Validate if the operation can be performed on this Row.

DataEngineException