Package ru.curs.celesta.dbutils.meta
Class DbColumnInfo
- java.lang.Object
-
- ru.curs.celesta.dbutils.meta.DbColumnInfo
-
public final class DbColumnInfo extends Object
Column data in the database in form that is needed for Celesta.
-
-
Field Summary
Fields Modifier and Type Field Description static String
SEQUENCE_NEXT_VAL_PATTERN
Pattern for getting auto incremented value from a sequence.
-
Constructor Summary
Constructors Constructor Description DbColumnInfo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDefaultValue()
Column default value.int
getLength()
Column length.String
getName()
Returns column name.int
getScale()
Class<? extends Column<?>>
getType()
Returns column type.boolean
isMax()
boolean
isNullable()
Whether column is nullable.boolean
reflects(Column<?> value)
void
setDefaultValue(String defaultValue)
Sets column default value.void
setLength(int length)
Sets column length.void
setMax(boolean max)
void
setName(String name)
Sets column name.void
setNullable(boolean nullable)
Sets if column is nullable.void
setScale(int scale)
void
setType(Class<? extends Column<?>> type)
Sets column type.
-
-
-
Field Detail
-
SEQUENCE_NEXT_VAL_PATTERN
public static final String SEQUENCE_NEXT_VAL_PATTERN
Pattern for getting auto incremented value from a sequence.- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public String getName()
Returns column name.
-
isNullable
public boolean isNullable()
Whether column is nullable.
-
getDefaultValue
public String getDefaultValue()
Column default value.
-
getLength
public int getLength()
Column length.
-
isMax
public boolean isMax()
-
setName
public void setName(String name)
Sets column name.- Parameters:
name
- column name
-
setType
public void setType(Class<? extends Column<?>> type)
Sets column type.- Parameters:
type
- column type
-
setNullable
public void setNullable(boolean nullable)
Sets if column is nullable.- Parameters:
nullable
-true
if column is nullable otherwisefalse
-
setDefaultValue
public void setDefaultValue(String defaultValue)
Sets column default value.- Parameters:
defaultValue
- column default value
-
setLength
public void setLength(int length)
Sets column length.- Parameters:
length
- column length
-
getScale
public int getScale()
-
setScale
public void setScale(int scale)
-
setMax
public void setMax(boolean max)
-
reflects
public boolean reflects(Column<?> value)
-
-