planetj.database.connection
Class ConnectionRow

java.lang.Object
  |
  +--planetj.database.Row
        |
        +--planetj.database.connection.ConnectionRow
All Implemented Interfaces:
Cloneable, IBatchProcessObject, IBusinessObject, IConnections, ICSVRow, IDistributedExecutableObject, IFDFObject, IGuarded, ILogin, INamedCollection, INavigationObject, IOwner, IRowCreator, IXMLObject, Serializable
Direct Known Subclasses:
AS400ConnectionRow

public class ConnectionRow
extends Row
implements IConnections, IOwner, ILogin

Class generated by planetj.dataengine.RowClassGenerator Created at: Wed Apr 10 19:24:10 PDT 2002

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class planetj.database.Row
Row.SpacingRow
 
Field Summary
 
Fields inherited from class planetj.database.Row
className, COPY, DELETE, INSERT, MODE_COPY, MODE_DELETE, MODE_INSERT, MODE_READ, MODE_SEARCH, MODE_UNKNOWN, MODE_UPDATE, READ, UPDATE
 
Fields inherited from interface planetj.database.connection.IConnections
ALIAS, CLEAN_UP_TIMEOUT, CONNECTION_TABLE_NAME, DRIVER, ENCODED_USER_PASSWORD, MAX_CONNECTIONS, MAX_SYSTEM_ALIAS_NAME_LENGTH, MIN_CONNECTIONS, ORPHAN_TIMEOUT, OWNER_ID, PASSWORD, PROPERTIES, STATUS, URL, USER_ID
 
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
ConnectionRow()
           
 
Method Summary
 void closeConnectionPool()
          Close the connection pool for this ConnectionRow exists.
 ConnectionRow createConnectionPool()
          Create a connection pool based on the specific values of this Row.
 Row createRow(Row pDefaultRow)
          Creates a new Row.
 boolean doesConnectionPoolExist()
          Return a boolean indicating if the connection pool for this ConnectionRow exists.
 String getAlias()
          Getter method for the Alias property
 int getCleanUpTimeout()
          Getter method for the CleanUpTimeout property
static ConnectionRow getConnectionRow(String pMetaDataAlias, String pConnectionRowSystemAlias)
           
static ConnectionRow getConnectionRow(String pMetaDataAlias, String pConnectionRowSystemAlias, String pLibraryName)
           
static Table getConnectionTable(String pSystemAlias)
           
 String getDeleteConfirmationMessage()
          Get the delete confirmation message.
 String getDriver()
          Getter method for the Driver property
 String getHeaderText(ExecutingContext ec)
          Returns information for the user that will be displayed in the header of the Row
 int getMaxConnections()
          Getter method for the MaxConnections property
 int getMinConnections()
          Getter method for the MinConnections property
 int getOrphanTimeout()
          Getter method for the OrphanTimeout property
 int getOwnerId()
          Getter method for the OwnerId property
 Field getOwnerIdField()
          Returns the Owner Id Field
 String getPassword()
          Getter method for the Password property
 String getProperties()
          Getter method for the Properties property
 String getSystem()
          Returns the system.
 String getUrl()
          Getter method for the Url property
