Java Doc for T_Util.java in  » Database-DBMS » db-derby-10.2 » org » apache » derbyTesting » unitTests » store » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » db derby 10.2 » org.apache.derbyTesting.unitTests.store 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.derbyTesting.unitTests.store.T_Util

T_Util
public class T_Util (Code)


Field Summary
 ContextServicecsFactory
    
 LockFactorylFactory
    
 RawStoreFactoryrsFactory
    

Constructor Summary
public  T_Util(RawStoreFactory rsf, LockFactory lf, ContextService csf)
    

Method Summary
public static  StringgetStringFromData(String data, int stringLen)
     Return a string of stringLen characters that starts with data and is padded with nulls.
public static  PropertiessetEncryptionParam(Properties startParams)
     Add in encryption parameters to the startParam if "testDataEncryption" is set to a non-null string.
public  voidsetOpenMode(int newMode)
    
public  voidt_abort(Transaction t)
    
public  voidt_abort(T_TWC ctx)
    
public  longt_addContainer(Transaction t, long segmentId)
    
public  longt_addContainer(T_TWC ctx, long segmentId)
    
public  longt_addContainer(Transaction t, long segmentId, int pageSize)
    
public  longt_addContainer(T_TWC ctx, long segmentId, int pageSize)
    
public  longt_addContainer(Transaction t, long segmentId, Properties tableProperties)
    
public  longt_addContainer(Transaction t, long segmentId, int pageSize, int spareSpace, int minimumRecordSize, boolean reusableRecordId)
    
public  longt_addContainer(T_TWC ctx, long segmentId, int pageSize, int spareSpace, int minimumRecordSize)
    
public  Paget_addPage(ContainerHandle c)
     Add a page to a container.
public static  voidt_checkEmptyPage(Page page)
     Take an empty page and check it does actually seem to be empty.
public static  voidt_checkFetch(Page page, RecordHandle rh, String data, int stringLen)
     Fetch a record that is expected to exist using a record handle.
public static  voidt_checkFetch(Page page, RecordHandle rh, String data)
    
public  voidt_checkFetch(ContainerHandle c, RecordHandle rh, String data)
     Fetch a record from a container that is expected to exist using a record handle.
public static  voidt_checkFetch(Page page, RecordHandle rh, T_RawStoreRow row)
    
public static  voidt_checkFetchBySlot(Page page, int slot, String data, boolean deleted, boolean forUpdate)
    
public static  voidt_checkFetchCol(Page page, RecordHandle rh, int colNum, int numCols, String data)
    
public static  voidt_checkFetchColFromSlot(Page page, int slot, int fieldId, DataValueDescriptor column, boolean forUpdate, String data, int stringLen)
    
public static  voidt_checkFetchColFromSlot(Page page, int slot, int fieldId, DataValueDescriptor column, boolean forUpdate, String data)
    
public  voidt_checkFetchDeleted(ContainerHandle c, RecordHandle rh, String data)
     Fetch a deleted record from a container using a record handle.
public  voidt_checkFetchFail(ContainerHandle c, RecordHandle rh)
    
public static  RecordHandlet_checkFetchFirst(Page page, String data)
    
public static  RecordHandlet_checkFetchLast(Page page, String data)
    
public static  RecordHandlet_checkFetchNext(Page page, RecordHandle rh, String data)
    
public static  RecordHandlet_checkFetchPrevious(Page page, RecordHandle rh, String data)
    
public static  voidt_checkFieldCount(Page page, int slot, int count)
    
public static  voidt_checkInvalidSavePoint(Transaction t, String name)
     Negative test - check that an invalid savepoint is detected.
public  voidt_checkInvalidSavePoint(T_TWC ctx, String name)
    
public  voidt_checkNullLockCount(Transaction t)
    
public static  voidt_checkPageNumber(Page page, long pageNumber)
    
public static  voidt_checkRecordCount(Page page, int count, int nonDeleted)
    
public  voidt_checkStringLengthFetch(Page page, int slot, int expectedLength)
    
