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 Summary
FieldsFields inherited from class simpleorm.dataset.SFieldMeta
quoteName
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract String
The 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[]
int
protected List<SFieldReference>
boolean
Is this field part of at least one forign key ?boolean
boolean
boolean
boolean
abstract 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 void
setMaxSize
(int maxSize) void
setTheGenerator
(Object theGenerator) Lists all the details of the field.Methods inherited from class simpleorm.dataset.SFieldMeta
addFlag, 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
-
overrideSqlDataType
If set, this overrides the entire column data type string generated in the CREATE TABLE string -
defaultSqlDataType
The 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. -
javaSqlType
public abstract int javaSqlType()- Returns:
- int constant from java.sql.Types, used for setting sql datatype with null values
-
isMandatory
public boolean isMandatory()- Overrides:
isMandatory
in classSFieldMeta
-
isGenerated
public boolean isGenerated() -
isPrimary
public boolean isPrimary() -
isNotOptimisticLocked
public boolean isNotOptimisticLocked() -
getColumnName
The column name, which for now is the same as the field name but that may change. -
getReferences
-
toLongerString
Description copied from class:SFieldMeta
Lists all the details of the field.- Specified by:
toLongerString
in classSFieldMeta
-
isForeignKey
public boolean isForeignKey()Is this field part of at least one forign key ?- Overrides:
isForeignKey
in classSFieldMeta
-
setGeneratorMode
Sets 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
-
setMaxSize
protected void setMaxSize(int maxSize) -
getMaxSize
public int getMaxSize()
-