Java Doc for StoredRecordHeader.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » impl » store » raw » data » 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.derby.impl.store.raw.data 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.derby.impl.store.raw.data.StoredRecordHeader

StoredRecordHeader
final public class StoredRecordHeader (Code)
A class StoredPage uses to cache record headers by passing instances to BasePage, and to write stored versions of record headers. Format
 1 byte          - status
 compressed int  - record identifier
 compressed long - overflow page } only if hasOverflow() is true
 compressed int  - overflow id   }     "        "           "
 compressed int  - first field   } only if hasFirstField set - otherwise 0
 compressed int  - number of fields in this portion - only if hasOverflow()
 is false OR hasFirstField is true - otherwise 0
 


Field Summary
final public static  intRECORD_DELETED
    
final public static  intRECORD_HAS_FIRST_FIELD
    
final public static  intRECORD_INITIAL
     Status bits for the record header: RECORD_INITIAL - used when record header is first initialized RECORD_DELETED - used to indicate the record has been deleted RECORD_OVERFLOW - used to indicate the record has been overflowed, it will point to the overflow page and ID RECORD_HAS_FIRST_FIELD - used to indicate that firstField is stored.
final public static  intRECORD_OVERFLOW
    
final public static  intRECORD_VALID_MASK
    
protected  intfirstField
     if (hasFirstField()) then this field is the number of the column in the orginal row which is now stored as the first field in this row.
protected  RecordHandlehandle
     A record handle that can represent the record, may be null.
protected  intid
    
protected  intnumberFields
     number of fields in the row.
protected  intoverflowId
     If (hasOverflow()) then this is the id of the row on page overflowPage where the next portion of the row can be found.
protected  longoverflowPage
     If (hasOverflow()) then this is the page where where the next portion of the row can be found.
protected  intstatus
     Status of the record.

Constructor Summary
public  StoredRecordHeader()
    
public  StoredRecordHeader(int id, int numberFields)
    
public  StoredRecordHeader(byte data, int offset)
    
public  StoredRecordHeader(StoredRecordHeader loadTargetFrom)
    

Method Summary
public  intgetFirstField()
    
protected  RecordHandlegetHandle(PageKey pageId, int current_slot)
     Get a record handle for the record.
final public  intgetId()
    
public  intgetNumberFields()
    
public  intgetOverflowId()
    
public  longgetOverflowPage()
    
final protected  booleanhasFirstField()
    
final public  booleanhasOverflow()
    
final public  booleanisDeleted()
     Get the deleted state of the record.
public  voidread(java.io.ObjectInput in)
    
public  intsetDeleted(boolean deleteTrue)
     Set the deleted state of the record.
public  voidsetFirstField(int firstField)
    
final public  voidsetId(int id)
    
final public  voidsetNumberFields(int numberFields)
    
public  voidsetOverflowDetails(RecordHandle overflowHandle)
    
public  voidsetOverflowFields(StoredRecordHeader loadFromTarget)
    
public  intsize()
     return the size of the record header.
public  StringtoString()
    
public  intwrite(OutputStream out)
    

Field Detail
RECORD_DELETED
final public static int RECORD_DELETED(Code)



RECORD_HAS_FIRST_FIELD
final public static int RECORD_HAS_FIRST_FIELD(Code)



RECORD_INITIAL
final public static int RECORD_INITIAL(Code)
Status bits for the record header: RECORD_INITIAL - used when record header is first initialized RECORD_DELETED - used to indicate the record has been deleted RECORD_OVERFLOW - used to indicate the record has been overflowed, it will point to the overflow page and ID RECORD_HAS_FIRST_FIELD - used to indicate that firstField is stored. When RECORD_OVERFLOW and RECORD_HAS_FIRST_FIELD both are set, part of record is on the page, the record header also stores the overflow point to the next part of the record. RECORD_VALID_MASK - A mask of valid bits that can be set currently, such that the following assert can be made: ASSERT((status & ~RECORD_VALID_MASK) == 0))



RECORD_OVERFLOW
final public static int RECORD_OVERFLOW(Code)



RECORD_VALID_MASK
final public static int RECORD_VALID_MASK(Code)



firstField
protected int firstField(Code)
if (hasFirstField()) then this field is the number of the column in the orginal row which is now stored as the first field in this row. This row is 2nd through N'th portion of a long row. For example if a row has its first 3 fields on page 0 and its next 3 fields on page 1, then the record header of the row portion on page 1 will have hasFirstField() set to true, and the value would be 4, indicating that the 4th field of the row is stored as the 1st field of the partial row portion stored on page 1.



handle
protected RecordHandle handle(Code)
A record handle that can represent the record, may be null.



id
protected int id(Code)
Actual identifier of the record
MT - Mutable



numberFields
protected int numberFields(Code)
number of fields in the row.



overflowId
protected int overflowId(Code)
If (hasOverflow()) then this is the id of the row on page overflowPage where the next portion of the row can be found. In this case there are no "real" fields on this page. This situation comes about if a row has been updated such that the real first field no longer fits on the head page.



overflowPage
protected long overflowPage(Code)
If (hasOverflow()) then this is the page where where the next portion of the row can be found. In this case there are no "real" fields on this page.



status
protected int status(Code)
Status of the record. See above for description of fields: RECORD_INITIAL RECORD_DELETED RECORD_OVERFLOW RECORD_HAS_FIRST_FIELD RECORD_VALID_MASK
MT - Mutable - single thread required.




Constructor Detail
StoredRecordHeader
public StoredRecordHeader()(Code)
Constructors for This class:



StoredRecordHeader
public StoredRecordHeader(int id, int numberFields)(Code)



StoredRecordHeader
public StoredRecordHeader(byte data, int offset)(Code)



StoredRecordHeader
public StoredRecordHeader(StoredRecordHeader loadTargetFrom)(Code)




Method Detail
getFirstField
public int getFirstField()(Code)



getHandle
protected RecordHandle getHandle(PageKey pageId, int current_slot)(Code)
Get a record handle for the record.


MT - single thread required




getId
final public int getId()(Code)
Get the record identifier
MT - thread safe



getNumberFields
public int getNumberFields()(Code)



getOverflowId
public int getOverflowId()(Code)



getOverflowPage
public long getOverflowPage()(Code)



hasFirstField
final protected boolean hasFirstField()(Code)



hasOverflow
final public boolean hasOverflow()(Code)



isDeleted
final public boolean isDeleted()(Code)
Get the deleted state of the record.


MT - single thread required




read
public void read(java.io.ObjectInput in) throws IOException(Code)



setDeleted
public int setDeleted(boolean deleteTrue)(Code)
Set the deleted state of the record.

return 1, if delete status from not deleted to deleted return -1, if delete status from deleted to not deleted return 0, if status unchanged.
MT - single thread required




setFirstField
public void setFirstField(int firstField)(Code)



setId
final public void setId(int id)(Code)



setNumberFields
final public void setNumberFields(int numberFields)(Code)



setOverflowDetails
public void setOverflowDetails(RecordHandle overflowHandle)(Code)



setOverflowFields
public void setOverflowFields(StoredRecordHeader loadFromTarget)(Code)



size
public int size()(Code)
return the size of the record header.

Calculates the size of the record header, mostly used to allow a reader to skip over the record header and position on the 1st field of the record.

This low level routine is performance critical to processing lots of rows, so calls to CompressNumber have been hand inlined. The length of the record header.
exception:
  StandardException - Standard exception policy.




toString
public String toString()(Code)



write
public int write(OutputStream out) throws IOException(Code)
Public Methods implmenting read/write of Storable Interface:



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)

w__ww.j_av__a_2s_.com__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.