public class EntityConverter extends Object implements ValueConverter<Object>
Constructor and Description |
---|
EntityConverter() |
Modifier and Type | Method and Description |
---|---|
static ColumnExpression |
getEntityReference(Object entity,
String mappedId,
GeneratorContext context,
boolean whereExpression)
Creates an expression for an entity.
|
ColumnExpression |
getExpression(Object value,
GeneratorContext context)
Builds the expression for writing the given value into an SQL clause.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getExpression
public static ColumnExpression getEntityReference(Object entity, String mappedId, GeneratorContext context, boolean whereExpression)
entity
- the entitymappedId
- the property that contains the id, only interesting if the id is an EmbeddedProperty
context
- the current database contextwhereExpression
- indicates that the reference is used in a "where" statementnull
if the entity was not written up to nowpublic ColumnExpression getExpression(Object value, GeneratorContext context)
ValueConverter
getExpression
in interface ValueConverter<Object>
value
- the current valuecontext
- the current context (contains the database dialect).Copyright © 2022 fastnate.org. All rights reserved.