public abstract class PerfTest
extends java.lang.Object
implements java.lang.Runnable
Constructor and Description |
---|
PerfTest() |
Modifier and Type | Method and Description |
---|---|
abstract int |
articleCount()
Returns the count of all found
PerfArticle
in database. |
abstract void |
deleteArticles(PerfArticle[] arr)
Delete all given article from the database.
|
abstract void |
deleteArticlesStress(PerfArticle[] arr)
Delete all given article from the database in a really resource
sressing way.
|
abstract PerfArticle |
getArticleByIdentity(java.lang.Long articleId)
Read all stored articles from the database and return the
result as collection of
PerfArticles . |
PerfArticle |
getPreparedPerfArticle(java.lang.String articleName)
Factory method that creates an
PerfArticle
using the PerfArticleImpl class,
override this method if you need your own implementation
of the PerfArticle-Interface. |
java.lang.String |
getTestObjectName()
The returned name was used as 'articleName' for all
created
PerfArticles for this thread. |
abstract void |
init()
Init the test.
|
abstract void |
insertNewArticles(PerfArticle[] arr)
Store the given articles to database.
|
abstract void |
insertNewArticlesStress(PerfArticle[] arr)
Store the given articles to database.
|
PerfArticle |
newPerfArticle()
Called to get a new instance class of the
PerfArticle
interface, override this method if you need your own implementation
(with default constructor) of the PerfArticle-Interface. |
abstract java.util.Collection |
readArticlesByCursor(java.lang.String articleName)
Read all stored articles from the database and return the
result as collection of
PerfArticles . |
void |
run()
Runnable implementation method.
|
abstract void |
tearDown()
Do clean up.
|
abstract java.lang.String |
testName()
Returns the name of the test
|
abstract void |
updateArticles(PerfArticle[] arr)
Update the given articles.
|
abstract void |
updateArticlesStress(PerfArticle[] arr)
Update the given articles.
|
public abstract java.lang.String testName()
public abstract int articleCount()
PerfArticle
in database.
This method is not involved in the performance test
methods, thus it's not mandatory to use the api-methods
for implementation.public abstract void init() throws java.lang.Exception
java.lang.Exception
public abstract void tearDown() throws java.lang.Exception
java.lang.Exception
public abstract void insertNewArticles(PerfArticle[] arr) throws java.lang.Exception
java.lang.Exception
public abstract void insertNewArticlesStress(PerfArticle[] arr) throws java.lang.Exception
java.lang.Exception
public abstract java.util.Collection readArticlesByCursor(java.lang.String articleName) throws java.lang.Exception
PerfArticles
.
Do optimize performance.articleName
- article name used for all PerfArticle
created
by this instance/thread. Use this name in your query to match all belonging articlesjava.lang.Exception
public abstract PerfArticle getArticleByIdentity(java.lang.Long articleId) throws java.lang.Exception
PerfArticles
.
Do optimize performance.articleId
- the primary key of a PerfArticle
instancePerfArticle
instance or null if not found.java.lang.Exception
public abstract void deleteArticles(PerfArticle[] arr) throws java.lang.Exception
java.lang.Exception
public abstract void deleteArticlesStress(PerfArticle[] arr) throws java.lang.Exception
java.lang.Exception
public abstract void updateArticles(PerfArticle[] arr) throws java.lang.Exception
java.lang.Exception
public abstract void updateArticlesStress(PerfArticle[] arr) throws java.lang.Exception
java.lang.Exception
public PerfArticle newPerfArticle()
PerfArticle
interface, override this method if you need your own implementation
(with default constructor) of the PerfArticle-Interface.
PerfArticleImpl
class.public java.lang.String getTestObjectName()
PerfArticles
for this thread.
This allows an easy build of the query statement
to match the created PerfArticle
for this
instance/thread.public PerfArticle getPreparedPerfArticle(java.lang.String articleName)
PerfArticle
using the PerfArticleImpl
class,
override this method if you need your own implementation
of the PerfArticle-Interface.articleName
- set the 'articleName'public void run()
run
in interface java.lang.Runnable
(C) 2002 - 2005 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30