public  voidt_checkUpdateCol(Page page, RecordHandle rh, int colNum, int numCols, String data)
     Using sparse representation: Update a column of a record and check resulting value.
public  voidt_close(T_TWC ctx)
    
public  voidt_commit(Transaction t)
    
public  voidt_commit(T_TWC ctx)
    
public  voidt_delete(ContainerHandle c, RecordHandle rh)
     Delete a record.
public  voidt_dropContainer(Transaction t, long segmentId, long containerId)
    
public  voidt_genRandomFile(String fileName, String mode, int size)
    
public  Paget_getLastPage(ContainerHandle c)
     Get the last page in a container.
public  Paget_getPage(ContainerHandle c, long pageNumber)
     Get a specific page in a container.
public static  RecordHandlet_insert(Page page, T_RawStoreRow row)
     Call page.insert() and ensure that the return record handle is not null.
public  RecordHandlet_insert(ContainerHandle c, T_RawStoreRow row)
     Insert a record on the last page, if the row doesn't fit on the last page create a new page and insert there.
public static  RecordHandlet_insertAtSlot(Page page, int slot, T_RawStoreRow row)
     Call page.insert() and ensure that the return record handle is not null.
public static  RecordHandlet_insertAtSlot(Page page, int slot, T_RawStoreRow row, byte insertFlag)
     Call page.insert() and ensure that the return record handle is not null.
public static  RecordHandlet_insertAtSlot(Page page, int slot, T_RawStoreRow row, byte insertFlag, int overflowThreshold)
     Call page.insert() and ensure that the return record handle is not null.
public  ContainerHandlet_openContainer(Transaction t, long segmentId, long containerId, boolean forUpdate)
     Open a container.
public  ContainerHandlet_openContainer(T_TWC ctx, long segmentId, long containerId, boolean forUpdate)
    
public static  voidt_readOnlySlotOutOfRange(Page page, int slot)
    
public  voidt_removePage(ContainerHandle c, Page p)
     Remove a page from a container.
public  Transactiont_startGlobalTransaction(int format_id, byte[] global_id, byte[] branch_id)
    
public  Transactiont_startInternalTransaction()
    
public  Transactiont_startTransaction()
    
public  T_TWCt_startTransactionWithContext()
    
public  voidt_update(ContainerHandle c, RecordHandle rh, T_RawStoreRow row)
     Update a record.
public static  voidt_updateSlotOutOfRange(Page page, int slot)
    
public static  voidt_wait(int milliSecond)
    

Field Detail
csFactory
ContextService csFactory(Code)



lFactory
LockFactory lFactory(Code)



rsFactory
RawStoreFactory rsFactory(Code)




Constructor Detail
T_Util
public T_Util(RawStoreFactory rsf, LockFactory lf, ContextService csf)(Code)




Method Detail
getStringFromData
public static String getStringFromData(String data, int stringLen)(Code)
Return a string of stringLen characters that starts with data and is padded with nulls.



setEncryptionParam
public static Properties setEncryptionParam(Properties startParams)(Code)
Add in encryption parameters to the startParam if "testDataEncryption" is set to a non-null string.



setOpenMode
public void setOpenMode(int newMode)(Code)



t_abort
public void t_abort(Transaction t) throws StandardException, T_Fail(Code)



t_abort
public void t_abort(T_TWC ctx) throws StandardException, T_Fail(Code)



t_addContainer
public long t_addContainer(Transaction t, long segmentId) throws StandardException, T_Fail(Code)
Add a new container in the transaction
exception:
  T_Fail - Unexpected behaviour from the API
exception:
  StandardException - Unexpected exception from the implementation



t_addContainer
public long t_addContainer(T_TWC ctx, long segmentId) throws StandardException, T_Fail(Code)



t_addContainer
public long t_addContainer(Transaction t, long segmentId, int pageSize) throws StandardException, T_Fail(Code)
Add a new container in the transaction with a specified page size
exception:
  T_Fail - Unexpected behaviour from the API
