Java Doc for CDatabase.java in  » Database-DBMS » perst » org » garret » perst » continuous » 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 » perst » org.garret.perst.continuous 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.garret.perst.continuous.CDatabase

CDatabase
public class CDatabase (Code)

This class emulates relational database on top of Perst storage It maintains class extends and associated indices. Is supports JSQL and full text search queries. This class provides version control system, optimistic access control and full text search (using Lucene).

All transactions are isolated from each other and do not see changes made by other transactions (even committed transactions if commit happens after start of this transaction). The database keeps all versions of the object hich are grouped in version history. Version history is linear which means that no branches in version tree are possible. When transaction tries to update some object then working copy of the current version is created. Only this copy is changed, leaving all other versions unchanged. This modification will be visible only for the current transaction. Created or modified objects are linked in indices when transaction is committed. It means that application will not be able to find in the index just inserted or updated object. It has first to commit the current transaction. All working copies created during transaction execution are linked in he list stored in transaction context which is in turn associated with the current thread. It means two things:

  1. one thread can participate in only one transaction and one transaction can be controlled only by one thread
  2. size of transaction is limited by the amount of memory available for the application
When transaction is committed, then all its working copies are inspected. If the last version in version history is not equal to one from which working copy was created then conflict is detected and ConflictException is thrown. And if insertion of working copy in index will cause unique constraint violation then NotUniqueException is thrown. If no conflicts are detected, then transaction is committed and each working copy becomes new version in correspondent version history.

Isolation of transaction provided by CDatabase class is based on multiversioning and modification of working copies instead of original objects. Working copy is produced from the current version using clone (shallow copy) method. Clone will work correctly if components of the objects have primitive type (int, double,...) or are immutable (String). Using java.util.Date type is possible only if you do not try to update its components. Instead of normal Java references, you should use references to correspondent CVersionHistory (it allows to preserve reference consistency if new version of reference object is created). CDatabase class also supports links (components with Link type) and arrays. Fields with value type (class implementing IValue interface) can be used only if them are immutable or cloneable (implement org.garret.perst.ICloneable interface). Using any other data type including Perst collection classes is not supported and can cause unpredictable behavior.


Inner Class :public enum VersionSortOrder

Field Summary
 StandardAnalyzeranalyzer
    
 Directorydir
    
 IndexReaderindexReader
    
 IndexWriterindexWriter
    
public static  CDatabaseinstance
    
 longlastActiveTransId
    
 longmaxTransSeqNo
    
 longminTransSeqNo
    
 RootObjectroot
    
 Storagestorage
    
static  ThreadLocal<TransactionContext>transactionContext
    
 HashMap<Class, TableDescriptor>typeMap
    


Method Summary
public  voidbeginTransaction()
     Start new transaction.
public synchronized  voidbeginTransaction(long transId)
     Start transaction with the given identifier.
public  voidclose()
     Close the database.
public  longcommitTransaction()
     Commit transaction.
public  voiddelete(CVersion record)
     Mark current version as been deleted.
Parameters:
  record - working copy of the current version or current version itself.
 voidexcludeFromFullTextIndex(TableDescriptor desc, CVersion v)
    
public  IterableIterator<T>find(Class table, String field, Key key)
     Select current version from specified table by key
Parameters:
  table - class corresponding to the table
Parameters:
  field - indexed field
Parameters:
  key - key value iterator through selected records.
public  IterableIterator<T>find(Class table, String field, Key key, VersionSelector selector)
     Select records from the specified table by key using version selector
Parameters:
  table - class corresponding to the table
Parameters:
  field - indexed field
Parameters:
  key - key value
Parameters:
  selector - version selector iterator through selected records.
public  IterableIterator<T>find(Class table, String field, Key min, Key max, VersionSelector selector, int order)
     Select records from the specified table by key range using version selector
Parameters:
  table - class corresponding to the table
Parameters:
  field - indexed field
Parameters:
  min - minimal key value
Parameters:
  max - maximal key value
Parameters:
  selector - version selector
Parameters:
  order - key sort order: GenericIndex.ASCENT_ORDER or GenericIndex.DESCENT_ORDER iterator through selected records.
public  FullTextSearchResult[]fullTextSearch(String query, int limit)
     Perform full text search through the current version of all objects in the database
Parameters:
  query - full text search search query.
public  FullTextSearchResult[]fullTextSearch(String query, int limit, VersionSelector selector, VersionSortOrder order)
     Perform full text search using version selector
Parameters:
  query - full text search search query.
synchronized  IndexReadergetIndexReader()
    
