Class TableFieldDef
- java.lang.Object
-
- jetbrains.buildServer.serverSide.db.schema.TableFieldDef
-
-
Constructor Summary
Constructors Constructor Description TableFieldDef(String name, BaseType type, boolean mandatory, String defaultValue)
Deprecated.use#TableFieldDef(String, TypeDef, boolean, boolean, String)
TableFieldDef(String name, BaseType type, int length, boolean mandatory, String defaultValue)
Deprecated.use#TableFieldDef(String, TypeDef, boolean, boolean, String)
TableFieldDef(String name, TypeDef type, boolean mandatory, boolean serial, boolean defines, boolean refers, String def)
Trivial constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
BaseType
getBaseType()
Base type.String
getDefault()
SQL expression for the default value.DomainDef
getDomain()
Domain, if assigned.int
getLength()
Field length, in characters.String
getName()
Field name.int
getScale()
TypeDef
getType()
Data type.int
hashCode()
boolean
isDefines()
Returns true if the type of the field is a domain (e.g.boolean
isMandatory()
Mandatority.boolean
isRefers()
boolean
isSerial()
Serial: new values for this field are obtained using a kind of sequence.String
toString()
-
-
-
Constructor Detail
-
TableFieldDef
public TableFieldDef(@NotNull String name, @NotNull TypeDef type, boolean mandatory, boolean serial, boolean defines, boolean refers, @Nullable String def)
Trivial constructor.- Parameters:
name
- field name.type
- data type.mandatory
- mandatority.serial
-def
- default-value expression.- Since:
- 9.0
-
TableFieldDef
@Deprecated public TableFieldDef(@NotNull String name, @NotNull BaseType type, boolean mandatory, @Nullable String defaultValue)
Deprecated.use#TableFieldDef(String, TypeDef, boolean, boolean, String)
Old constructor.- Parameters:
aDefault
-name
- field name.type
- data type; can contain macros.mandatory
- true - mandatory (not null), false - optional (nullable).
-
TableFieldDef
@Deprecated public TableFieldDef(@NotNull String name, @NotNull BaseType type, int length, boolean mandatory, @Nullable String defaultValue)
Deprecated.use#TableFieldDef(String, TypeDef, boolean, boolean, String)
Old constructor.- Parameters:
name
- field name.type
- data type; can contain macros.length
- length in characters.mandatory
- true - mandatory (not null), false - optional (nullable).aDefault
-
-
-
Method Detail
-
getName
@NotNull public String getName()
Field name.- Returns:
- the field name, in lower case.
-
getType
@NotNull public TypeDef getType()
Data type.- Returns:
- data type.
- Since:
- 9.0
-
getDomain
@Nullable public DomainDef getDomain()
Domain, if assigned.- Returns:
- domain is assigned, or null otherwise.
- Since:
- 9.0
-
isDefines
public boolean isDefines()
Returns true if the type of the field is a domain (e.g.getDomain()
returns non-null value) and the field defines its value.
-
isRefers
public boolean isRefers()
-
getBaseType
@NotNull public BaseType getBaseType()
Base type. Can contain macros.- Returns:
- base type.
-
getLength
public int getLength()
Field length, in characters.- Returns:
- length, in characters.
-
getScale
public int getScale()
-
isMandatory
public boolean isMandatory()
Mandatority.- Returns:
- true - mandatory (not null), false - optional (nullable).
-
isSerial
public boolean isSerial()
Serial: new values for this field are obtained using a kind of sequence. A.k.a. auto-increment.- Returns:
- true - serial.
- Since:
- 9.0
-
getDefault
@Nullable public String getDefault()
SQL expression for the default value.- Returns:
- see above.
-
-