Package com.querydsl.sql
Class ColumnMetadata
java.lang.Object
com.querydsl.sql.ColumnMetadata
- All Implemented Interfaces:
Serializable
Provides metadata like the column name, JDBC type and constraints
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic ColumnMetadatagetColumnMetadata(Path<?> path) Returns this path's column metadata if present.intthe number of fractional digitsintgetIndex()intgetName()static StringExtract the column name for the given path, returns the path name, if no ColumnMetadata is attachedintgetSize()For char or date types this is the maximum number of characters, for numeric or decimal types this is precision.booleaninthashCode()booleanbooleanhasSize()booleanstatic ColumnMetadataCreates default column meta data with the given column name, but without any type or constraint information.notNull()ofType(int jdbcType) withDigits(int decimalDigits) withIndex(int index) withSize(int size)
-
Method Details
-
getColumnMetadata
Returns this path's column metadata if present. Otherwise returns default metadata where the column name is equal to the path's name. -
getName
Extract the column name for the given path, returns the path name, if no ColumnMetadata is attached- Parameters:
path- patch- Returns:
- column name or path name
-
named
Creates default column meta data with the given column name, but without any type or constraint information. Use the fluent builder methods to further configure it.- Throws:
NullPointerException- if the name is null
-
getName
-
getIndex
public int getIndex() -
withIndex
-
getJdbcType
public int getJdbcType() -
hasJdbcType
public boolean hasJdbcType() -
ofType
-
isNullable
public boolean isNullable() -
notNull
-
getSize
public int getSize()For char or date types this is the maximum number of characters, for numeric or decimal types this is precision.- Returns:
- size
-
hasSize
public boolean hasSize() -
withSize
-
getDigits
public int getDigits()the number of fractional digits- Returns:
- digits
-
hasDigits
public boolean hasDigits() -
withDigits
-
equals
-
hashCode
public int hashCode()
-