Java Doc for SSimpleORMProperties.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.SSimpleORMProperties

SSimpleORMProperties
public interface SSimpleORMProperties (Code)
This interface contains all the SProperties constants used in SimpleORM. Properties are a general way to attach extra information to SRecordMetas and SFieldMetas. They are usually used as follows:-

public static final SFieldObject TSTAMP_OBJ = new SFieldObject(meta, "TSTAMP_OBJ", SDATA_TYPE.pvalue("TIMESTAMP")); public static final SFieldString DATA_ID = new SFieldString(meta, "DATA_ID", 10, SFD_PRIMARY_KEY); Each of the SField* initializers allows 0, 1, 2 or an array of SPropertyValues to be passed as trailing parameters. Each of these contains an SProperty and a value for that property. Thus the first example adds a property SDATA_TYPE to the TSTAMP_OBJ field with value "TIMESTAMP".

As a convenience the SFD_ constants contain precreated SPropertyValues for simple boolean properties. So the second example is just a short cut for:-

public static final SFieldString DATA_ID = new SFieldString(meta, "DATA_ID", 10, SPRIMARY_KEY.pvalue(Boolean.TRUE)); (Due to a bug in Javadoc (1.3 at least) anonymous classes cannot be used to initiate static constants.)


Inner Class :public static class SPropertySFieldMetas extends SProperty
Inner Class :public static class SPropertySFieldMap extends SProperty
Inner Class :public static class SPropertySRecordMeta extends SProperty
Inner Class :public static class SPropertySFieldIndex extends SProperty
Inner Class :public static class SPropertySTableName extends SProperty
Inner Class :public static class SPropertySDataType extends SProperty
Inner Class :public static class SPropertyNoForeignKey extends SProperty
Inner Class :public static class SPropertySFieldReference extends SProperty
Inner Class :public static class SPropertyInnerForeignKey extends SProperty
Inner Class :public static class SPropertySGeneratedKey extends SProperty
Inner Class :public static class SPropertySSequenceName extends SProperty

Field Summary
final static  SPropertySBYTE_SIZE
     The parameter to the Varchar(...) data type on the Create Table statement.
final static  SPropertySCOLUMN_NAME
     Name of the SQL column.
final static  SPropertySCOLUMN_QUERY
     Query fragment to select value.
final static  SPropertySDATA_TYPE
     The SQL data type of the column.
final static  SPropertySDECIMAL_PRECISION
     The precission and scale of Numerics for BigDecimal.
final static  SPropertySDECIMAL_SCALE
    
