Package org.hibernate.mapping
Class Formula
- java.lang.Object
-
- org.hibernate.mapping.Formula
-
- All Implemented Interfaces:
Serializable
,Selectable
public class Formula extends Object implements Selectable, Serializable
A mapping model object representing a SQL formula which is used as a "derived"Column
in an entity mapping.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getAlias(Dialect dialect)
String
getAlias(Dialect dialect, Table table)
String
getCustomReadExpression()
Any custom read expression for this selectable.String
getCustomWriteExpression()
Any custom write expression for this selectable.String
getFormula()
String
getTemplate(Dialect dialect, TypeConfiguration typeConfiguration, SqmFunctionRegistry registry)
String
getText()
The selectable's "canonical" text representationString
getText(Dialect dialect)
The selectable's text representation accounting for the Dialect's quoting, if quotedint
hashCode()
boolean
isFormula()
Does this selectable represent a formula?true
indicates it is a formula;false
indicates it is a physical columnvoid
setFormula(String string)
String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hibernate.mapping.Selectable
getWriteExpr, getWriteExpr
-
-
-
-
Constructor Detail
-
Formula
public Formula()
-
Formula
public Formula(String formula)
-
-
Method Detail
-
getTemplate
public String getTemplate(Dialect dialect, TypeConfiguration typeConfiguration, SqmFunctionRegistry registry)
- Specified by:
getTemplate
in interfaceSelectable
-
getText
public String getText(Dialect dialect)
Description copied from interface:Selectable
The selectable's text representation accounting for the Dialect's quoting, if quoted- Specified by:
getText
in interfaceSelectable
-
getText
public String getText()
Description copied from interface:Selectable
The selectable's "canonical" text representation- Specified by:
getText
in interfaceSelectable
-
getCustomReadExpression
public String getCustomReadExpression()
Description copied from interface:Selectable
Any custom read expression for this selectable. Only pertinent for physical columns (not formulas)- Specified by:
getCustomReadExpression
in interfaceSelectable
- See Also:
ColumnTransformer
-
getCustomWriteExpression
public String getCustomWriteExpression()
Description copied from interface:Selectable
Any custom write expression for this selectable. Only pertinent for physical columns (not formulas)- Specified by:
getCustomWriteExpression
in interfaceSelectable
- See Also:
ColumnTransformer
-
getAlias
public String getAlias(Dialect dialect)
- Specified by:
getAlias
in interfaceSelectable
-
getAlias
public String getAlias(Dialect dialect, Table table)
- Specified by:
getAlias
in interfaceSelectable
-
getFormula
public String getFormula()
-
setFormula
public void setFormula(String string)
-
isFormula
public boolean isFormula()
Description copied from interface:Selectable
Does this selectable represent a formula?true
indicates it is a formula;false
indicates it is a physical column- Specified by:
isFormula
in interfaceSelectable
-
-