static String getURLFormatForDriver(String driverClass)
          Gets an expected URL format for a driver class
 String getUserId()
          Getter method for the UserId property
 String getUserMessageForOperation(int pMode)
          Returns a message for the user based on the Mode of the Row
 int insert(SQLContext context)
          Inserts this Row into the specified database.
 boolean isInitializeDerivedFieldsEnabled()
          Tells whether or not to initialize Derived FDs upon row creation.
 boolean isValidConnection()
          This method will verify this ConnectionRow contains valid connection properties and using these properties actually establishes a connection to a database.
 ConnectionRow setAlias(String newValue)
          Setter method for the Alias property
 ConnectionRow setCleanUpTimeout(int newValue)
          Setter method for the CleanUpTimeout property
 ConnectionRow setDriver(String newValue)
          Setter method for the Driver property
 ConnectionRow setMaxConnections(int newValue)
          Setter method for the MaxConnections property
 ConnectionRow setMinConnections(int newValue)
          Setter method for the MinConnections property
 ConnectionRow setOrphanTimeout(int newValue)
          Setter method for the OrphanTimeout property
 ConnectionRow setOwnerId(int newValue)
          Setter method for the OwnerId property
 void setPassword(String newValue)
          Setter method for the Password property
 ConnectionRow setProperties(String newValue)
          Setter method for the Properties property
 ConnectionRow setUrl(String newValue)
          Setter method for the Url property
 void setUserId(String newValue)
          Setter method for the UserId property
 Row statusChanged(Field pField, ExecutingContext ec)
          Invoked when a status change takes place on of this Row's fields.
 int update(Connection conn, ExecutingContext ec)
          Updates the database with the values in this Row.
 boolean validate(ExecutingContext context)
          Validate this Row based on its configuration and field values.
 ValidationExceptionCollection verifyConnection()
          This method will verify this ConnectionRow contains valid connection properties and using these properties actually establishes a connection to a database.
 
Methods inherited from class planetj.database.Row
add, add, addObject, addPropertyChangeListener, addPropertyChangeListener, addRowEventListener, addRowEventListeners, addTable, appendDisplayType, batchProcess, clearFields, clearTables, clearValidationException, clone, cloneRow, commitFieldValues, commitFieldValues, commitFieldValues, concatenateFieldFullLengthValues, concatenateFieldValues, containsField, copy, copyIntoRowFieldsWithCommonFieldNames, copyIntoRowFieldsWithCommonFieldNames, copyIntoRowFieldsWithCommonUsageIds, copyIntoRowFieldsWithGivenFieldNames, copyIntoRowFieldsWithGivenFieldNames, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, defaultMerge, delete, delete, delete, delete, deleteObject, divide, duplicateKey, equals, equals, equalsInstance, executeDistributedAction, fieldHasPossibleValuesSQLOperation, getAssociation, getAssociation, getAssociationByOperationUsageId, getAssociationOperation, getAttribute, getChildren, getColumnSpan, getCompleteRow, getCompleteRow, getConfigProperty, getCopiedFieldValues, getCSVRow, getCSVRow, getDatabaseRow, getDatabaseRow, getDeleteConfirmation, getDisplayValue, getDistributedRequestorURL, getExternalName, getExternalNames, getFDFData, getFDTable, getField, getField, getField, getFieldDefaultValue, getFieldDescriptor, getFieldDescriptor, getFieldDescriptor, getFieldDescriptorsWithUsage, getFieldDescriptorsWithUsageId, getFieldDescriptorWithUsageId, getFieldDisplayValue, getFieldNames, getFields, getFields, getFieldSets, getFieldSQLObject, getFieldsToDisplay, getFieldsToDisplayStrict, getFieldsToDisplayStrict, getFieldStyleClass, getFieldValue, getFieldWithUsageId, getLibraryName, getMaxFieldLengths, getMaxFieldLengths, getMaxInsertRetries, getMetaDataSystemAlias, getNamed, getNamesOfUpdatedFields, getNavigationKey, getNavigationListKey, getPercentage, getPhysicalFieldNames, getPropertyGroup, getPropertyGroups, getPropertyGroups, getRowCollection, getRowDisplayAttributes, getRowDisplayAttributes, getRowKey, getSecuredTypeId, getSecuredTypeName, getSecurityType, getSQL, getSQLContext, getStaticAttribute, getSum, getSystemAlias, getTable, getTable, getTableName, getTables, getTimestamp, getUpdatedFields, getUseWOWLibrary, getValidationExceptions, getValueAsBoolean, getValueAsByte, getValueAsDate, getValueAsDate, getValueAsDouble, getValueAsDouble, getValueAsFloat, getValueAsFullLengthString, getValueAsInt, getValueAsLong, getValueAsNumber, getValueAsNumber, getValueAsShort, getValueAsString, getValueAsString, getValueByUsageId, getValues, getXMLData, getXMLData, getXMLHeaderData, handleDistributed, hasChildRows, hasMultipleStyleClasses, hasPropertyChangeListeners, insert, insert, insert, is, isARow, isARowCollection, isChanged, isChangedRealTime, isChangedSinceLastCheck, isCloneNeeded, isContainsAllFields, isCopyable, isDeletable, isDistinctRow, isDistributed, isEditable, isEmpty, isFieldApplicable, isFieldAuthorizedForEdit, isFieldAuthorizedForRead, isFieldDisplayable, isFieldReadOnly, isFieldRequired, isFieldRequiredOnSearch, isFieldsChanged, isFieldValueNotBlank, isFieldValuesDatabaseDefaults, isGenerateChildRows, isGroupByRow, isGuarded, isHasColumnNames, isInARowCollection, isIncrementorResetAfterMaxInsertRetries, isJoinedRow, isKeyFieldsPresent, isLogicalRow, isMultipleDeleteEnabled, isPhysicalRow, isPropertyChangeEventsEnabled, isReturningFromPossibleValuesSearch, isRowKeyed, isSelectable, isUnionRow, isValidateRequired, isValidationRequiredForAutoPopulate, isViewable, iterator, merge, newField, newField, newField, newField, populate, postCreate, prepareForDetails, prepareFromFieldNames, removeNavigationKey, removePropertyChangeListener, removePropertyChangeListener, removeRowEventListener, removeRowEventListeners, replaceField, replaceFieldValues, rollbackChanges, setAttribute, setDistributed, setDistributedRequestorURL, setDistributedTargetURL, setFieldInitialValue, setFieldValue, setFieldValue, setFieldValue, setFieldValueAsString, setFieldValueAsString, setFieldValuesAsDate, setFieldValuesToDefault, setFieldValuesWithCommonFieldNames, setFieldValuesWithCommonFieldNames, setFieldValuesWithCommonUsageIds, setFieldValueToDefault, setMultipleDeleteEnabled, setNavigationKey, setPropertyChangeEventsEnabled, setPropertyGroups, setReturningFromPossibleValuesSearch, setSavepoint, setSavepoint, setSavepoint, setStaticAttribute, setTables, setTables, setUseWOWLibrary, setValidateRequired, setValues, size, splitAndSetFieldValues, toCSV, toDOC, toDOC, toFDF, toPDF, toPDF, toString, toUpperCase, toXML, transferDataTo, transferDataTo, update, update, update, updateObject, validate, validate, validateRowOperation
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionRow

