Java Doc for StoredList.java in  » JMX » je » com » sleepycat » collections » 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 » JMX » je » com.sleepycat.collections 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sleepycat.collections.StoredContainer
      com.sleepycat.collections.StoredCollection
         com.sleepycat.collections.StoredList

StoredList
public class StoredList extends StoredCollection implements List(Code)
A List view of a Database .

For all stored lists the keys of the underlying Database must have record number format, and therefore the store or index must be a RECNO, RECNO-RENUMBER, QUEUE, or BTREE-RECNUM database. Only RECNO-RENUMBER allows true list behavior where record numbers are renumbered following the position of an element that is added or removed. For the other access methods (RECNO, QUEUE, and BTREE-RECNUM), stored Lists are most useful as read-only collections where record numbers are not required to be sequential.

In addition to the standard List methods, this class provides the following methods for stored lists only. Note that the use of these methods is not compatible with the standard Java collections interface.


author:
   Mark Hayes



Constructor Summary
public  StoredList(Database database, EntryBinding valueBinding, boolean writeAllowed)
     Creates a list view of a Database .
public  StoredList(Database database, EntityBinding valueEntityBinding, boolean writeAllowed)
     Creates a list entity view of a Database .
public  StoredList(Database database, EntryBinding valueBinding, PrimaryKeyAssigner keyAssigner)
     Creates a list view of a Database with a PrimaryKeyAssigner .
public  StoredList(Database database, EntityBinding valueEntityBinding, PrimaryKeyAssigner keyAssigner)
     Creates a list entity view of a Database with a PrimaryKeyAssigner .

Method Summary
public  voidadd(int index, Object value)
     Inserts the specified element at the specified position in this list (optional operation).
public  booleanadd(Object value)
     Appends the specified element to the end of this list (optional operation).
public  booleanaddAll(int index, Collection coll)
     Inserts all of the elements in the specified collection into this list at the specified position (optional operation).
public  intappend(Object value)
     Appends a given value returning the newly assigned index. If a com.sleepycat.collections.PrimaryKeyAssigner is associated with Store for this list, it will be used to assigned the returned index.
 voidcheckIterAddAllowed()
    
public  booleancontains(Object value)
     Returns true if this list contains the specified element.
public  booleanequals(Object other)
     Compares the specified object with this list for equality.
public  Objectget(int index)
     Returns the element at the specified position in this list.
 intgetIndexOffset()
    
 booleanhasValues()
    
public  inthashCode()
    
public  intindexOf(Object value)
     Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element.
public  intlastIndexOf(Object value)
     Returns the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element.
public  ListIteratorlistIterator()
     Returns a list iterator of the elements in this list (in proper sequence).
public  ListIteratorlistIterator(int index)
     Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in this list.
 ObjectmakeIteratorData(BaseIterator iterator, DatabaseEntry keyEntry, DatabaseEntry priKeyEntry, DatabaseEntry valueEntry)
    
public  Objectremove(int index)
     Removes the element at the specified position in this list (optional operation).
public  booleanremove(Object value)
     Removes the first occurrence in this list of the specified element (optional operation).
public  Objectset(int index, Object value)
     Replaces the element at the specified position in this list with the specified element (optional operation).
final  ListIteratorstoredOrExternalListIterator(List list)
     Returns a StoredIterator if the given collection is a StoredCollection, else returns a regular/external ListIterator.
public  ListsubList(int fromIndex, int toIndex)
     Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive.


Constructor Detail
StoredList
public StoredList(Database database, EntryBinding valueBinding, boolean writeAllowed)(Code)
Creates a list view of a Database .
Parameters:
  database - is the Database underlying the new collection.
Parameters:
  valueBinding - is the binding used to translate between valuebuffers and value objects.
Parameters:
  writeAllowed - is true to create a read-write collection or falseto create a read-only collection.
throws:
  IllegalArgumentException - if formats are not consistentlydefined or a parameter is invalid.
throws:
  RuntimeExceptionWrapper - if a DatabaseException isthrown.



