Package simpleorm.dataset
Class SRecordMeta<T extends SRecordInstance>
java.lang.Object
simpleorm.dataset.SRecordMeta<T>
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- RecordMeta
Defines the meta data for a 
SRecordInstance such as the table name.
 Details about each field are stored in SFieldMeta refered to from
 this object.
 Thus Instance Variables of this class only describe the definition of a Record, not instances or connections.
 This class also contains routines to create new SRecordInstancees
 such as #findOrCreate and #select. (This packaging makes the
 calls shorter than using a static method on SRecordInstance.)
 
- See Also:
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionSRecordMeta(Class<T> userClass, String tableName) Create a new table/record definition.
- 
Method SummaryModifier and TypeMethodDescriptionfieldsForMode(SSelectMode selectMode) Returns SFieldMetas that are updated to select given SelectMode.Returns the field by its name, or null if not found.All the field names.Get the scalar primary key fields meta for this record meta<T> TgetUserProperty(Object key) putUserProperty(Object key, Object value) protected ObjectSRecordMeta is like a singleton, in that only one instance of SRecordMeta must exist in the VM for a specific table.setQuoted(boolean quote) Causes the generated sql to quote ("") the table name.Displays all columnstoString()
- 
Field Details- 
quoteNamepublic boolean quoteName
 
- 
- 
Constructor Details- 
SRecordMetaCreate a new table/record definition.- Parameters:
- userClass- an instance of the class this RecordMeta holds the metadata for (ie T )
- tableName- The name of the SQL table that will be associated with this record.
 
 
- 
- 
Method Details- 
readResolveSRecordMeta is like a singleton, in that only one instance of SRecordMeta must exist in the VM for a specific table. This is a special method used during de-serialization to determine if the object de-serialized should be substituted. This method is implemented to return the SRecordMeta object for the appropriate user Class that already exists.(This method is reflected into and magically called by serialization.) - Throws:
- ObjectStreamException
 
- 
getFieldMetas- Returns:
- the an unmodifiable view of the field metas (both Scalar and References)
 
- 
fieldsForModeReturns SFieldMetas that are updated to select given SelectMode.
- 
getPrimaryKeysGet the scalar primary key fields meta for this record meta- Returns:
- a readonly list of the primary key Fields meta of the record meta
 
- 
getQueriedScalarFields
- 
getAllScalarFields
- 
getDescriptiveScalarFields
- 
toString
- 
toLongerStringDisplays all columns
- 
getUserClass
- 
getFieldNamesAll the field names. use getField to look up the actual field.
- 
getFieldReturns the field by its name, or null if not found.
- 
getTableName
- 
setQuotedCauses the generated sql to quote ("") the table name. Makes it case sensitive, allows reserved words and odd characters. Beware that Postgresql (only) defaults to lower case, not upper case.
- 
putUserProperty
- 
getUserProperty
- 
getUserProperties
 
-