public ConnectionRow()
Method Detail

getHeaderText

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

Overrides:
getHeaderText in class Row
Returns:
String

createConnectionPool

public ConnectionRow createConnectionPool()
                                   throws CMException
Create a connection pool based on the specific values of this Row. Logic was moved to the ConnectionRow to allow subclasses to provide other forms of ConnectionPools such as AS400ConnectionPool.

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
Overrides:
createRow in class Row
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

doesConnectionPoolExist

public boolean doesConnectionPoolExist()
                                throws CMException
Return a boolean indicating if the connection pool for this ConnectionRow exists. Logic was moved to the ConnectionRow to allow subclasses to provide other forms of ConnectionPools such as AS400ConnectionPool.

CMException

closeConnectionPool

public void closeConnectionPool()
                         throws CMException
Close the connection pool for this ConnectionRow exists. Logic was moved to the ConnectionRow to allow subclasses to provide other forms of ConnectionPools such as AS400ConnectionPool.

CMException

getAlias

public String getAlias()
Getter method for the Alias property


getCleanUpTimeout

public int getCleanUpTimeout()
Getter method for the CleanUpTimeout property


getConnectionRow

public static ConnectionRow getConnectionRow(String pMetaDataAlias,
                                             String pConnectionRowSystemAlias)
                                      throws CMException
CMException

getConnectionRow

public static ConnectionRow getConnectionRow(String pMetaDataAlias,
                                             String pConnectionRowSystemAlias,
                                             String pLibraryName)
                                      throws CMException
CMException

getConnectionTable

public static Table getConnectionTable(String pSystemAlias)
                                throws CMException
CMException

getDriver