StoredList
public StoredList(Database database, EntityBinding valueEntityBinding, boolean writeAllowed)(Code)
Creates a list entity view of a Database .
Parameters:
  database - is the Database underlying the new collection.
Parameters:
  valueEntityBinding - is the binding used to translate betweenkey/value buffers and entity value objects.
Parameters:
  writeAllowed - is true to create a read-write collection or falseto create a read-only collection.
throws:
  IllegalArgumentException - if formats are not consistentlydefined or a parameter is invalid.
throws:
  RuntimeExceptionWrapper - if a DatabaseException isthrown.



StoredList
public StoredList(Database database, EntryBinding valueBinding, PrimaryKeyAssigner keyAssigner)(Code)
Creates a list view of a Database with a PrimaryKeyAssigner . Writing is allowed for the created list.
Parameters:
  database - is the Database underlying the new collection.
Parameters:
  valueBinding - is the binding used to translate between valuebuffers and value objects.
Parameters:
  keyAssigner - is used by the StoredList.add and StoredList.appendmethods to assign primary keys.
throws:
  IllegalArgumentException - if formats are not consistentlydefined or a parameter is invalid.
throws:
  RuntimeExceptionWrapper - if a DatabaseException isthrown.



StoredList
public StoredList(Database database, EntityBinding valueEntityBinding, PrimaryKeyAssigner keyAssigner)(Code)
Creates a list entity view of a Database with a PrimaryKeyAssigner . Writing is allowed for the created list.
Parameters:
  database - is the Database underlying the new collection.
Parameters:
  valueEntityBinding - is the binding used to translate betweenkey/value buffers and entity value objects.
Parameters:
  keyAssigner - is used by the StoredList.add and StoredList.appendmethods to assign primary keys.
throws:
  IllegalArgumentException - if formats are not consistentlydefined or a parameter is invalid.
throws:
  RuntimeExceptionWrapper - if a DatabaseException isthrown.




Method Detail
add
public void add(int index, Object value)(Code)
Inserts the specified element at the specified position in this list (optional operation). This method conforms to the List.add(intObject) interface.
throws:
  UnsupportedOperationException - if the collection is a sublist, orif the collection is indexed, or if the collection is read-only, or ifthe RECNO-RENUMBER access method was not used.
throws:
  RuntimeExceptionWrapper - if a DatabaseException isthrown.



add
public boolean add(Object value)(Code)
Appends the specified element to the end of this list (optional operation). This method conforms to the List.add(Object) interface.
throws:
  UnsupportedOperationException - if the collection is a sublist, orif the collection is indexed, or if the collection is read-only, or ifthe RECNO-RENUMBER access method was not used.
throws:
  RuntimeExceptionWrapper - if a DatabaseException isthrown.



addAll
public boolean addAll(int index, Collection coll)(Code)
Inserts all of the elements in the specified collection into this list at the specified position (optional operation). This method conforms to the List.addAll(intCollection) interface.
throws:
  UnsupportedOperationException - if the collection is a sublist, orif the collection is indexed, or if the collection is read-only, or ifthe RECNO-RENUMBER access method was not used.
throws:
  RuntimeExceptionWrapper - if a DatabaseException isthrown.



append
public int append(Object value)(Code)
Appends a given value returning the newly assigned index. If a com.sleepycat.collections.PrimaryKeyAssigner is associated with Store for this list, it will be used to assigned the returned index. Otherwise the Store must be a QUEUE or RECNO database and the next available record number is assigned as the index. This method does not exist in the standard List interface.
Parameters:
  value - the value to be appended. the assigned index.
throws:
  UnsupportedOperationException - if the collection is indexed, orif the collection is read-only, or if the Store has no com.sleepycat.collections.PrimaryKeyAssigner and is not a QUEUE orRECNO database.
throws:
  RuntimeExceptionWrapper - if a DatabaseException isthrown.



checkIterAddAllowed
void checkIterAddAllowed() throws UnsupportedOperationException(Code)