synchronized  IndexWritergetIndexWriter()
    
public  IterableIterator<T>getRecords(Class table)
     Get iterator through current version of all table records
Parameters:
  table - class corresponding to the table iterator through all table records.
public  IterableIterator<T>getRecords(Class table, VersionSelector selector)
     Get iterator through all records of the table using specified version selector
Parameters:
  table - class corresponding to the table
Parameters:
  selector - version selector iterator through all table records.
public  IResourcegetResource()
    
public  TgetSingleton(Iterator<T> iterator)
     Extract single result from the returned result set.
public  StoragegetStorage()
    
synchronized  TableDescriptorgetTable(Class type)
    
static  TransactionContextgetTransactionContext()
    
public  IPersistentgetUserData()
     Get user data.
static  TransactionContextgetWriteTransactionContext()
    
 voidincludeInFullTextIndex(Document doc)
    
public  voidinsert(T record)
    
synchronized  TableDescriptorlookupTable(Class type)
    
public  voidopen(Storage storage, String fullTextIndexPath)
     Open the database.
 voidopenFullTextIndex(RootObject root, String path)
    
public synchronized  voidoptimizeFullTextIndex()
     Optimize full text index.
public  Query<T>prepare(Class table, String predicate)
     Prepare JSQL query.
public  Query<T>prepare(Class table, String predicate, VersionSelector selector)
     Prepare JSQL query.
public synchronized  voidrestoreFullTextIndex()
     Restore full text search index. If the full text search index is located in file system directory it may be get out of sync with the Perst database or even be corrupted in case of failure.
public  voidrollbackTransaction()
    
public  IterableIterator<T>select(Class table, String predicate)
     Select current version of records from specified table matching specified criteria
Parameters:
  table - class corresponding to the table
Parameters:
  predicate - search predicate iterator through selected records.
public  IterableIterator<T>select(Class table, String predicate, VersionSelector selector)
     Select records from the specified table using version selector
Parameters:
  table - class corresponding to the table
Parameters:
  predicate - search predicate
Parameters:
  selector - version selector iterator through selected records.
public  voidsetUserData(IPersistent obj)
     Set user data.
public  T[]toArray(T[] arr, Iterator<T> iterator, VersionSortOrder order)
     Converted returned result set to array. It should be applied as pipeline to CDatabase.select/CDatabase.find/CDatabase.getRecords/Query.execute methods: MyClass[] arr = db.toArray(new MyClass[0], db.select(MyClass.class, "price between 100 and 1000 and amount > 100", VersionSortOrder.ASCENT)); Result set iterator usually selects records in Perst in lazy mode, so execution of query is very fast but fetching each element requires some additional calculations.
public  List<T>toList(Iterator<T> iterator)
     Convert returned result set to the List collection.
public  List<T>toList(Iterator<T> iterator, int limit)
     Converted returned result set to List collection with limit for number of fetched records.
public  Tupdate(T record)
     Update the record.

Field Detail
analyzer
StandardAnalyzer analyzer(Code)



dir
Directory dir(Code)



indexReader
IndexReader indexReader(Code)



indexWriter
IndexWriter indexWriter(Code)



instance
public static CDatabase instance(Code)
Static instance of the database which can be used by application working with the single database



lastActiveTransId
long lastActiveTransId(Code)



maxTransSeqNo
long maxTransSeqNo(Code)



minTransSeqNo
long minTransSeqNo(Code)



root
RootObject root(Code)



storage
Storage storage(Code)



transactionContext
static ThreadLocal<TransactionContext> transactionContext(Code)



typeMap
HashMap<Class, TableDescriptor> typeMap(Code)





Method Detail
beginTransaction
public void beginTransaction()(Code)
Start new transaction. All changes can be made only within transaction context. Transaction context is associated with thread. It means that one thread can run only one transaction and one transaction can be handled only by one thread. Transaction is observing database state at the moment of the transaction start. Any changes done by other transactions (committed and uncommitted) after this moment are not visible for the current transaction. CDatabase uses optimistic access control. It means that transaction may be aborted if conflict is detected during transaction commit.



beginTransaction
public synchronized void beginTransaction(long transId)(Code)
Start transaction with the given identifier. Identifier of the transaction can be obtained using CVersion.getTransactionId() method. Starting transaction with ID of previously committed transaction allows to obtain snapshot of the database at the moment of this transaction execution. All search methods using default version selector (referencing current version) and CVersionHistory.getCurrent() method will select versions which were current at the moment of this transaction execution.
Parameters:
  transId - identifier of previously committed transaction