final static  SPropertySDESCRIPTIVE
     Only "Descriptive" fields (eg.
final static  SPropertySEXTRA_COLUMN_DDL
     Extra text that is appended blindly after the DDL CREATE TABLE column type information but before the ",".
final static  SPropertySEXTRA_FKEY_DDL
     Extra text that is appended blindly at the very end of a foreign key definition.
final static  SPropertySEXTRA_TABLE_DDL
     Extra text that is appended blindly at the very end of the DDL CREATE TABLE (..., PRIMARY KEY... but before the closing ")".
final static  SPropertyValueSFD_DESCRIPTIVE
    
final static  SPropertyValueSFD_INNER_FOREIGN_KEY
    
final static  SPropertyValueSFD_MANDATORY
    
final static  SPropertyValueSFD_NO_FOREIGN_KEY
    
final static  SPropertyValueSFD_OPTIMISTIC_UNCHECKED
    
final static  SPropertyValueSFD_PRIMARY_KEY
    
final static  SPropertyValueSFD_STRING_CHAR
    
final static  SPropertyValueSFD_UNQUERIED
    
final static  SPropertySFIELD_INDEX
     Index into SFIELD_METAS of an sFieldMeta. ie.
final static  SPropertySFIELD_MAP
     Map of all fields in an SRecordMeta.
final static  SPropertySFIELD_METAS
     The array of fields with in an SRecordMeta.
final static  SPropertySFIELD_NAME
     Arbitrary field name to be used by applications.
final static  SPropertySFIELD_REFERENCE
     If Field A.SFIELD_REFERENCE = Field B then B is a SFieldReference field and A forms a part of that reference. Eg.
final static  SPropertySGENERATED_KEY
     A generated primary key column.
final static  SPropertySINNER_FOREIGN_KEY
     Normally only top level foreign keys are generated.
final static  SPropertySMANDATORY
     The field must not be "empty" when the record is flushed.
final static  SPropertySNO_FOREIGN_KEY
     SFieldReference property that suppresses the generation of Foreign Key constraint DDL.
final static  SPropertySOPTIMISTIC_UNCHECKED
     Suppresses this column being used as a foreign key component. Must be used for database types that cannot be used in WHERE clauses such as Oracle's long type.
final static  SPropertySPRIMARY_KEY
     Indicates which are the primary key field(s). Every record must have a primary key.
final static  SPropertySRECORD_META
     The record that an SFieldMeta is associated with.
static  SPropertySSEQUENCE_NAME
     Name of the sequence to use for the generated key for databases that support them (eg.
final static  SPropertySSTRING_CHAR
     Specifies that the String datatype is to be represented as a CHAR and not a VARCHAR.
static  SPropertySTABLE_NAME
     The table name of this record OR field.
final static  SPropertySUNQUERIED
     SUNQUERIED fields are not normally retrieved by queries unless the SQY_UNQUERIED flag is specified on the query.



Field Detail
SBYTE_SIZE
final static SProperty SBYTE_SIZE(Code)
The parameter to the Varchar(...) data type on the Create Table statement. Note that it is normally the number of bytes, not the number of characters (in UTF-8, say). It is a meaningless number, but most databases demand it. Postgresql does not, and it is not used in that case.



SCOLUMN_NAME
final static SProperty SCOLUMN_NAME(Code)
Name of the SQL column.



SCOLUMN_QUERY
final static SProperty SCOLUMN_QUERY(Code)
Query fragment to select value. May be a subselect. Normally also SUNQUERIED. Never updates.



SDATA_TYPE
final static SProperty SDATA_TYPE(Code)
The SQL data type of the column. For the generic driver this corresponds to the actual type used in the Create Table statement. Warning, these may be mapped by the SDrivers to try to overcome type incompatibilities.



SDECIMAL_PRECISION
final static SProperty SDECIMAL_PRECISION(Code)
The precission and scale of Numerics for BigDecimal. Used to generate NUMERIC(precission, scale) in CREATE TABLE statements.



SDECIMAL_SCALE
final static SProperty SDECIMAL_SCALE(Code)



SDESCRIPTIVE
final static SProperty SDESCRIPTIVE(Code)
Only "Descriptive" fields (eg. Name) will be queried if SQY_DESCRIPTIVE is specified.



SEXTRA_COLUMN_DDL
final static SProperty SEXTRA_COLUMN_DDL(Code)
Extra text that is appended blindly after the DDL CREATE TABLE column type information but before the ",". Can be used for database specific tuning, check clauses etc.



SEXTRA_FKEY_DDL
final static SProperty SEXTRA_FKEY_DDL(Code)
Extra text that is appended blindly at the very end of a foreign key definition. A typical value is " ON DELETE CASCADE". (No attempt is made by SimpleORM to keep the cache consistent with changes to the database made in this way.)



SEXTRA_TABLE_DDL
final static SProperty SEXTRA_TABLE_DDL(Code)
Extra text that is appended blindly at the very end of the DDL CREATE TABLE (..., PRIMARY KEY... but before the closing ")". Can be used for database specific tuning, check clauses etc. This text usually begins with a ",".



SFD_DESCRIPTIVE
final static SPropertyValue SFD_DESCRIPTIVE(Code)



SFD_INNER_FOREIGN_KEY
final static SPropertyValue SFD_INNER_FOREIGN_KEY(Code)



SFD_MANDATORY
final static SPropertyValue SFD_MANDATORY(Code)



SFD_NO_FOREIGN_KEY
final static SPropertyValue SFD_NO_FOREIGN_KEY(Code)



SFD_OPTIMISTIC_UNCHECKED
final static SPropertyValue SFD_OPTIMISTIC_UNCHECKED(Code)



SFD_PRIMARY_KEY
final static SPropertyValue SFD_PRIMARY_KEY(Code)



SFD_STRING_CHAR
final static SPropertyValue SFD_STRING_CHAR(Code)



SFD_UNQUERIED
final static SPropertyValue SFD_UNQUERIED(Code)



SFIELD_INDEX
final static SProperty SFIELD_INDEX(Code)
Index into SFIELD_METAS of an sFieldMeta. ie. field.SRECORD_META.SFIELD_METAS[field.SFIELD_INDEX] == field.



SFIELD_MAP
final static SProperty SFIELD_MAP(Code)
Map of all fields in an SRecordMeta. Same elements as SFIELD_METAS, but a HashMap instead of an array, keyed by the SFIELD_NAME name.

Normally just use SRecordMeta.getField(name) to retrieve fields by name.




SFIELD_METAS
final static SProperty SFIELD_METAS(Code)
The array of fields with in an SRecordMeta.



SFIELD_NAME
final static SProperty SFIELD_NAME(Code)
Arbitrary field name to be used by applications. Defaults to column name or to Column name or prefix or Referenced table name for references.



SFIELD_REFERENCE
final static SProperty SFIELD_REFERENCE(Code)
If Field A.SFIELD_REFERENCE = Field B then B is a SFieldReference field and A forms a part of that reference. Eg. if B = Employee.Department, A=Employee.Dept_Id.



SGENERATED_KEY
final static SProperty SGENERATED_KEY(Code)
A generated primary key column. The value must be an SGenerator subtype. See GeneratedKeyTest.



SINNER_FOREIGN_KEY
final static SProperty SINNER_FOREIGN_KEY(Code)
Normally only top level foreign keys are generated. So PayrollDetail to Payroll is foreign key is normally generated, but not the nested PayrollDetail to Employee. However, this property can be used to enable inner foreign keys to be generated as well. (Rarely used in practice.)



SMANDATORY
final static SProperty SMANDATORY(Code)
The field must not be "empty" when the record is flushed. It may temporarily be empty in the meantime.

In order to avoid the horrible SQL NULL semantics, some databases prefer to store empty string values as "" rather than NULLs (eg. Sybase, MSSQL). For now SMANDATORY just means NOT NULL in create table statements. A java value of "" produces SQL "", a java null produces sql null.

### Additional null semantics will be provided later that unify "" and null to provide output appropriate for the database used. This will make it easier to write database independent code, and avoid horrible bugs when the two are confused.


See Also:   SRecordInstance.isEmpty




SNO_FOREIGN_KEY
final static SProperty SNO_FOREIGN_KEY(Code)
SFieldReference property that suppresses the generation of Foreign Key constraint DDL. Defaults from Record and thence Connection.



SOPTIMISTIC_UNCHECKED
final static SProperty SOPTIMISTIC_UNCHECKED(Code)
Suppresses this column being used as a foreign key component. Must be used for database types that cannot be used in WHERE clauses such as Oracle's long type.



SPRIMARY_KEY
final static SProperty SPRIMARY_KEY(Code)
Indicates which are the primary key field(s). Every record must have a primary key.



SRECORD_META
final static SProperty SRECORD_META(Code)
The record that an SFieldMeta is associated with.



SSEQUENCE_NAME
static SProperty SSEQUENCE_NAME(Code)
Name of the sequence to use for the generated key for databases that support them (eg. Postgresql). Defaults to tablename_SEQ. Boolean.FALSE is a special value that causes the default Select Max algoritm to be used.



SSTRING_CHAR
final static SProperty SSTRING_CHAR(Code)
Specifies that the String datatype is to be represented as a CHAR and not a VARCHAR.



STABLE_NAME
static SProperty STABLE_NAME(Code)
The table name of this record OR field.



SUNQUERIED
final static SProperty SUNQUERIED(Code)
SUNQUERIED fields are not normally retrieved by queries unless the SQY_UNQUERIED flag is specified on the query. Typically large, rarely used fields.





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