org.apache.derbyTesting.functionTests.tests.jdbcapi
Class BLOBDataModelSetup

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.extensions.TestDecorator
          extended by junit.extensions.TestSetup
              extended by org.apache.derbyTesting.junit.BaseTestSetup
                  extended by org.apache.derbyTesting.junit.BaseJDBCTestSetup
                      extended by org.apache.derbyTesting.functionTests.tests.jdbcapi.BLOBDataModelSetup
All Implemented Interfaces:
junit.framework.Test

public final class BLOBDataModelSetup
extends BaseJDBCTestSetup

Sets up a data model with very large BLOBs. The table created will have three fields: 1. a value field (val), which is the value for every byte in the BLOB. 2. a length (length) field which is the actual size of the BLOB 3. the data field (data), which is the actual BLOB data.


Field Summary
(package private) static int bigSize
          Size of big record (currently 64 MB)
(package private) static int bigVal
          Val for big record
(package private) static int regularBlobs
          Number of regular Blobs
(package private) static int size
          Size of regular Blobs (currently 1MB)
private static java.lang.String tableName
          Name of table
 
Fields inherited from class junit.extensions.TestDecorator
fTest
 
Constructor Summary
BLOBDataModelSetup(junit.framework.Test test)
          Constructor
 
Method Summary
static java.lang.String getBlobTableName()
          Return table name
protected  void setUp()
          The setup creates a Connection to the database, and creates a table with blob columns.
protected  void tearDown()
          Teardown test.
 
Methods inherited from class org.apache.derbyTesting.junit.BaseJDBCTestSetup
getConnection, getTestConfiguration, println
 
Methods inherited from class org.apache.derbyTesting.junit.BaseTestSetup
run
 
Methods inherited from class junit.extensions.TestDecorator
basicRun, countTestCases, getTest, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

size

static final int size
Size of regular Blobs (currently 1MB)

See Also:
Constant Field Values

regularBlobs

static final int regularBlobs
Number of regular Blobs

See Also:
Constant Field Values

bigSize

static final int bigSize
Size of big record (currently 64 MB)

See Also:
Constant Field Values

bigVal

static final int bigVal
Val for big record

See Also:
Constant Field Values

tableName

private static final java.lang.String tableName
Name of table

See Also:
Constant Field Values
Constructor Detail

BLOBDataModelSetup

public BLOBDataModelSetup(junit.framework.Test test)
Constructor

Parameters:
test - test object being decorated by this TestSetup
Method Detail

setUp

protected final void setUp()
                    throws java.lang.Exception
The setup creates a Connection to the database, and creates a table with blob columns.

Overrides:
setUp in class junit.extensions.TestSetup
Throws:
java.lang.Exception - any exception will cause test to fail with error.

tearDown

protected final void tearDown()
                       throws java.lang.Exception
Teardown test. Rollback connection and close it.

Overrides:
tearDown in class BaseJDBCTestSetup
Throws:
Exceptions - causes the test to fail with error
java.lang.Exception

getBlobTableName

public static final java.lang.String getBlobTableName()
Return table name

Returns:
table name

Built on Wed 2009-11-25 18:43:31-0800, from revision 884373

Apache Derby V10.6 Internals - Copyright © 2004,2008 The Apache Software Foundation. All Rights Reserved.