Class Column
java.lang.Object
io.github.mfvanek.pg.model.column.Column
- All Implemented Interfaces:
ColumnNameAware
,DbObject
,TableNameAware
,Comparable<Column>
@Immutable
public class Column
extends Object
implements DbObject, ColumnNameAware, Comparable<Column>
A representation of column in database table.
- Since:
- 0.5.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
final boolean
Gets column name in the table.final String
getName()
Gets database object name.Gets table name.final int
hashCode()
boolean
Shows whether column can or cannot accept null values.static Column
static Column
ofNullable
(String tableName, String columnName) toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.github.mfvanek.pg.model.column.ColumnNameAware
isNullable
-
Constructor Details
-
Column
-
-
Method Details
-
getName
Gets database object name. -
getTableName
Gets table name.- Specified by:
getTableName
in interfaceTableNameAware
- Returns:
- table name
-
getColumnName
Gets column name in the table.- Specified by:
getColumnName
in interfaceColumnNameAware
- Returns:
- column name
-
isNotNull
public boolean isNotNull()Shows whether column can or cannot accept null values.- Specified by:
isNotNull
in interfaceColumnNameAware
- Returns:
- true if column cannot accept null values
-
toString
-
equals
-
hashCode
public final int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<Column>
-
ofNotNull
-
ofNullable
-