public class BlobClobTestSetup extends BaseJDBCTestSetup
| Modifier and Type | Field and Description |
|---|---|
private static byte[] |
blobData
Blob data.
|
private static java.lang.String |
clobData
Clob data.
|
static int |
ID
ID is used to store the latest unique value for the ID column
Start from 3 since 1 is used for null values and 2 is used for
sample values.
|
static int |
ID_NULLVALUES
Constant for accessing the row with null values.
|
static int |
ID_SAMPLEVALUES
Constant for accessing the row with sample values.
|
| Constructor and Description |
|---|
BlobClobTestSetup(junit.framework.Test test)
Create a test setup for the specified blob or clob test.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
getID()
Returns new unique ID values that can be used in these tests.
|
static java.sql.Blob |
getSampleBlob(java.sql.Connection con)
Fetch a sample Blob.
|
static java.sql.Clob |
getSampleClob(java.sql.Connection con)
Fetch a sample Clob.
|
protected void |
setUp()
Create a table with BLOB and CLOB, so that such objects can be
accessed/used from JDBC.
|
protected void |
tearDown()
Drop the table we created during setup.
|
getConnection, getTestConfiguration, printlnrunbasicRun, countTestCases, getTest, toStringassertEquals, 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, failNotEquals, failNotSame, failSame, formatpublic static final int ID_NULLVALUES
public static final int ID_SAMPLEVALUES
public static int ID
private static final byte[] blobData
private static final java.lang.String clobData
public BlobClobTestSetup(junit.framework.Test test)
test - the test to provide setup for.protected void setUp()
throws java.io.IOException,
java.sql.SQLException
setUp in class junit.extensions.TestSetupjava.io.IOExceptionjava.sql.SQLExceptionprotected void tearDown()
throws java.lang.Exception
tearDown in class BaseJDBCTestSetupjava.lang.Exceptionpublic static java.sql.Blob getSampleBlob(java.sql.Connection con)
throws java.sql.SQLException
con - database connection to fetch data from.Blob object.java.sql.SQLExceptionpublic static java.sql.Clob getSampleClob(java.sql.Connection con)
throws java.sql.SQLException
con - database connection to fetch data from.Clob object.java.sql.SQLExceptionpublic static int getID()
Apache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.