exception:
  StandardException - Unexpected exception from the implementation



t_addContainer
public long t_addContainer(T_TWC ctx, long segmentId, int pageSize) throws StandardException, T_Fail(Code)



t_addContainer
public long t_addContainer(Transaction t, long segmentId, Properties tableProperties) throws StandardException, T_Fail(Code)



t_addContainer
public long t_addContainer(Transaction t, long segmentId, int pageSize, int spareSpace, int minimumRecordSize, boolean reusableRecordId) throws StandardException, T_Fail(Code)
Add a new container in the transaction with specified pageSize, spareSpace, minimumRecordSize, and reusableRecordId
exception:
  T_Fail - Unexpected behaviour from the API
exception:
  StandardException - Unexpected exception from the implementation



t_addContainer
public long t_addContainer(T_TWC ctx, long segmentId, int pageSize, int spareSpace, int minimumRecordSize) throws StandardException, T_Fail(Code)



t_addPage
public Page t_addPage(ContainerHandle c) throws T_Fail, StandardException(Code)
Add a page to a container.
exception:
  T_Fail - Unexpected behaviour from the API
exception:
  StandardException - Unexpected exception from the implementation



t_checkEmptyPage
public static void t_checkEmptyPage(Page page) throws T_Fail, StandardException(Code)
Take an empty page and check it does actually seem to be empty.
exception:
  T_Fail - Unexpected behaviour from the API
exception:
  StandardException - Unexpected exception from the implementation



t_checkFetch
public static void t_checkFetch(Page page, RecordHandle rh, String data, int stringLen) throws T_Fail, StandardException(Code)
Fetch a record that is expected to exist using a record handle. The record has a T_RawStoreRow of 1 column and this column as value as specified by data, which could be null. Calls recordExists() before fetch to ensure that the record is there.
Parameters:
  page - the page in question
Parameters:
  rh - the record handle
Parameters:
  data - the string value that is expected in the row
exception:
  T_Fail - Implementation failed expectation
exception:
  StandardException - Unexpected exception from the implementation
See Also:   Page.recordExists
See Also:   Page.fetch



t_checkFetch
public static void t_checkFetch(Page page, RecordHandle rh, String data) throws T_Fail, StandardException(Code)



t_checkFetch
public void t_checkFetch(ContainerHandle c, RecordHandle rh, String data) throws T_Fail, StandardException(Code)
Fetch a record from a container that is expected to exist using a record handle. Calls recordExists() before fetch to ensure that the record is there.
exception:
  T_Fail - Implementation failed expectation
exception:
  StandardException - Unexpected exception from the implementation
See Also:   Page.recordExists
See Also:   Page.fetch



t_checkFetch
public static void t_checkFetch(Page page, RecordHandle rh, T_RawStoreRow row) throws T_Fail, StandardException(Code)



t_checkFetchBySlot
public static void t_checkFetchBySlot(Page page, int slot, String data, boolean deleted, boolean forUpdate) throws T_Fail, StandardException(Code)



t_checkFetchCol
public static void t_checkFetchCol(Page page, RecordHandle rh, int colNum, int numCols, String data) throws T_Fail, StandardException(Code)



t_checkFetchColFromSlot
public static void t_checkFetchColFromSlot(Page page, int slot, int fieldId, DataValueDescriptor column, boolean forUpdate, String data, int stringLen) throws StandardException, T_Fail(Code)



t_checkFetchColFromSlot
public static void t_checkFetchColFromSlot(Page page, int slot, int fieldId, DataValueDescriptor column, boolean forUpdate, String data) throws StandardException, T_Fail(Code)



t_checkFetchDeleted
public void t_checkFetchDeleted(ContainerHandle c, RecordHandle rh, String data) throws T_Fail, StandardException(Code)
Fetch a deleted record from a container using a record handle.
exception:
  T_Fail - Implementation failed expectation
exception:
  StandardException - Unexpected exception from the implementation
See Also:   Page.recordExists
See Also:   Page.fetch



