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 booleanequals(Object o)BaseTypegetBaseType()Base type.StringgetDefault()SQL expression for the default value.DomainDefgetDomain()Domain, if assigned.intgetLength()Field length, in characters.StringgetName()Field name.intgetScale()TypeDefgetType()Data type.inthashCode()booleanisDefines()Returns true if the type of the field is a domain (e.g.booleanisMandatory()Mandatority.booleanisRefers()booleanisSerial()Serial: new values for this field are obtained using a kind of sequence.StringtoString()
-
-
-
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.
-
-