Class SFieldScalar

    • Field Detail

      • sqlDataTypeOverride

        public java.lang.String sqlDataTypeOverride
      • theGenerator

        public java.lang.Object theGenerator
    • Constructor Detail

      • SFieldScalar

        public SFieldScalar​(SRecordMeta sRecord,
                            java.lang.String fieldName,
                            SFieldFlags... pvals)
    • Method Detail

      • overrideSqlDataType

        public <T extends SFieldScalar> T overrideSqlDataType​(java.lang.String dataType)
        If set, this overrides the entire column data type string generated in the CREATE TABLE string
      • defaultSqlDataType

        public abstract java.lang.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
      • isGenerated

        public boolean isGenerated()
      • isPrimary

        public boolean isPrimary()
      • isNotOptimisticLocked

        public boolean isNotOptimisticLocked()
      • getColumnName

        public java.lang.String getColumnName()
        The column name, which for now is the same as the field name but that may change.
      • getReferences

        protected java.util.List<SFieldReference> getReferences()
      • toLongerString

        public java.lang.String toLongerString()
        Description copied from class: SFieldMeta
        Lists all the details of the field.
        Specified by:
        toLongerString in class SFieldMeta
      • isForeignKey

        public boolean isForeignKey()
        Is this field part of at least one forign key ?
        Overrides:
        isForeignKey in class SFieldMeta
      • setGeneratorMode

        public <T extends SFieldScalar> T setGeneratorMode​(SGeneratorMode gen,
                                                           java.lang.Object... gParams)
        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)
      • getGeneratorParameter

        public java.lang.Object[] getGeneratorParameter()
      • getTheGenerator

        public java.lang.Object getTheGenerator()
      • setTheGenerator

        public void setTheGenerator​(java.lang.Object theGenerator)
      • setMaxSize

        protected void setMaxSize​(int maxSize)
      • getMaxSize

        public int getMaxSize()