exception:
  TransactionAlreadyStartedException - when thread attempts to start new transaction without committing or aborting previous one. Transaction should be explicitly finished using CDatabase.commit or CDatabase.rollback method.Each thread should start its own transaction, it is not possible to share the same transaction by more than one threads.It is possible to call beginTransaction several times without commit or rollback only if previous transaction was read-only - didn't change any object



close
public void close()(Code)
Close the database. All uncommitted transaction will be aborted. Close full text index and storage.



commitTransaction
public long commitTransaction() throws ConflictException, NotUniqueException(Code)
Commit transaction.
exception:
  ConflictExpetion - is thrown if object modified by this transaction was also changed by some other previously committed transaction
exception:
  NotUniqueException - is thrown if indexable field with unique constraint of inserted or updated object contains the same value as current version of some other instance of this class (committed by another transact).Please notice that CDatabase is not able to detect unique constraint violations within one transaction - if itinserts two instances with same value of indexable field. identifier assigned to this transaction or 0 if there is no active transaction. This identifier can be used to obtain snapshot of the database at the moment of this transaction execution.



delete
public void delete(CVersion record)(Code)
Mark current version as been deleted.
Parameters:
  record - working copy of the current version or current version itself. In the last case work copy is created
exception:
  NotCurrentVersionException - is thrown if specified version is not current in the version history
exception:
  TransactionNotStartedException - if transaction was not started by this thread using CDatabase.beginTransaction



excludeFromFullTextIndex
void excludeFromFullTextIndex(TableDescriptor desc, CVersion v)(Code)



find
public IterableIterator<T> find(Class table, String field, Key key) throws NoSuchIndexException(Code)
Select current version from specified table by key
Parameters:
  table - class corresponding to the table
Parameters:
  field - indexed field
Parameters:
  key - key value iterator through selected records. This iterator doesn't support remove() method.If there are no instances of such class in the database, then empty iterator is returned
exception:
  NoSuchIndexException - if there is no index for the specified field



find
public IterableIterator<T> find(Class table, String field, Key key, VersionSelector selector) throws NoSuchIndexException(Code)
Select records from the specified table by key using version selector
Parameters:
  table - class corresponding to the table
Parameters:
  field - indexed field
Parameters:
  key - key value
Parameters:
  selector - version selector iterator through selected records. This iterator doesn't support remove() method.If there are no instances of such class in the database, then empty iterator is returned
exception:
  NoSuchIndexException - if there is no index for the specified field



find
public IterableIterator<T> find(Class table, String field, Key min, Key max, VersionSelector selector, int order)(Code)
Select records from the specified table by key range using version selector
Parameters:
  table - class corresponding to the table
Parameters:
  field - indexed field
Parameters:
  min - minimal key value
Parameters:
  max - maximal key value
Parameters:
  selector - version selector
Parameters:
  order - key sort order: GenericIndex.ASCENT_ORDER or GenericIndex.DESCENT_ORDER iterator through selected records. This iterator doesn't support remove() method.If there are no instances of such class in the database, then empty iterator is returned
exception:
  NoSuchIndexException - if there is no index for the specified field



fullTextSearch
public FullTextSearchResult[] fullTextSearch(String query, int limit)(Code)
Perform full text search through the current version of all objects in the database
Parameters:
  query - full text search search query. It should be compliant with Lucene query syntax and mayrefer to the particular fields or to any full text searchable field:
  • "name:John" - select document with field "name" containing word "John"
  • "title:magic AND author:Clark" - select document with field "title" containing word "magic" and field "author"containing word "Clark"
  • "atomic nuclear power" - select any document which full text searchable fields contain any of the specified words
  • "Class:com.eshop.Player AND description:DivX" - select objects with class com.eshop.Player which description contains word "DivX"

Parameters:
  limit - search result limit array with matched documents
exception:
  FullTextSearchQuerySyntaxError - if query syntax is invalid



fullTextSearch
public FullTextSearchResult[] fullTextSearch(String query, int limit, VersionSelector selector, VersionSortOrder order)(Code)
Perform full text search using version selector
Parameters:
  query - full text search search query. It should be compliant with Lucene query syntax and mayrefer to the particular fields or to any full text searchable field:
  • "name:John" - select document with field "name" containing word "John"
  • "title:magic AND author:Clark" - select document with field "title" containing word "magic" and field "author"containing word "Clark"
  • "atomic nuclear power" - select any document which full text searchable fields contain any of the specified words
  • "Class:com.eshop.Player AND description:DivX" - select objects with class com.eshop.Player which description contains word "DivX"

Parameters:
  limit - search result limit
Parameters:
  selector - version selector
