Expresso 5-6

com.jcorporate.expresso.ext.dbobj
Class PerfTests

java.lang.Object
  extended bycom.jcorporate.expresso.core.dataobjects.BaseDataObject
      extended bycom.jcorporate.expresso.core.dataobjects.jdbc.JDBCDataObject
          extended bycom.jcorporate.expresso.core.dbobj.DBObject
              extended bycom.jcorporate.expresso.core.dbobj.SecuredDBObject
                  extended bycom.jcorporate.expresso.ext.dbobj.PerfTests
All Implemented Interfaces:
Cacheable, ContextNested, DataObject, LookupInterface, Securable, Serializable

public class PerfTests
extends SecuredDBObject

PerfTests List of URL's to execute and time, along with statistics on their execution time.

Author:
Michael Nash
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class com.jcorporate.expresso.core.dbobj.DBObject
DBObject.FieldError, DBObject.FieldUpdate
 
Field Summary
 
Fields inherited from class com.jcorporate.expresso.core.dbobj.SecuredDBObject
ADD, ALL_FUNCTIONS, CACHE_NAME, CACHE_TTY, DELETE, SEARCH, SYSTEM_ACCOUNT, SYSTEM_ACCOUNT_NAME, UPDATE
 
Fields inherited from class com.jcorporate.expresso.core.dbobj.DBObject
ATTRIBUTE_ERROR, ATTRIBUTE_ERROR_MESSAGE, ATTRIBUTE_PAGE_LIMIT, BIG_DECIMAL_ZERO, EMAIL_MASK, EVENT_ADD, EVENT_DELETE, EVENT_UPDATE, FLOAT_MASK, INT_MASK, IS_CHECK_RELATIONAL_INTEGRITY, UPDATE_CHANGED_ONLY, WHERE_KEYWORD
 
Fields inherited from class com.jcorporate.expresso.core.dataobjects.jdbc.JDBCDataObject
anyFieldsDistinct, anyFieldsToRetrieve, appendCustomWhere, caseSensitiveQuery, customWhereClause, dbKey, distinctFields, localConnection, LONGBINARY_READ_DEFAULT_SIZE, maxRecords, myClassName, myUpdates, offsetRecord, recordSet, retrieveFields, sMetadataMap, sortKeys
 
Fields inherited from class com.jcorporate.expresso.core.dataobjects.BaseDataObject
currentStatus, globalMask
 
Fields inherited from interface com.jcorporate.expresso.core.dataobjects.DataObject
STATUS_CURRENT, STATUS_DELETED, STATUS_NEW, STATUS_UPDATED
 
Constructor Summary
PerfTests()
          Constructor
PerfTests(ControllerRequest request)
          For using DBObjects within Controllers.
PerfTests(int uid)
          Use over (String) constructor.
 
Method Summary
 String getField(String fieldName)
          Get the string value of a field in this object as a string
 Vector getValidValues(String fieldName)
          New method to replace getValues with a structure of valid values and descriptions.
 PerfTestResult run(String currentSessionId)
          Run the current test
static PerfTestResult runAll(String dbName, String currentSessionId)
          Run all defined tests
static PerfTestResult runSet(String dbName, String setNumber, String currentSessionId)
          Run all defined tests
 void setupFields()
          Define the table and fields for this object
 
Methods inherited from class com.jcorporate.expresso.core.dbobj.SecuredDBObject
add, canRequesterAdd, canRequesterDelete, canRequesterRead, canRequesterUpdate, checkAllowed, copyAttributes, count, createSecurityCache, delete, deleteAll, find, getRequestingUid, getString, getString, getString, getString, getString, getString, getSystemUid, instantiate, isAllowed, retrieve, search, searchAndRetrieveList, searchAndRetrieveList, setRequestingUid, update
 
