Interface Attribute<X,Y>
- Type Parameters:
X
- The type of the declaring entity viewY
- The type of attribute
- All Known Subinterfaces:
CollectionAttribute<X,
,E> CorrelatedAttribute<X,
,Y> ListAttribute<X,
,E> MapAttribute<X,
,K, V> MappingAttribute<X,
,Y> MethodAttribute<X,
,Y> MethodCollectionAttribute<X,
,E> MethodListAttribute<X,
,E> MethodMapAttribute<X,
,K, V> MethodMultiListAttribute<X,
,E, C> MethodMultiMapAttribute<X,
,K, V, C> MethodPluralAttribute<X,
,C, E> MethodSetAttribute<X,
,E> MethodSingularAttribute<X,
,Y> ParameterAttribute<X,
,Y> PluralAttribute<X,
,C, E> SetAttribute<X,
,E> SingularAttribute<X,
,Y> SubqueryAttribute<X,
Y>
public interface Attribute<X,Y>
Represents an attribute of a view type.
- Since:
- 1.0.0
- Author:
- Christian Beikov
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
The different attribute types.static enum
The different attribute mapping types.static enum
The different attribute types. -
Method Summary
Modifier and TypeMethodDescriptionReturns the type of the attribute.int
Returns the default batch size of the attribute.Class<?>
Returns the java type of the converted attribute type or the attribute type.Returns the declaring view type.String[]
The associations that should be fetched along with the entity mapped by this attribute.Returns the fetch strategy of the attribute.Returns the java type of the attribute.Returns the limit expression.Returns the type of the attribute mapping.Returns the type of the attribute member.Returns the offset expression.Returns the order by items for the limit expression.boolean
Returns true if this attribute is a collection, otherwise false.boolean
Returns true if this attribute is correlated, otherwise false.boolean
Returns true if this attribute maps to a subquery provider, otherwise false.boolean
Returns true if this attribute is a subview, otherwise false.<T extends LimitBuilder<?> & OrderByBuilder<?>>
voidrenderLimit
(String parent, ParameterHolder<?> parameterHolder, Map<String, Object> optionalParameters, T builder) Renders the limit mapping for the given parent expression to the given query builder.
-
Method Details
-
getDeclaringType
ManagedViewType<X> getDeclaringType()Returns the declaring view type.- Returns:
- The declaring view type
-
getJavaType
Returns the java type of the attribute.- Returns:
- The java type of the attribute
-
getConvertedJavaType
Class<?> getConvertedJavaType()Returns the java type of the converted attribute type or the attribute type.- Returns:
- The java type of the converted attribute type or the attribute type
- Since:
- 1.2.0
-
getMemberType
Attribute.MemberType getMemberType()Returns the type of the attribute member.- Returns:
- The type of the attribute member.
- Since:
- 1.2.0
-
getAttributeType
Attribute.AttributeType getAttributeType()Returns the type of the attribute.- Returns:
- The type of the attribute
- Since:
- 1.2.0
-
getMappingType
Attribute.MappingType getMappingType()Returns the type of the attribute mapping.- Returns:
- The type of the attribute mapping
- Since:
- 1.2.0
-
isSubquery
boolean isSubquery()Returns true if this attribute maps to a subquery provider, otherwise false.- Returns:
- True if this attribute maps to a subquery provider, otherwise false
-
isCollection
boolean isCollection()Returns true if this attribute is a collection, otherwise false.- Returns:
- True if this attribute is a collection, otherwise false
-
isSubview
boolean isSubview()Returns true if this attribute is a subview, otherwise false.- Returns:
- True if this attribute is a subview, otherwise false
-
getFetches
String[] getFetches()The associations that should be fetched along with the entity mapped by this attribute.- Returns:
- The association that should be fetched
- Since:
- 1.2.0
-
getFetchStrategy
FetchStrategy getFetchStrategy()Returns the fetch strategy of the attribute.- Returns:
- The fetch strategy of the attribute
- Since:
- 1.2.0
-
getBatchSize
int getBatchSize()Returns the default batch size of the attribute. If no default batch size is configured, returns -1.- Returns:
- The default batch size of the attribute
- Since:
- 1.2.0
-
getOrderByItems
List<OrderByItem> getOrderByItems()Returns the order by items for the limit expression.- Returns:
- The order by items for the limit expression
- Since:
- 1.5.0
-
getLimitExpression
String getLimitExpression()Returns the limit expression.- Returns:
- The limit expression
- Since:
- 1.5.0
-
getOffsetExpression
String getOffsetExpression()Returns the offset expression.- Returns:
- The offset expression
- Since:
- 1.5.0
-
renderLimit
<T extends LimitBuilder<?> & OrderByBuilder<?>> void renderLimit(String parent, ParameterHolder<?> parameterHolder, Map<String, Object> optionalParameters, T builder) Renders the limit mapping for the given parent expression to the given query builder.- Type Parameters:
T
- The query builder type- Parameters:
parent
- The parent expressionparameterHolder
- The parameter holderoptionalParameters
- The optional parametersbuilder
- The query builder- Since:
- 1.6.0
-