contains
public boolean contains(Object value)(Code)
Returns true if this list contains the specified element. This method conforms to the List.contains interface.
throws:
  RuntimeExceptionWrapper - if a DatabaseException isthrown.



equals
public boolean equals(Object other)(Code)
Compares the specified object with this list for equality. A value comparison is performed by this method and the stored values are compared rather than calling the equals() method of each element. This method conforms to the List.equals interface.
throws:
  RuntimeExceptionWrapper - if a DatabaseException isthrown.



get
public Object get(int index)(Code)
Returns the element at the specified position in this list. This method conforms to the List.get interface.
throws:
  RuntimeExceptionWrapper - if a DatabaseException isthrown.



getIndexOffset
int getIndexOffset()(Code)



hasValues
boolean hasValues()(Code)



hashCode
public int hashCode()(Code)



indexOf
public int indexOf(Object value)(Code)
Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element. This method conforms to the List.indexOf interface.
throws:
  RuntimeExceptionWrapper - if a DatabaseException isthrown.



lastIndexOf
public int lastIndexOf(Object value)(Code)
Returns the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element. This method conforms to the List.lastIndexOf interface.
throws:
  RuntimeExceptionWrapper - if a DatabaseException isthrown.



listIterator
public ListIterator listIterator()(Code)
Returns a list iterator of the elements in this list (in proper sequence). The iterator will be read-only if the collection is read-only. This method conforms to the List.listIterator interface.

For information on cursor stability and iterator block size, see StoredList.iterator() .

a ListIterator for this collection.
throws:
  RuntimeExceptionWrapper - if a DatabaseException isthrown.
See Also:   StoredList.isWriteAllowed



listIterator
public ListIterator listIterator(int index)(Code)
Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in this list. The iterator will be read-only if the collection is read-only. This method conforms to the List.listIterator(int) interface.

For information on cursor stability and iterator block size, see StoredList.iterator() .

a ListIterator for this collection.
throws:
  RuntimeExceptionWrapper - if a DatabaseException isthrown.
See Also:   StoredList.isWriteAllowed



makeIteratorData
Object makeIteratorData(BaseIterator iterator, DatabaseEntry keyEntry, DatabaseEntry priKeyEntry, DatabaseEntry valueEntry)(Code)



remove
public Object remove(int index)(Code)
Removes the element at the specified position in this list (optional operation). This method conforms to the List.remove(int) interface.
throws:
  UnsupportedOperationException - if the collection is a sublist, orif the collection is read-only.
throws:
  RuntimeExceptionWrapper - if a DatabaseException isthrown.



remove
public boolean remove(Object value)(Code)
Removes the first occurrence in this list of the specified element (optional operation). This method conforms to the List.remove(Object) interface.
throws:
  UnsupportedOperationException - if the collection is a sublist, orif the collection is read-only.
throws:
  RuntimeExceptionWrapper - if a DatabaseException isthrown.



set
public Object set(int index, Object value)(Code)
Replaces the element at the specified position in this list with the specified element (optional operation). This method conforms to the List.set interface.
throws:
  UnsupportedOperationException - if the collection is indexed, orif the collection is read-only.
throws:
  IllegalArgumentException - if an entity value binding is used andthe primary key of the value given is different than the existing storedprimary key.
throws:
  RuntimeExceptionWrapper - if a DatabaseException isthrown.



storedOrExternalListIterator
final ListIterator storedOrExternalListIterator(List list)(Code)
Returns a StoredIterator if the given collection is a StoredCollection, else returns a regular/external ListIterator. The iterator returned should be closed with the static method StoredIterator.close(Iterator).



subList
public List subList(int fromIndex, int toIndex)(Code)
Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive. Note that add() and remove() may not be called for the returned sublist. This method conforms to the List.subList interface.
throws:
  RuntimeExceptionWrapper - if a DatabaseException isthrown.



Fields inherited from com.sleepycat.collections.StoredCollection
final public static int DEFAULT_ITERATOR_BLOCK_SIZE(Code)(Java Doc)

