Interface MethodAttribute<X,Y>
- Type Parameters:
X
- The type of the declaring entity viewY
- The type of attribute
- All Superinterfaces:
Attribute<X,Y>
- All Known Subinterfaces:
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>
public interface MethodAttribute<X,Y> extends Attribute<X,Y>
Represents an attribute of a view type specified by a getter.
- Since:
- 1.0.0
- Author:
- Christian Beikov
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.blazebit.persistence.view.metamodel.Attribute
Attribute.AttributeType, Attribute.MappingType, Attribute.MemberType
-
Method Summary
Modifier and Type Method Description Set<Class<?>>
getAllowedSubtypes()
Returns the subtypes that are allowed to be assigned to this attribute.AttributeFilterMapping<X,?>
getFilter(String filterName)
Returns the attribute filter mapping of this attribute with the given name.Set<AttributeFilterMapping<X,?>>
getFilters()
Returns the attribute filter mappings of this attribute.InverseRemoveStrategy
getInverseRemoveStrategy()
Returns the inverse remove strategy if this is an inverse mapped attribute.Method
getJavaMethod()
Returns the getter java method of this attribute.String
getMappedBy()
Returns the path by which the target type is mapped by.String
getName()
Returns the name of this attribute.Set<Class<?>>
getParentRequiringCreateSubtypes()
Returns the creatable subtypes that need a parent to be assignable.Set<Class<?>>
getParentRequiringUpdateSubtypes()
Returns the updatable subtypes that need a parent to be assignable.Set<Type<?>>
getPersistCascadeAllowedSubtypes()
Returns the subtypes that are allowed to be used when cascadingCascadeType.PERSIST
events.Set<Type<?>>
getReadOnlyAllowedSubtypes()
Returns the read-only subtypes that are allowed to be assigned to this attribute.Set<Type<?>>
getUpdateCascadeAllowedSubtypes()
Returns the subtypes that are allowed to be used when cascadingCascadeType.UPDATE
events.boolean
isDeleteCascaded()
Returns whether delete cascading for referenced objects should be done.boolean
isMutable()
Returns whether the attribute is mutable.boolean
isOptimisticLockProtected()
Returns whether the attribute is protected by optimistic locking.boolean
isOrphanRemoval()
Returns whether orphaned objects should be deleted during an update.boolean
isPersistCascaded()
Returns whether the persisting of referenced objects is allowed.boolean
isUpdatable()
Returns whether the attribute is updatable.boolean
isUpdateCascaded()
Returns whether the updating of referenced objects is allowed.Methods inherited from interface com.blazebit.persistence.view.metamodel.Attribute
getAttributeType, getBatchSize, getConvertedJavaType, getDeclaringType, getFetches, getFetchStrategy, getJavaType, getLimitExpression, getMappingType, getMemberType, getOffsetExpression, getOrderByItems, isCollection, isCorrelated, isSubquery, isSubview
-
Method Details
-
getName
String getName()Returns the name of this attribute.- Returns:
- The name of this attribute
-
getMappedBy
String getMappedBy()Returns the path by which the target type is mapped by.- Returns:
- The mapped by path or null
- Since:
- 1.2.0
-
getInverseRemoveStrategy
InverseRemoveStrategy getInverseRemoveStrategy()Returns the inverse remove strategy if this is an inverse mapped attribute.- Returns:
- The inverse remove strategy
- Since:
- 1.2.0
-
isUpdatable
boolean isUpdatable()Returns whether the attribute is updatable.- Returns:
- Whether the attribute is updatable
- Since:
- 1.1.0
-
isMutable
boolean isMutable()Returns whether the attribute is mutable. It is mutable if it is updatable or the target type is mutable.- Returns:
- Whether the attribute is mutable
- Since:
- 1.2.0
-
isOptimisticLockProtected
boolean isOptimisticLockProtected()Returns whether the attribute is protected by optimistic locking.- Returns:
- Whether the attribute is optimistic lock protected
- Since:
- 1.2.0
-
isPersistCascaded
boolean isPersistCascaded()Returns whether the persisting of referenced objects is allowed.- Returns:
- Whether persisting should be done
- Since:
- 1.2.0
-
isUpdateCascaded
boolean isUpdateCascaded()Returns whether the updating of referenced objects is allowed.- Returns:
- Whether updating should be done
- Since:
- 1.2.0
-
isDeleteCascaded
boolean isDeleteCascaded()Returns whether delete cascading for referenced objects should be done.- Returns:
- Whether delete cascading should be done
- Since:
- 1.2.0
-
isOrphanRemoval
boolean isOrphanRemoval()Returns whether orphaned objects should be deleted during an update.- Returns:
- Whether orphaned objects are deleted
- Since:
- 1.2.0
-
getReadOnlyAllowedSubtypes
Returns the read-only subtypes that are allowed to be assigned to this attribute.- Returns:
- The allowed read-only subtypes for assigning
- Since:
- 1.3.0
-
getPersistCascadeAllowedSubtypes
Returns the subtypes that are allowed to be used when cascadingCascadeType.PERSIST
events.- Returns:
- The allowed subtypes for persist events
- Since:
- 1.2.0
-
getUpdateCascadeAllowedSubtypes
Returns the subtypes that are allowed to be used when cascadingCascadeType.UPDATE
events.- Returns:
- The allowed subtypes for update events
- Since:
- 1.2.0
-
getAllowedSubtypes
Returns the subtypes that are allowed to be assigned to this attribute.- Returns:
- The allowed subtypes for assigning
- Since:
- 1.5.0
-
getParentRequiringUpdateSubtypes
Returns the updatable subtypes that need a parent to be assignable.- Returns:
- The updatable subtypes that need a parent to be assignable
- Since:
- 1.5.0
-
getParentRequiringCreateSubtypes
Returns the creatable subtypes that need a parent to be assignable.- Returns:
- The creatable subtypes that need a parent to be assignable
- Since:
- 1.5.0
-
getJavaMethod
Method getJavaMethod()Returns the getter java method of this attribute.- Returns:
- The getter java method of this attribute
-
getFilter
Returns the attribute filter mapping of this attribute with the given name.- Parameters:
filterName
- The name of the attribute filter mapping which should be returned- Returns:
- The attribute filter mapping of this attribute with the given name
-
getFilters
Set<AttributeFilterMapping<X,?>> getFilters()Returns the attribute filter mappings of this attribute.- Returns:
- The attribute filter mappings of this attribute
-