Methods inherited from class com.jcorporate.expresso.core.dbobj.DBObject
addDetail, addField, addField, addFieldError, addFoundKeys, addIfNeeded, addIndex, addKey, addOrUpdate, addSortKey, addTransition, addVirtualField, addVirtualField, addVirtualField, addVirtualField, average, basicAdd, cacheIsChangedComparison, checkAllReferredToBy, checkAllRefs, checkAllRefsPublic, checkDeleteDetailPerm, checkField, checkRef, checkRef, clear, clearDistinctFields, clearError, clearFieldsToRetrieve, clearSortKeys, containsWildCards, delete, deleteAll, deleteDetails, denotesRange, equals, forKey, formatDateTime, get, getAllAttributes, getAttribute, getAttributesIterator, getBooleanFieldValue, getCacheSize, getCacheStatsMap, getCacheUtil, getCheckZeroUpdate, getCustomWhereClause, getDataContext, getDataField, getDataTransferObject, getDBName, getDetails, getDistinctFieldCount, getDistinctFields, getFieldBigDecimal, getFieldBoolean, getFieldByte, getFieldByteArray, getFieldData, getFieldDate, getFieldDecimalFormatted, getFieldDouble, getFieldErrorMessage, getFieldFloat, getFieldInt, getFieldLong, getFieldMetaData, getFieldShort, getFieldsToRetrieveCount, getFilterClass, getFoundCount, getFoundKeysArray, getIndexArray, getISOValuesDefault, getISOValuesDefault, getISOValuesDefault, getKey, getKeyFieldListIterator, getLength, getLengthInt, getLocalConnection, getLocale, getLogger, getLookupObject, getMax, getMax, getMaxRecords, getMyKeys, getMyUpdatesArray, getOffsetRecord, getPatternMatcher, getPrecision, getSerializedForm, getStringFilter, getThisDBbj, getThisDBObj, getValidValueDescrip, getValidValuesList, getValues, getValuesDefault, getValuesDefault, getValuesDefault, hasError, hasErrors, haveAllKeys, initialize, isCached, isChanged, isDistinct, isEmpty, isFieldDistinct, isFieldNull, isFieldsToRetrieve, isFieldToRetrieve, isMultiValued, isReadOnly, isSecret, isVirtual, loadFromConnection, logChange, max, min, newInstance, noNewLine, noQuotes, notifyListeners, populateDefaultValues, referredToBy, removeAttribute, removeFromCache, retrieveFromCache, saveBinaryField, search, set, setAttribute, setCacheSize, setCharset, setCheckZeroUpdate, setConnection, setConnection, setCustomWhereClause, setCustomWhereClause, setDataContext, setDataField, setDataTransferObject, setDefaultValue, setDescription, setField, setField, setField, setField, setField, setField, setField, setField, setField, setField, setFieldData, setFieldData, setFieldDistinct, setFieldsToRetrieve, setFilterClass, setFilterClass, setKeys, setLocale, setLookupField, setLookupObject, setMask, setMaxRecords, setMultiValued, setName, setOffsetRecord, setReadOnly, setSchema, setSecret, setSortKey, setStringFilter, setStringFiltersOnAll, setTargetDbSchema, setTargetTable, sqlAggrFunction, sum, toDebugString, update, updateAll, updateAll, verify
 
Methods inherited from class com.jcorporate.expresso.core.dataobjects.jdbc.JDBCDataObject
addInParam, addOutParam, buildWhereClause, buildWhereClauseBuffer, checkZeroUpdate, constructNewMetaData, createAndExecuteSearch, createAndRunStoreProcedure, getConnectionPool, getCustomStringFieldValue, getDef, getDistinctFieldArrayList, getExecutor, getFieldsToRetrieveIterator, getJDBCMetaData, getJDBCUtil, getMappedDataContext, getMetaData, getQueryInterface, getSerialForm, loadFromConnection, makeLimitationStub, quoteIfNeeded, runStoredProcedure, runStoredProcedureAndRetrieveList, selectFieldString, setCaseSensitiveQuery, setDBConnectionPool, setDBName, setMappedDataContext, setOriginalDBName, setTargetStoreProcedure
 
Methods inherited from class com.jcorporate.expresso.core.dataobjects.BaseDataObject
getGlobalMask, getStatus, isGlobalMasked, setFieldsWithDefaults, setGlobalMask, setStatus
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerfTests

public PerfTests()
          throws DBException
Constructor


PerfTests

public PerfTests(int uid)
          throws DBException
Use over (String) constructor. Initializes the object in the context of the user who's uid belongs to the parameter.

Parameters:
uid - the Uid of the user context
Throws:
DBException - if there's an initialization problem

PerfTests

public PerfTests(ControllerRequest request)
          throws DBException
For using DBObjects within Controllers. Initializes based upon the current user and the requested db. [Of course this can be modified later]

Parameters:
request - - The controller request handed to you by the framework.
Throws:
DBException - if there's an initialization problem
Method Detail

getField

public String getField(String fieldName)
                throws DBException
Description copied from class: DBObject
Get the string value of a field in this object as a string

Specified by:
getField in interface DataObject
Overrides:
getField in class DBObject
Parameters:
fieldName - the name of the field
Returns:
java.lang.String
Throws:
DBException - upon error

getValidValues

public Vector getValidValues(String fieldName)
                      throws DBException
Description copied from class: DBObject
New method to replace getValues with a structure of valid values and descriptions. Database objects should extend this method to return Vectors of ValidValue objects for multi-valued fields. A specific object can return it's own list of ValidValues, or it can call this super method to use the lookup object to get the list of valid values instead.

Overrides:
getValidValues in class DBObject
Parameters:
fieldName - The name of the fields for which a value set is requested
Returns:
A Vector of ValidValue objects
Throws:
DBException - upon error.

setupFields

public void setupFields()
                 throws DBException
Define the table and fields for this object

Overrides:
setupFields in class DBObject
Throws:
DBException - If there is an error setting up the fields as requested. For example, if a field allowing null is requested as part of the key

run

public PerfTestResult run(String currentSessionId)
                   throws DBException
Run the current test

Parameters:
currentSessionId - ?
Returns:
PerfTestResult
Throws:
DBException

runAll

public static PerfTestResult runAll(String dbName,
                                    String currentSessionId)
                             throws DBException
Run all defined tests

Parameters:
dbName - database context
currentSessionId - where to store the results
Returns:
PerfTestResult
Throws:
DBException - upon error

runSet

public static PerfTestResult runSet(String dbName,
                                    String setNumber,
                                    String currentSessionId)
                             throws DBException
Run all defined tests

Parameters:
dbName - database context
setNumber - the 'id' of the test set
currentSessionId - ?
Returns:
PerfTestResult
Throws:
DBException

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.