Class AbstractAttribute<X,Y>
java.lang.Object
com.blazebit.persistence.view.impl.metamodel.AbstractAttribute<X,Y>
- All Implemented Interfaces:
Attribute<X,Y>
- Direct Known Subclasses:
AbstractMethodAttribute,AbstractParameterAttribute
- Since:
- 1.0.0
- Author:
- Christian Beikov
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.blazebit.persistence.view.metamodel.Attribute
Attribute.AttributeType, Attribute.MappingType, Attribute.MemberType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected final Class<?>protected final Class<?>protected final Stringprotected final Expressionprotected final Stringprotected final Stringprotected final Class<? extends CorrelationProvider>protected final CorrelationProviderFactoryprotected final Stringprotected final Expressionprotected final ManagedViewTypeImplementor<X>protected static final String[]protected final String[]protected final FetchStrategyprotected final booleanprotected final booleanprotected final Stringprotected final Stringprotected final Expressionprotected final Attribute.MappingTypeprotected final Stringprotected final List<OrderByItem>protected final Stringprotected final Stringprotected final Class<? extends SubqueryProvider>protected final SubqueryProviderFactoryprotected final Expressionprotected final javax.persistence.metamodel.Attribute<?,?> -
Constructor Summary
ConstructorsConstructorDescriptionAbstractAttribute(ManagedViewTypeImplementor<X> declaringType, AttributeMapping mapping, MetamodelBuildingContext context, EmbeddableOwner embeddableMapping) -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckAttribute(javax.persistence.metamodel.ManagedType<?> managedType, MetamodelBuildingContext context) voidcheckNestedAttribute(List<AbstractAttribute<?, ?>> parents, javax.persistence.metamodel.ManagedType<?> managedType, MetamodelBuildingContext context, boolean hasMultisetParent) protected final CollectionInstantiatorImplementor<?,?> createCollectionInstantiator(MetamodelBuildingContext context, PluralObjectFactory<? extends Collection<?>> collectionFactory, boolean indexed, boolean sorted, boolean ordered, Comparator comparator) protected final MapInstantiatorImplementor<?,?> createMapInstantiator(MetamodelBuildingContext context, PluralObjectFactory<? extends Map<?, ?>> mapFactory, boolean sorted, boolean ordered, Comparator comparator) protected static ExpressioncreateSimpleExpression(String expression, AttributeMapping mapping, MetamodelBuildingContext context, AbstractAttribute.ExpressionLocation expressionLocation) protected final ContainerAccumulator<?>createValueContainerAccumulator(Comparator<Object> comparator) protected booleanprotected StringdetermineIndexMapping(AttributeMapping mapping) protected StringdetermineKeyMapping(AttributeMapping mapping) protected abstract Map<ManagedViewTypeImplementor<?>,String> final intabstract CollectionInstantiatorImplementor<?,?> getCollectionJoinMappings(javax.persistence.metamodel.ManagedType<?> managedType, MetamodelBuildingContext context) Collects all mappings that involve the use of a collection attribute for duplicate usage checks.protected abstract PluralAttribute.CollectionTypeabstract ContainerAccumulator<?>Class<?>Class<?>final Stringfinal Class<? extends CorrelationProvider>final Stringfinal ManagedViewTypeImplementor<X>protected abstract PluralAttribute.ElementCollectionTypeabstract Type<?>final String[]final FetchStrategyprotected String[]protected abstract Type<?>final Stringabstract Stringabstract MapInstantiatorImplementor<?,?> abstract Stringfinal Stringfinal Attribute.MappingTypefinal Stringfinal List<OrderByItem>final Stringfinal Stringfinal Class<? extends SubqueryProvider>final SubqueryProviderFactoryprotected abstract Class[]javax.persistence.metamodel.Attribute<?,?> abstract booleanbooleanbooleanbooleanbooleanprotected abstract booleanprotected abstract booleanprotected abstract booleanprotected abstract booleanprotected booleanprotected booleanprotected abstract booleanfinal booleanisId()protected abstract booleanprotected abstract booleanabstract booleanabstract booleanfinal booleanprotected abstract booleanisSorted()final booleanabstract booleanabstract booleanbooleanprotected abstract Map<ManagedViewTypeImplementor<?>,String> abstract booleanstatic List<OrderByItem>parseOrderByItems(List<String> orderByItemExpressions) final voidrenderCorrelationBasis(String parent, ServiceProvider serviceProvider, StringBuilder sb) final voidrenderCorrelationResult(String parent, ServiceProvider serviceProvider, StringBuilder sb) protected final voidrenderExpression(String parent, Expression expression, String aliasToSkip, ServiceProvider serviceProvider, StringBuilder sb) <T extends LimitBuilder<?> & OrderByBuilder<?>>
voidrenderLimit(String parent, ParameterHolder<?> parameterHolder, Map<String, Object> optionalParameters, T builder) final voidrenderMapping(String parent, ServiceProvider serviceProvider, StringBuilder sb) final voidrenderSubqueryExpression(String parent, ServiceProvider serviceProvider, StringBuilder sb) final voidrenderSubqueryExpression(String parent, String subqueryExpression, String subqueryAlias, ServiceProvider serviceProvider, StringBuilder sb) static StringreplaceThisFromMapping(String mapping, String root) static StringstripThisFromMapping(String mapping) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.blazebit.persistence.view.metamodel.Attribute
getAttributeType, getMemberType, isCollection, isCorrelated, isSubview
-
Field Details
-
EMPTY
-
declaringType
-
javaType
-
convertedJavaType
-
mapping
-
mappingExpression
-
fetches
-
fetchStrategy
-
batchSize
protected final int batchSize -
orderByItems
-
limitExpression
-
offsetExpression
-
subqueryProviderFactory
-
subqueryProvider
-
subqueryExpression
-
subqueryResultExpression
-
subqueryAlias
-
correlationProviderFactory
-
correlationProvider
-
correlationBasis
-
correlationResult
-
correlationKeyAlias
-
correlationExpression
-
correlationBasisExpression
-
correlationResultExpression
-
mappingType
-
id
protected final boolean id -
isAggregate
protected final boolean isAggregate -
updateMappableAttribute
protected final javax.persistence.metamodel.Attribute<?,?> updateMappableAttribute
-
-
Constructor Details
-
AbstractAttribute
public AbstractAttribute(ManagedViewTypeImplementor<X> declaringType, AttributeMapping mapping, MetamodelBuildingContext context, EmbeddableOwner embeddableMapping)
-
-
Method Details
-
parseOrderByItems
-
createSimpleExpression
protected static Expression createSimpleExpression(String expression, AttributeMapping mapping, MetamodelBuildingContext context, AbstractAttribute.ExpressionLocation expressionLocation) -
stripThisFromMapping
-
replaceThisFromMapping
-
renderSubqueryExpression
public final void renderSubqueryExpression(String parent, ServiceProvider serviceProvider, StringBuilder sb) -
renderSubqueryExpression
public final void renderSubqueryExpression(String parent, String subqueryExpression, String subqueryAlias, ServiceProvider serviceProvider, StringBuilder sb) -
renderCorrelationBasis
public final void renderCorrelationBasis(String parent, ServiceProvider serviceProvider, StringBuilder sb) -
renderCorrelationResult
public final void renderCorrelationResult(String parent, ServiceProvider serviceProvider, StringBuilder sb) -
renderMapping
-
renderExpression
protected final void renderExpression(String parent, Expression expression, String aliasToSkip, ServiceProvider serviceProvider, StringBuilder sb) -
renderLimit
public <T extends LimitBuilder<?> & OrderByBuilder<?>> void renderLimit(String parent, ParameterHolder<?> parameterHolder, Map<String, Object> optionalParameters, T builder) - Specified by:
renderLimitin interfaceAttribute<X,Y>
-
getCollectionJoinMappings
public Map<String,Boolean> getCollectionJoinMappings(javax.persistence.metamodel.ManagedType<?> managedType, MetamodelBuildingContext context) Collects all mappings that involve the use of a collection attribute for duplicate usage checks.- Parameters:
managedType- The JPA type against which to evaluate the mappingcontext- The metamodel context- Returns:
- The mappings which contain collection attribute uses
-
hasJoinFetchedCollections
public boolean hasJoinFetchedCollections() -
hasSelectOrSubselectFetchedAttributes
public boolean hasSelectOrSubselectFetchedAttributes() -
hasJpaManagedAttributes
public boolean hasJpaManagedAttributes() -
determineIndexMapping
-
determineKeyMapping
-
determineForcedUnique
-
getUpdateMappableAttribute
public javax.persistence.metamodel.Attribute<?,?> getUpdateMappableAttribute() -
isFilterNulls
protected boolean isFilterNulls() -
isUpdateMappable
public boolean isUpdateMappable() -
getCorrelationKeyAlias
-
getCorrelationExpression
-
getCorrelationPredicate
-
needsDirtyTracker
public abstract boolean needsDirtyTracker() -
hasDirtyStateIndex
public abstract boolean hasDirtyStateIndex() -
checkAttribute
public void checkAttribute(javax.persistence.metamodel.ManagedType<?> managedType, MetamodelBuildingContext context) -
isDisallowOwnedUpdatableSubview
protected abstract boolean isDisallowOwnedUpdatableSubview() -
checkNestedAttribute
public void checkNestedAttribute(List<AbstractAttribute<?, ?>> parents, javax.persistence.metamodel.ManagedType<?> managedType, MetamodelBuildingContext context, boolean hasMultisetParent) -
isEmbedded
protected boolean isEmbedded() -
getTypeArguments
-
getLocation
-
isUpdatable
public abstract boolean isUpdatable() -
isMutable
public abstract boolean isMutable() -
getMappedBy
-
isUpdateCascaded
public abstract boolean isUpdateCascaded() -
getUpdateCascadeAllowedSubtypes
-
isIndexed
protected abstract boolean isIndexed() -
isSorted
protected abstract boolean isSorted() -
isForcedUnique
protected abstract boolean isForcedUnique() -
isElementCollectionOrdered
protected abstract boolean isElementCollectionOrdered() -
isElementCollectionSorted
protected abstract boolean isElementCollectionSorted() -
isElementCollectionForcedUnique
protected abstract boolean isElementCollectionForcedUnique() -
getCollectionType
-
getElementCollectionType
-
getElementType
-
elementInheritanceSubtypeMappings
-
getKeyFetches
-
getKeyMappingExpression
-
getMappingIndexExpression
-
getKeyType
-
keyInheritanceSubtypeMappings
-
isKeySubview
protected abstract boolean isKeySubview() -
getAllowedSubtypes
-
getParentRequiringUpdateSubtypes
-
getParentRequiringCreateSubtypes
-
isOptimizeCollectionActionsEnabled
public abstract boolean isOptimizeCollectionActionsEnabled() -
getContainerAccumulator
-
getCollectionInstantiator
-
getMapInstantiator
-
createValueContainerAccumulator
protected final ContainerAccumulator<?> createValueContainerAccumulator(Comparator<Object> comparator) -
createCollectionInstantiator
protected final CollectionInstantiatorImplementor<?,?> createCollectionInstantiator(MetamodelBuildingContext context, PluralObjectFactory<? extends Collection<?>> collectionFactory, boolean indexed, boolean sorted, boolean ordered, Comparator comparator) -
createMapInstantiator
protected final MapInstantiatorImplementor<?,?> createMapInstantiator(MetamodelBuildingContext context, PluralObjectFactory<? extends Map<?, ?>> mapFactory, boolean sorted, boolean ordered, Comparator comparator) -
getMappingType
- Specified by:
getMappingTypein interfaceAttribute<X,Y>
-
isQueryParameter
public final boolean isQueryParameter() -
isId
public final boolean isId() -
getSubqueryProviderFactory
-
getSubqueryProvider
-
getSubqueryExpression
-
getSubqueryAlias
-
getCorrelationProviderFactory
-
getCorrelationProvider
-
getCorrelationBasis
-
getCorrelationResult
-
getCorrelationBasisExpression
-
getCorrelationResultExpression
-
getFetchStrategy
- Specified by:
getFetchStrategyin interfaceAttribute<X,Y>
-
getBatchSize
public final int getBatchSize()- Specified by:
getBatchSizein interfaceAttribute<X,Y>
-
getOrderByItems
- Specified by:
getOrderByItemsin interfaceAttribute<X,Y>
-
getLimitExpression
- Specified by:
getLimitExpressionin interfaceAttribute<X,Y>
-
getOffsetExpression
- Specified by:
getOffsetExpressionin interfaceAttribute<X,Y>
-
getMapping
-
getMappingExpression
-
isAggregate
public boolean isAggregate() -
isSubquery
public final boolean isSubquery()- Specified by:
isSubqueryin interfaceAttribute<X,Y>
-
getDeclaringType
- Specified by:
getDeclaringTypein interfaceAttribute<X,Y>
-
getJavaType
- Specified by:
getJavaTypein interfaceAttribute<X,Y>
-
getConvertedJavaType
- Specified by:
getConvertedJavaTypein interfaceAttribute<X,Y>
-
getFetches
- Specified by:
getFetchesin interfaceAttribute<X,Y>
-