Java Doc for SConstants.java in  » Database-ORM » SimpleORM » simpleorm » core » 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 ORM » SimpleORM » simpleorm.core 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


simpleorm.core.SConstants

All known Subclasses:   simpleorm.examples.Benchmarks,  simpleorm.examples.GeneratedKeyTest,  simpleorm.examples.ADemo,  simpleorm.simplewebapp.eg.database.WInitPage,  simpleorm.examples.LongTransactionTest,  simpleorm.core.SConnection,  simpleorm.core.SCon,  simpleorm.examples.ColumnCacheTest,  simpleorm.core.SQuery,  simpleorm.core.SDriver,  simpleorm.examples.ValidationTest,  simpleorm.core.SDataLoader,  simpleorm.examples.IdentFKeysTest,  simpleorm.examples.CreateDBTest,  simpleorm.examples.BasicTests,  simpleorm.examples.DataTypesTest,  simpleorm.simplewebapp.eg.database.WDumpRawPage,  simpleorm.examples.TestUte,
SConstants
public interface SConstants extends SSimpleORMProperties(Code)
Contains all the constants used by SimpleORM. Implementing this interface will automatically import these constants which is convenient. All constants are prefixed to avoid conflicts.

Bit fields are longs to alow for growth and to trap type errors if they are mixed up with other int parameters. For flags, the low order short is used to verfiy the parameter -- each flag set has a different lower short. Parameters that use them are named *_flags where * is the prefix, eg. sfd_bitSet.

Wouldn't it be wonderful if Java supported 30 year old constructs such as enumerations and sets!

Constants and methods suffixed _unimp have not yet been implemented. When they are, the suffix will be removed.



Field Summary
final static  byteINS_DIRTY
    
final static  byteINS_READ_ONLY
    
final static  byteINS_VALID
     Values of SRecordInstance.bitSets -- ie.
final static  longSQY_
     SQY_: SimpleORM QuerY flags.
final static  longSQY_ASSUME_CREATE
     Optimization parameter to findOrCreate that causes SimpleORM to assume that the the record does not already exist in the database, and so does not do the initial SELECT. Saves about 30%.
final static  longSQY_DESCRIPTIVE
     Only query fields marked SFD_DESCRIPTIVE.
final static  longSQY_NO_FOREIGN_KEYS
     Internal for DataLoader.
final static  longSQY_NO_GENERATED_KEYS
     Internal for queries.
final static  longSQY_NO_REFERENCES
     Internal for queries.
final static  longSQY_OPTIMISTIC
     Use Optimistic locking.
final static  longSQY_PRIMARY_KEY
     Causes only the primary key field(s) are queried.
final static  longSQY_READ_MOSTLY_unimp
     Retrieve the row from the Read Mostly cache.
final static  longSQY_READ_ONLY
     Do not lock the record in the database.
final static  longSQY_REFERENCE_NO_QUERY
     Prevents a query from being issued to lazzily fetch a reference. getObject just returns Boolean.FALSE in this case.
final static  longSQY_UNQUERIED
     Include any columns that were marked SFD_UNQUERIED and so are not normally retrieved.
final static  longSQY_UNREPEATABLE_READ
     Read without locking the record with a read lock.
final static  longSQY_UNREPEATABLE_READ_UNSAFE
     Read without locking the record with a read lock. Important for MS SQL to prevent lock escalation. For read behind dbs like Oracle/Postgresql this is the same as SQY_Read_Only in that no "FOR UPDATE" is appended, yet the record is still updatable (The read actually will probably be repeatable).

Note that this still enables the record to be updated. This is very dangerous unless you are sure that no other user could be accessing the records. Eg.




Field Detail
INS_DIRTY
final static byte INS_DIRTY(Code)



INS_READ_ONLY
final static byte INS_READ_ONLY(Code)



INS_VALID
final static byte INS_VALID(Code)
Values of SRecordInstance.bitSets -- ie. internal.



SQY_
final static long SQY_(Code)
SQY_: SimpleORM QuerY flags. Controls which fields are queried, and how.



SQY_ASSUME_CREATE
final static long SQY_ASSUME_CREATE(Code)
Optimization parameter to findOrCreate that causes SimpleORM to assume that the the record does not already exist in the database, and so does not do the initial SELECT. Saves about 30%. If the record does in fact exist you will get a duplicate key error when the record is flushed.



SQY_DESCRIPTIVE
final static long SQY_DESCRIPTIVE(Code)
Only query fields marked SFD_DESCRIPTIVE.



SQY_NO_FOREIGN_KEYS
final static long SQY_NO_FOREIGN_KEYS(Code)
Internal for DataLoader. Do not include Foreign key column fields, just the references.



SQY_NO_GENERATED_KEYS
final static long SQY_NO_GENERATED_KEYS(Code)
Internal for queries. Do not include any generated keys.



SQY_NO_REFERENCES
final static long SQY_NO_REFERENCES(Code)
Internal for queries. Do not include Reference fields, just the fields that correspond to columns.



SQY_OPTIMISTIC
final static long SQY_OPTIMISTIC(Code)
Use Optimistic locking. Ie. do not lock the record in the database, but do remember the previous state of the row. If the record is updated a check is made that the row has not been updated by another session.



SQY_PRIMARY_KEY
final static long SQY_PRIMARY_KEY(Code)
Causes only the primary key field(s) are queried. At least the primary key field(s) are always queried.



SQY_READ_MOSTLY_unimp
final static long SQY_READ_MOSTLY_unimp(Code)
Retrieve the row from the Read Mostly cache. Use with caution because the returned row might be quite stale. Must not be updated.



SQY_READ_ONLY
final static long SQY_READ_ONLY(Code)
Do not lock the record in the database. Must not be updated unless subsequently requeired without this flag set. See SQY_UNREPEATABLE_READ



SQY_REFERENCE_NO_QUERY
final static long SQY_REFERENCE_NO_QUERY(Code)
Prevents a query from being issued to lazzily fetch a reference. getObject just returns Boolean.FALSE in this case. See getReferenceNoQuery.



SQY_UNQUERIED
final static long SQY_UNQUERIED(Code)
Include any columns that were marked SFD_UNQUERIED and so are not normally retrieved.



SQY_UNREPEATABLE_READ
final static long SQY_UNREPEATABLE_READ(Code)
Read without locking the record with a read lock. It is also Read_Only.

Note that it is still not really safe if you are using read data to update another record.

Important for MS SQL to prevent lock escalation. Has no effect for read behind dbs like Oracle/Postgresql.




SQY_UNREPEATABLE_READ_UNSAFE
final static long SQY_UNREPEATABLE_READ_UNSAFE(Code)
Read without locking the record with a read lock. Important for MS SQL to prevent lock escalation. For read behind dbs like Oracle/Postgresql this is the same as SQY_Read_Only in that no "FOR UPDATE" is appended, yet the record is still updatable (The read actually will probably be repeatable).

Note that this still enables the record to be updated. This is very dangerous unless you are sure that no other user could be accessing the records. Eg. Detail records related to a master.

But if you get this wrong you will get unrepeatable data corruption. See SQY_UNREPEATABLE_READ. And consider using optimistic locks if this really is a problem for you.






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