Methods inherited from com.sleepycat.collections.StoredCollection
final boolean add(Object key, Object value)(Code)(Java Doc)
public boolean addAll(Collection coll)(Code)(Java Doc)
BlockIterator blockIterator()(Code)(Java Doc)
void checkIterAddAllowed() throws UnsupportedOperationException(Code)(Java Doc)
public boolean containsAll(Collection coll)(Code)(Java Doc)
public boolean equals(Object other)(Code)(Java Doc)
final Object getFirstOrLast(boolean doGetFirst)(Code)(Java Doc)
int getIndexOffset()(Code)(Java Doc)
public int getIteratorBlockSize()(Code)(Java Doc)
abstract boolean hasValues()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
boolean iterateDuplicates()(Code)(Java Doc)
public Iterator iterator()(Code)(Java Doc)
public StoredIterator iterator(boolean writeAllowed)(Code)(Java Doc)
public StoredIterator join(StoredContainer[] indices, Object[] indexKeys, JoinConfig joinConfig)(Code)(Java Doc)
Object makeIteratorData(BaseIterator iterator, DataCursor cursor)(Code)(Java Doc)
abstract Object makeIteratorData(BaseIterator iterator, DatabaseEntry keyEntry, DatabaseEntry priKeyEntry, DatabaseEntry valueEntry)(Code)(Java Doc)
public boolean removeAll(Collection coll)(Code)(Java Doc)
public boolean retainAll(Collection coll)(Code)(Java Doc)
public void setIteratorBlockSize(int blockSize)(Code)(Java Doc)
public int size()(Code)(Java Doc)
public StoredIterator storedIterator()(Code)(Java Doc)
public StoredIterator storedIterator(boolean writeAllowed)(Code)(Java Doc)
public Object[] toArray()(Code)(Java Doc)
public Object[] toArray(Object[] a)(Code)(Java Doc)
public List toList()(Code)(Java Doc)
public String toString()(Code)(Java Doc)

Fields inherited from com.sleepycat.collections.StoredContainer
DataView view(Code)(Java Doc)

Methods inherited from com.sleepycat.collections.StoredContainer
final public boolean areDuplicatesAllowed()(Code)(Java Doc)
final public boolean areDuplicatesOrdered()(Code)(Java Doc)
final public boolean areKeysRenumbered()(Code)(Java Doc)
final boolean beginAutoCommit()(Code)(Java Doc)
public void clear()(Code)(Java Doc)
final void closeCursor(DataCursor cursor)(Code)(Java Doc)
final void commitAutoCommit(boolean doAutoCommit) throws DatabaseException(Code)(Java Doc)
final StoredContainer configuredClone(CursorConfig config)(Code)(Java Doc)
boolean containsKey(Object key)(Code)(Java Doc)
boolean containsValue(Object value)(Code)(Java Doc)
static RuntimeException convertException(Exception e)(Code)(Java Doc)
Object get(Object key)(Code)(Java Doc)
final public CursorConfig getCursorConfig()(Code)(Java Doc)
final RuntimeException handleException(Exception e, boolean doAutoCommit)(Code)(Java Doc)
void initAfterClone()(Code)(Java Doc)
final public boolean isDirtyRead()(Code)(Java Doc)
final public boolean isDirtyReadAllowed()(Code)(Java Doc)
public boolean isEmpty()(Code)(Java Doc)
final public boolean isOrdered()(Code)(Java Doc)
final public boolean isSecondary()(Code)(Java Doc)
final public boolean isTransactional()(Code)(Java Doc)
final public boolean isWriteAllowed()(Code)(Java Doc)
Object put(Object key, Object value)(Code)(Java Doc)
final boolean removeKey(Object key, Object[] oldVal)(Code)(Java Doc)
final boolean removeValue(Object value)(Code)(Java Doc)
abstract public int size()(Code)(Java Doc)
final Iterator storedOrExternalIterator(Collection coll)(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.