Java Doc for CachedRow.java in  » Database-DBMS » hsql » org » hsqldb » 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 » hsql » org.hsqldb 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.hsqldb.Row
      org.hsqldb.CachedRow

All known Subclasses:   org.hsqldb.CachedDataRow,
CachedRow
public class CachedRow extends Row (Code)
In-memory representation of a disk-based database row object with methods for serialization and de-serialization.

A CachedRow is normally part of a circular double linked list which contains all of the Rows currently in the Cache for the database. It is unlinked from this list when it is freed from the Cache to make way for other rows. New class from the Hypersonic Original
author:
   Thomas Mueller (Hypersonic SQL Group)
version:
   1.7.2
since:
   Hypersonic SQL



Field Summary
final static  intNO_POS
    
protected  booleanhasDataChanged
     Flag indicating unwritten data.
 booleanhasNodesChanged
     Flag indicating Node data has changed.
 intstorageSize
    
protected  TabletTable
    

Constructor Summary
 CachedRow()
     Default constructor used only in subclasses.
 CachedRow(Table t, Object[] o)
     Constructor for new Rows.
public  CachedRow(Table t, RowInputInterface in)
     Constructor when read from the disk into the Cache.

Method Summary
public  voiddelete()
     This method is called only when the Row is deleted from the database table.
public  booleanequals(Object obj)
     With CACHED tables there may possibly exist two copies of the row.
public  intgetRealSize(RowOutputInterface out)
    
public  intgetStorageSize()
    
public  TablegetTable()
     Returns the Table to which this Row belongs.
synchronized  RowgetUpdatedRow()
     Using the internal reference to the Table, returns the current cached Row.
public  booleanhasChanged()
     Returns true if Node data has changed.
public  inthashCode()
    
public synchronized  booleanisKeepInMemory()
     Returns true if any of the Nodes for this row is a root node.
public static  CachedRownewCachedRow(Table t, Object[] o)
    
 voidsetChanged()
     Sets flag for Node data change.
 voidsetNewNodes()
    
public  voidsetPos(int pos)
    
public  voidsetStorageSize(int size)
    
public  voidwrite(RowOutputInterface out)
     Used exclusively by Cache to save the row to disk.
public  voidwrite(RowOutputInterface out, IntLookup lookup)
    

Field Detail
NO_POS
final static int NO_POS(Code)



hasDataChanged
protected boolean hasDataChanged(Code)
Flag indicating unwritten data.



hasNodesChanged
boolean hasNodesChanged(Code)
Flag indicating Node data has changed.



storageSize
int storageSize(Code)



tTable
protected Table tTable(Code)




Constructor Detail
CachedRow
CachedRow()(Code)
Default constructor used only in subclasses.



CachedRow
CachedRow(Table t, Object[] o) throws HsqlException(Code)
Constructor for new Rows. Variable hasDataChanged is set to true in order to indicate the data needs saving.
Parameters:
  t - table
Parameters:
  o - row data
throws:
  HsqlException - if a database access error occurs



CachedRow
public CachedRow(Table t, RowInputInterface in) throws IOException, HsqlException(Code)
Constructor when read from the disk into the Cache.
Parameters:
  t - table
Parameters:
  in - data source
throws:
  IOException -
throws:
  HsqlException -




Method Detail
delete
public void delete() throws HsqlException(Code)
This method is called only when the Row is deleted from the database table. The links with all the other objects apart from the data are removed.
throws:
  HsqlException -



equals
public boolean equals(Object obj)(Code)
With CACHED tables there may possibly exist two copies of the row. All copies will have the same iPos.
Parameters:
  obj - row to compare boolean



getRealSize
public int getRealSize(RowOutputInterface out)(Code)
returned size does not include the row size written at the beginning



getStorageSize
public int getStorageSize()(Code)



getTable
public Table getTable()(Code)
Returns the Table to which this Row belongs. Table



getUpdatedRow
synchronized Row getUpdatedRow() throws HsqlException(Code)
Using the internal reference to the Table, returns the current cached Row. Valid for deleted rows only before any subsequent insert or update on any cached table.

Access to tables while performing the internal operations for an SQL statement result in CachedRow objects to be cleared from the cache. This method returns the CachedRow, loading it to the cache if it is not there. the current Row in Cache for this Object
throws:
  HsqlException -




hasChanged
public boolean hasChanged()(Code)
Returns true if Node data has changed. boolean



hashCode
public int hashCode()(Code)
Hash code is valid only until a modification to the cache file position of row



isKeepInMemory
public synchronized boolean isKeepInMemory()(Code)
Returns true if any of the Nodes for this row is a root node. Used only in Cache.java to avoid removing the row from the cache. boolean
throws:
  HsqlException -



newCachedRow
public static CachedRow newCachedRow(Table t, Object[] o) throws HsqlException(Code)



setChanged
void setChanged()(Code)
Sets flag for Node data change.



setNewNodes
void setNewNodes()(Code)
used in CachedDataRow



setPos
public void setPos(int pos)(Code)
Sets the file position for the row
Parameters:
  pos - position in data file



setStorageSize
public void setStorageSize(int size)(Code)



write
public void write(RowOutputInterface out)(Code)
Used exclusively by Cache to save the row to disk. New implementation in 1.7.2 writes out only the Node data if the table row data has not changed. This situation accounts for the majority of invocations as for each row deleted or inserted, the Nodes for several other rows will change.
Parameters:
  output - data source
throws:
  IOException -
throws:
  HsqlException -



write
public void write(RowOutputInterface out, IntLookup lookup)(Code)



Fields inherited from org.hsqldb.Row
int iPos(Code)(Java Doc)
protected Node nPrimaryNode(Code)(Java Doc)
protected Object[] oData(Code)(Java Doc)
int tableId(Code)(Java Doc)

Methods inherited from org.hsqldb.Row
void clearNodeLinks()(Code)(Java Doc)
void delete() throws HsqlException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
public Object[] getData()(Code)(Java Doc)
public long getId()(Code)(Java Doc)
public static long getId(Table table, int pos)(Code)(Java Doc)
Node getNextNode(Node n)(Code)(Java Doc)
Node getNode(int index)(Code)(Java Doc)
public int getPos()(Code)(Java Doc)
public int getRealSize(RowOutputInterface out)(Code)(Java Doc)
public int getStorageSize()(Code)(Java Doc)
Row getUpdatedRow() throws HsqlException(Code)(Java Doc)
public boolean hasChanged()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
boolean isCascadeDeleted()(Code)(Java Doc)
public boolean isInMemory()(Code)(Java Doc)
public boolean isKeepInMemory()(Code)(Java Doc)
public void keepInMemory(boolean keep)(Code)(Java Doc)
public void setInMemory(boolean in)(Code)(Java Doc)
public void setPos(int pos)(Code)(Java Doc)
public void setStorageSize(int size)(Code)(Java Doc)
public void write(RowOutputInterface out)(Code)(Java Doc)
public void write(RowOutputInterface out, IntLookup lookup)(Code)(Java Doc)

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.