Package simpleorm.dataset
Class SFieldScalar
java.lang.Object
simpleorm.dataset.SFieldMeta
simpleorm.dataset.SFieldScalar
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- SFieldBigDecimal,- SFieldBlob,- SFieldBoolean,- SFieldBytes,- SFieldDate,- SFieldDouble,- SFieldEnum,- SFieldInteger,- SFieldLong,- SFieldObject,- SFieldString,- SFieldTime,- SFieldTimestamp
Scalar fields such as String, Int, but not References to other tables.
 Only scalars are actually stored in tables.
 It is scalars that are marked as primary keys etc.
- See Also:
- 
Field SummaryFieldsFields inherited from class simpleorm.dataset.SFieldMetaquoteName
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract StringThe default data type if not overriden by overrideSqlDataType.The column name, which for now is the same as the field name but that may change.Object[]intprotected List<SFieldReference>booleanIs this field part of at least one forign key ?booleanbooleanbooleanbooleanabstract int<T extends SFieldScalar>
 ToverrideSqlDataType(String dataType) If set, this overrides the entire column data type string generated in the CREATE TABLE string<T extends SFieldScalar>
 TsetGeneratorMode(SGeneratorMode gen, Object... gParams) Sets the generator associated to this field.protected voidsetMaxSize(int maxSize) voidsetTheGenerator(Object theGenerator) Lists all the details of the field.Methods inherited from class simpleorm.dataset.SFieldMetaaddFlag, addValidator, convertToDataSetFieldType, doValidate, equals, getFieldName, getFlags, getRecordMeta, getUserProperties, getUserProperty, getValidators, hashCode, isDescriptive, isUnqueried, nextGeneratedValue, putUserProperty, queryFieldValue, readResolve, setQuoted, toString, writeFieldValue, writeFieldValue
- 
Field Details- 
sqlDataTypeOverride
- 
theGenerator
 
- 
- 
Constructor Details- 
SFieldScalar
 
- 
- 
Method Details- 
overrideSqlDataTypeIf set, this overrides the entire column data type string generated in the CREATE TABLE string
- 
defaultSqlDataTypeThe default data type if not overriden by overrideSqlDataType. This is only called when the data type is actually needed by CREATE TABLE, ie if no sqlDataTypeOverride is specified.
- 
javaSqlTypepublic abstract int javaSqlType()- Returns:
- int constant from java.sql.Types, used for setting sql datatype with null values
 
- 
isMandatorypublic boolean isMandatory()- Overrides:
- isMandatoryin class- SFieldMeta
 
- 
isGeneratedpublic boolean isGenerated()
- 
isPrimarypublic boolean isPrimary()
- 
isNotOptimisticLockedpublic boolean isNotOptimisticLocked()
- 
getColumnNameThe column name, which for now is the same as the field name but that may change.
- 
getReferences
- 
toLongerStringDescription copied from class:SFieldMetaLists all the details of the field.- Specified by:
- toLongerStringin class- SFieldMeta
 
- 
isForeignKeypublic boolean isForeignKey()Is this field part of at least one forign key ?- Overrides:
- isForeignKeyin class- SFieldMeta
 
- 
setGeneratorModeSets the generator associated to this field. This will make the field generated, reference the generator for future use and **remove any NotNullValidaotr*** (so if you want to add one, do it after you call setGenerator)
- 
getGeneratorMode
- 
getGeneratorParameter
- 
getTheGenerator
- 
setTheGenerator
- 
setMaxSizeprotected void setMaxSize(int maxSize) 
- 
getMaxSizepublic int getMaxSize()
 
-