Parameters:
  order - result set versions sort order (if VersionSortOrder.NONE then order of documents returned by Lucene is preserved - documents are sorted by score) array with matched documents
exception:
  FullTextSearchQuerySyntaxError - if query syntax is invalid



getIndexReader
synchronized IndexReader getIndexReader() throws IOException(Code)



getIndexWriter
synchronized IndexWriter getIndexWriter() throws IOException(Code)



getRecords
public IterableIterator<T> getRecords(Class table)(Code)
Get iterator through current version of all table records
Parameters:
  table - class corresponding to the table iterator through all table records. If there are no instances of such class in the database, then emptyiterator is returned



getRecords
public IterableIterator<T> getRecords(Class table, VersionSelector selector)(Code)
Get iterator through all records of the table using specified version selector
Parameters:
  table - class corresponding to the table
Parameters:
  selector - version selector iterator through all table records. If there are no instances of such class in the database, then emptyiterator is returned



getResource
public IResource getResource()(Code)
Get resource used to synchronize access to the database



getSingleton
public T getSingleton(Iterator<T> iterator) throws SingletonException(Code)
Extract single result from the returned result set. It should be applied as pipeline to CDatabase.select/CDatabase.find/CDatabase.getRecords/Query.execute methods: MyClass obj = db.getSingleton(db.find(MyClass.class, "key", value));
Parameters:
  iterator - result set iterator returned by CDatabase.select/CDatabase.find/CDatabase.getRecords/Query.executemethods selected object if result set contains exactly one object or null if result set is empty
exception:
  SingletonException - if result set contains more than one element



getStorage
public Storage getStorage()(Code)
Get storage associated with this database underlying storage



getTable
synchronized TableDescriptor getTable(Class type)(Code)



getTransactionContext
static TransactionContext getTransactionContext()(Code)



getUserData
public IPersistent getUserData()(Code)
Get user data. Continuous uses Perst root objects for its own purposes. But this methods allows application to specify its own root and store in the Perst storage non-versioned objects. reference to the persistent object previously stored by setUserData()



getWriteTransactionContext
static TransactionContext getWriteTransactionContext()(Code)



includeInFullTextIndex
void includeInFullTextIndex(Document doc)(Code)



insert
public void insert(T record)(Code)
Insert new record in the database
Parameters:
  record - inserted record
exception:
  ObjectAlreadyInsertedException - when object is part of some other version history
exception:
  TransactionNotStartedException - if transaction was not started by this thread using CDatabase.beginTransaction



lookupTable
synchronized TableDescriptor lookupTable(Class type)(Code)



