T - the type of the attribute that this mapping is attached topublic class AnyMapping<T> extends Object
Any,
ManyToAny| Modifier and Type | Field and Description |
|---|---|
private Map<Class<?>,ColumnExpression> |
anyClasses
Contains the mapping from a class to its id in the database.
|
private GeneratorColumn |
column
The column that contains the identifier of the type according to the
meta definition. |
private static Map<String,Supplier<? extends ValueConverter<?>>> |
META_TYPES |
| Constructor and Description |
|---|
AnyMapping(GeneratorContext context,
AttributeAccessor attribute,
GeneratorTable containerTabble,
javax.persistence.Column typeColumn,
String metaDefName)
Creates a new instance of
AnyMapping. |
| Modifier and Type | Method and Description |
|---|---|
private void |
fillMetaDefs(AttributeAccessor attribute,
javax.persistence.Column typeColumn,
String metaDefName,
GeneratorContext context) |
private ColumnExpression |
findDesc(T entity) |
private static org.hibernate.annotations.AnyMetaDef |
findElementMetaDef(AnnotatedElement element,
String metaDefName) |
private org.hibernate.annotations.AnyMetaDef |
findGlobalMetaDef(AttributeAccessor attribute,
String metaDefName) |
private org.hibernate.annotations.AnyMetaDef |
findMetaDefInClassHierarchy(Class<?> entityClass,
String metaDefName) |
private org.hibernate.annotations.AnyMetaDef |
findMetaDefInPackageHierarchy(Package classPackage,
String metaDefName) |
GeneratorColumn |
getColumn()
The column that contains the identifier of the type according to the
meta definition. |
String |
getPredicate(T value)
Builds a predicate to find the row with the given value.
|
void |
setColumnValue(TableStatement statement,
T value)
Sets the mapping value for the given value to the statement.
|
private static final Map<String,Supplier<? extends ValueConverter<?>>> META_TYPES
private final GeneratorColumn column
meta definition.private final Map<Class<?>,ColumnExpression> anyClasses
public AnyMapping(GeneratorContext context, AttributeAccessor attribute, GeneratorTable containerTabble, javax.persistence.Column typeColumn, String metaDefName)
AnyMapping.context - the current generation contextattribute - the attribute that this mapping is attached tocontainerTabble - the table that contains the type columntypeColumn - contains the meta information about the generated type columnmetaDefName - the name of the global meta definition, if any is used (otherwise the one from the attribute is used)private static org.hibernate.annotations.AnyMetaDef findElementMetaDef(AnnotatedElement element, String metaDefName)
private void fillMetaDefs(AttributeAccessor attribute, javax.persistence.Column typeColumn, String metaDefName, GeneratorContext context)
private ColumnExpression findDesc(T entity)
private org.hibernate.annotations.AnyMetaDef findGlobalMetaDef(AttributeAccessor attribute, String metaDefName)
private org.hibernate.annotations.AnyMetaDef findMetaDefInClassHierarchy(Class<?> entityClass, String metaDefName)
private org.hibernate.annotations.AnyMetaDef findMetaDefInPackageHierarchy(Package classPackage, String metaDefName)
public String getPredicate(T value)
value - the current value to find as rowpublic void setColumnValue(TableStatement statement, T value)
statement - the statement of the current rowvalue - the value of the current rowpublic GeneratorColumn getColumn()
meta definition.Copyright © 2026 fastnate.org. All rights reserved.