t_checkFetchFail
public void t_checkFetchFail(ContainerHandle c, RecordHandle rh) throws T_Fail, StandardException(Code)
Check to make sure record is NOT there
exception:
  T_Fail - Implementation failed expectation
exception:
  StandardException - Unexpected exception from the implementation



t_checkFetchFirst
public static RecordHandle t_checkFetchFirst(Page page, String data) throws T_Fail, StandardException(Code)



t_checkFetchLast
public static RecordHandle t_checkFetchLast(Page page, String data) throws T_Fail, StandardException(Code)



t_checkFetchNext
public static RecordHandle t_checkFetchNext(Page page, RecordHandle rh, String data) throws T_Fail, StandardException(Code)



t_checkFetchPrevious
public static RecordHandle t_checkFetchPrevious(Page page, RecordHandle rh, String data) throws T_Fail, StandardException(Code)



t_checkFieldCount
public static void t_checkFieldCount(Page page, int slot, int count) throws T_Fail, StandardException(Code)



t_checkInvalidSavePoint
public static void t_checkInvalidSavePoint(Transaction t, String name) throws T_Fail, StandardException(Code)
Negative test - check that an invalid savepoint is detected.
exception:
  T_Fail - Unexpected behaviour from the API
exception:
  StandardException - Unexpected exception from the implementation



t_checkInvalidSavePoint
public void t_checkInvalidSavePoint(T_TWC ctx, String name) throws T_Fail, StandardException(Code)



t_checkNullLockCount
public void t_checkNullLockCount(Transaction t) throws T_Fail(Code)



t_checkPageNumber
public static void t_checkPageNumber(Page page, long pageNumber) throws T_Fail(Code)



t_checkRecordCount
public static void t_checkRecordCount(Page page, int count, int nonDeleted) throws T_Fail, StandardException(Code)



t_checkStringLengthFetch
public void t_checkStringLengthFetch(Page page, int slot, int expectedLength) throws T_Fail, StandardException(Code)
Check to make sure a row (possibly with overflow) is of the correct length
exception:
  T_Fail - Record handle returned is null.
exception:
  StandardException - Unexpected exception from the implementation



t_checkUpdateCol
public void t_checkUpdateCol(Page page, RecordHandle rh, int colNum, int numCols, String data) throws T_Fail, StandardException(Code)
Using sparse representation: Update a column of a record and check resulting value.
exception:
  T_Fail - Record handle returned is null.
exception:
  StandardException - Unexpected exception from the implementation
See Also:   Page.update



t_close
public void t_close(T_TWC ctx) throws StandardException, T_Fail(Code)



t_commit
public void t_commit(Transaction t) throws StandardException, T_Fail(Code)



t_commit
public void t_commit(T_TWC ctx) throws StandardException, T_Fail(Code)



t_delete
public void t_delete(ContainerHandle c, RecordHandle rh) throws T_Fail, StandardException(Code)
Delete a record.
exception:
  T_Fail - Record handle returned is null.
exception:
  StandardException - Unexpected exception from the implementation
See Also:   Page.delete



t_dropContainer
public void t_dropContainer(Transaction t, long segmentId, long containerId) throws StandardException, T_Fail(Code)
Drop a container
exception:
  T_Fail - Unexpected behaviour from the API
exception:
  StandardException - Unexpected exception from the implementation



t_genRandomFile
public void t_genRandomFile(String fileName, String mode, int size) throws T_Fail(Code)
Lazy people's random file generator: Generate a random file with specified name and file size
exception:
  T_Fail - Record handle returned is null.



t_getLastPage
public Page t_getLastPage(ContainerHandle c) throws T_Fail, StandardException(Code)
Get the last page in a container. Always returns a valid page or null if there is no page in the container.
exception:
  T_Fail - Unexpected behaviour from the API
exception:
  StandardException - Unexpected exception from the implementation



t_getPage
public Page t_getPage(ContainerHandle c, long pageNumber) throws T_Fail, StandardException(Code)
Get a specific page in a container. Always returns a valid page.
exception:
  T_Fail - Unexpected behaviour from the API