public String getDriver()
Getter method for the Driver property


getMaxConnections

public int getMaxConnections()
Getter method for the MaxConnections property


getDeleteConfirmationMessage

public String getDeleteConfirmationMessage()
Description copied from class: Row
Get the delete confirmation message.

Overrides:
getDeleteConfirmationMessage in class Row

getMinConnections

public int getMinConnections()
Getter method for the MinConnections property


getOrphanTimeout

public int getOrphanTimeout()
Getter method for the OrphanTimeout property


getOwnerId

public int getOwnerId()
Getter method for the OwnerId property


getOwnerIdField

public Field getOwnerIdField()
Returns the Owner Id Field

Specified by:
getOwnerIdField in interface IOwner
Returns:
planetj.database.Field
See Also:
IOwner

getPassword

public String getPassword()
Getter method for the Password property


getProperties

public String getProperties()
Getter method for the Properties property


getSystem

public String getSystem()
Returns the system. This is the string after the jdbc:as400: of the URL Example jdbc:as400:CYBRA3 would return CYBRA3 Creation date: (6/18/2002 6:04:25 PM)


getUrl

public String getUrl()
Getter method for the Url property


getURLFormatForDriver

public static String getURLFormatForDriver(String driverClass)
Gets an expected URL format for a driver class


getUserId

public String getUserId()
Getter method for the UserId property

Specified by:
getUserId in interface ILogin

getUserMessageForOperation

public String getUserMessageForOperation(int pMode)
Returns a message for the user based on the Mode of the Row

Overrides:
getUserMessageForOperation in class Row
Returns:
String message for the user
See Also:
(see Row constants to find the modes.

insert

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

Overrides:
insert in class Row
Returns:
The number of Rows that were inserted
CMException

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.

Overrides:
isInitializeDerivedFieldsEnabled in class Row
Returns:
boolean

isValidConnection

public boolean isValidConnection()
This method will verify this ConnectionRow contains valid connection properties and using these properties actually establishes a connection to a database. Creation date: (6/18/2002 1:38:26 PM)


setAlias

public ConnectionRow setAlias(String newValue)
                       throws CMException
Setter method for the Alias property

CMException

setCleanUpTimeout

public ConnectionRow setCleanUpTimeout(int newValue)
                                throws CMException
Setter method for the CleanUpTimeout property

CMException

setDriver

public ConnectionRow setDriver(String newValue)
                        throws CMException
Setter method for the Driver property

CMException

setMaxConnections

public ConnectionRow setMaxConnections(int newValue)
                                throws CMException
Setter method for the MaxConnections property

CMException

setMinConnections

public ConnectionRow setMinConnections(int newValue)
                                throws CMException
Setter method for the MinConnections property

CMException

setOrphanTimeout

public ConnectionRow setOrphanTimeout(int newValue)
                               throws CMException
Setter method for the OrphanTimeout property

CMException

setOwnerId

public ConnectionRow setOwnerId(int newValue)
                         throws CMException
Setter method for the OwnerId property

CMException

setPassword

public void setPassword(String newValue)
                 throws CMException
Setter method for the Password property

Specified by:
setPassword in interface ILogin
CMException

setProperties

public ConnectionRow setProperties(String newValue)
                            throws CMException
Setter method for the Properties property

CMException

setUrl

public ConnectionRow setUrl(String newValue)
                     throws CMException
Setter method for the Url property

CMException

setUserId

public void setUserId(String newValue)
               throws CMException
Setter method for the UserId property

Specified by:
setUserId in interface ILogin
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.

Overrides:
statusChanged in class Row
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

update

public int update(Connection conn,
                  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.

Overrides:
update in class Row
Parameters:
conn - The connection to use for the update
Returns:
The number of updated rows
CMException

validate

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

Overrides:
validate in class Row
Returns:
true, if Row and Fields are valid; false otherwise.
CMException

verifyConnection

public ValidationExceptionCollection verifyConnection()
This method will verify this ConnectionRow contains valid connection properties and using these properties actually establishes a connection to a database. Creation date: (6/18/2002 1:38:26 PM)