open
public void open(Storage storage, String fullTextIndexPath)(Code)
Open the database. This method initialize database if it not initialized yet.
Parameters:
  storage - opened storage. Storage should be either empty (non-initialized, eitherpreviously initialized by the this method. It is not possible to open storage with root object other than RootObject created by this method.
Parameters:
  fullTextIndexPath - path to the directory containing Lucene database. If null, then Lucene index will be stored inside the main Perst storage.



openFullTextIndex
void openFullTextIndex(RootObject root, String path)(Code)



optimizeFullTextIndex
public synchronized void optimizeFullTextIndex()(Code)
Optimize full text index. This method can be periodically called by application (preferably in idle time) to optimize full text search index



prepare
public Query<T> prepare(Class table, String predicate)(Code)
Prepare JSQL query. Prepare is needed for queries with parameters. Also preparing query can improve speed if query will be executed multiple times (using prepare, it is compiled only once). To execute prepared query, you should use Query.execute(db.getRecords(TABLE.class)) method
Parameters:
  table - class corresponding to the table
Parameters:
  predicate - search predicate prepared query
exception:
  CompileError - exception is thrown if predicate is not valid JSQL exception



prepare
public Query<T> prepare(Class table, String predicate, VersionSelector selector)(Code)
Prepare JSQL query. Prepare is needed for queries with parameters. Also preparing query can improve speed if query will be executed multiple times (using prepare, it is compiled only once). To execute prepared query, you should use Query.execute(db.getRecords(TABLE.class)) method
Parameters:
  table - class corresponding to the table
Parameters:
  predicate - search predicate
Parameters:
  selector - version selector prepared query
exception:
  CompileError - exception is thrown if predicate is not valid JSQL exception



restoreFullTextIndex
public synchronized void restoreFullTextIndex()(Code)
Restore full text search index. If the full text search index is located in file system directory it may be get out of sync with the Perst database or even be corrupted in case of failure. In this case index can be reconstructed using this method.



rollbackTransaction
public void rollbackTransaction()(Code)
Rollback transaction



select
public IterableIterator<T> select(Class table, String predicate)(Code)
Select current version of records from specified table matching specified criteria
Parameters:
  table - class corresponding to the table
Parameters:
  predicate - search predicate iterator through selected records. This iterator doesn't support remove() method.If there are no instances of such class in the database, then empty iterator is returned
exception:
  CompileError - exception is thrown if predicate is not valid JSQL exception
exception:
  JSQLRuntimeException - exception is thrown if there is runtime error during query execution



select
public IterableIterator<T> select(Class table, String predicate, VersionSelector selector)(Code)
Select records from the specified table using version selector
Parameters:
  table - class corresponding to the table
Parameters:
  predicate - search predicate
Parameters:
  selector - version selector iterator through selected records. This iterator doesn't support remove() method.If there are no instances of such class in the database, then empty iterator is returned
exception:
  CompileError - exception is thrown if predicate is not valid JSQL exception
exception:
  JSQLRuntimeException - exception is thrown if there is runtime error during query execution



setUserData
public void setUserData(IPersistent obj)(Code)
Set user data. Continuous uses Perst root objects for its own purposes. But this methods allows application to specify its own root and store in the Perst storage non-versioned objects.
Parameters:
  obj - reference to the persistent object which will be stored in Perst root object



toArray
public T[] toArray(T[] arr, Iterator<T> iterator, VersionSortOrder order)(Code)
Converted returned result set to array. It should be applied as pipeline to CDatabase.select/CDatabase.find/CDatabase.getRecords/Query.execute methods: MyClass[] arr = db.toArray(new MyClass[0], db.select(MyClass.class, "price between 100 and 1000 and amount > 100", VersionSortOrder.ASCENT)); Result set iterator usually selects records in Perst in lazy mode, so execution of query is very fast but fetching each element requires some additional calculations. Using this method you can force loading of all result set elements. So you will know precise number of selected results, can access them in any order and without extra overhead. The payment for these advantages is increased time of query execution and amount of memory needed to hold all selected objects. Specifying sort order allows for example to select the first/last version satisfying search criteria.
Parameters:
  arr - the array into which the elements of the list are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
Parameters:
  iterator - result set iterator returned by CDatabase.select/CDatabase.find/CDatabase.getRecords/Query.executemethods
Parameters:
  order - version sort order: ASCENT, DESCENT or NONE. Array elements will be sorted by version identifiers. If sort order is not specified NONE (then records in the result array will be in the same order as returned by the iterator) an array containing selected objects in the given order



toList
public List<T> toList(Iterator<T> iterator)(Code)
Convert returned result set to the List collection. It should be applied as pipeline to CDatabase.select/CDatabase.find/CDatabase.getRecords/Query.execute methods: List list = db.toList(db.select(MyClass.class, "price between 100 and 1000 and amount > 100")); Result set iterator usually selects records in Perst in lazy mode, so execution of query is very fast but fetching each element requires some additional calculations. Using this method you can force loading of all result set elements. So you will know precise number of selected records, can access them in any order and without extra overhead. The payment for these advantages is increased time of query execution and amount of memory needed to hold all selected objects.
Parameters:
  iterator - result set iterator returned by CDatabase.select/CDatabase.find/CDatabase.getRecords/Query.executemethods List containing all selected objects



toList
public List<T> toList(Iterator<T> iterator, int limit)(Code)
Converted returned result set to List collection with limit for number of fetched records. It should be applied as pipeline to CDatabase.select/CDatabase.find/CDatabase.getRecords/Query.execute methods: List list = db.toList(db.select(MyClass.class, "price between 100 and 1000 and amount > 100")); Result set iterator usually selects records in Perst in lazy mode, so execution of query is very fast but fetching each element requires some additional calculations. Using this method you can force loading of all result set elements. So you will know precise number of selected results, can access them in any order and without extra overhead. The payment for these advantages is increased time of query execution and amount of memory needed to hold all selected objects.
Parameters:
  iterator - result set iterator returned by CDatabase.select/CDatabase.find/CDatabase.getRecords/Query.executemethods
Parameters:
  limit - result list limit List containing selected objects, if number of selected objects is larger than specified limit, then only first limit of them will be placed in the list and other will be ignored.



update
public T update(T record)(Code)
Update the record.
Parameters:
  record - updated record working copy of the specified version
exception:
  AmbiguousVersionException - when some other version from the same version history was already updated by the current transaction
exception:
  TransactionNotStartedException - if transaction was not started by this thread using CDatabase.beginTransaction



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.