exception:
  StandardException - Unexpected exception from the implementation



t_insert
public static RecordHandle t_insert(Page page, T_RawStoreRow row) throws T_Fail, StandardException(Code)
Call page.insert() and ensure that the return record handle is not null. This assumes the caller has called spaceForInsert.
exception:
  T_Fail - Record handle returned is null.
exception:
  StandardException - Unexpected exception from the implementation
See Also:   Page.insert



t_insert
public RecordHandle t_insert(ContainerHandle c, T_RawStoreRow row) throws T_Fail, StandardException(Code)
Insert a record on the last page, if the row doesn't fit on the last page create a new page and insert there.
exception:
  T_Fail - Record handle returned is null.
exception:
  StandardException - Unexpected exception from the implementation
See Also:   Page.insert



t_insertAtSlot
public static RecordHandle t_insertAtSlot(Page page, int slot, T_RawStoreRow row) throws T_Fail, StandardException(Code)
Call page.insert() and ensure that the return record handle is not null. This assumes the caller has called spaceForInsert.
exception:
  T_Fail - Record handle returned is null.
exception:
  StandardException - Unexpected exception from the implementation
See Also:   Page.insert



t_insertAtSlot
public static RecordHandle t_insertAtSlot(Page page, int slot, T_RawStoreRow row, byte insertFlag) throws T_Fail, StandardException(Code)
Call page.insert() and ensure that the return record handle is not null. This assumes the caller has called spaceForInsert.
exception:
  T_Fail - Record handle returned is null.
exception:
  StandardException - Unexpected exception from the implementation
See Also:   Page.insert



t_insertAtSlot
public static RecordHandle t_insertAtSlot(Page page, int slot, T_RawStoreRow row, byte insertFlag, int overflowThreshold) throws T_Fail, StandardException(Code)
Call page.insert() and ensure that the return record handle is not null. This assumes the caller has called spaceForInsert.
exception:
  T_Fail - Record handle returned is null.
exception:
  StandardException - Unexpected exception from the implementation
See Also:   Page.insert



t_openContainer
public ContainerHandle t_openContainer(Transaction t, long segmentId, long containerId, boolean forUpdate) throws StandardException, T_Fail(Code)
Open a container.
exception:
  T_Fail - Unexpected behaviour from the API
exception:
  StandardException - Unexpected exception from the implementation



t_openContainer
public ContainerHandle t_openContainer(T_TWC ctx, long segmentId, long containerId, boolean forUpdate) throws StandardException, T_Fail(Code)



t_readOnlySlotOutOfRange
public static void t_readOnlySlotOutOfRange(Page page, int slot) throws T_Fail, StandardException(Code)



t_removePage
public void t_removePage(ContainerHandle c, Page p) throws T_Fail, StandardException(Code)
Remove a page from a container.
exception:
  T_Fail - Record handle returned is null.
exception:
  StandardException - Unexpected exception from the implementation



t_startGlobalTransaction
public Transaction t_startGlobalTransaction(int format_id, byte[] global_id, byte[] branch_id) throws StandardException, T_Fail(Code)



t_startInternalTransaction
public Transaction t_startInternalTransaction() throws StandardException, T_Fail(Code)



t_startTransaction
public Transaction t_startTransaction() throws StandardException, T_Fail(Code)



t_startTransactionWithContext
public T_TWC t_startTransactionWithContext() throws StandardException, T_Fail(Code)



t_update
public void t_update(ContainerHandle c, RecordHandle rh, T_RawStoreRow row) throws T_Fail, StandardException(Code)
Update a record.
exception:
  T_Fail - Record handle returned is null.
exception:
  StandardException - Unexpected exception from the implementation
See Also:   Page.update



t_updateSlotOutOfRange
public static void t_updateSlotOutOfRange(Page page, int slot) throws T_Fail, StandardException(Code)



t_wait
public static void t_wait(int milliSecond)(Code)
Make this thread wait a bit, probably for post commit to finish



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.