Package com.blazebit.persistence.spi
Interface ExtendedManagedType<X>
- Type Parameters:
X
- The Java type represented by this managed type
public interface ExtendedManagedType<X>
This is a wrapper around the JPA
ManagedType
that allows additionally efficient access to properties of the metamodel.- Since:
- 1.2.0
- Author:
- Christian Beikov
-
Method Summary
Modifier and TypeMethodDescriptiongetAttribute
(String attributeName) Returns the extended attribute of the managed type for the given attribute name.Map<String,
ExtendedAttribute<X, ?>> Returns the extended attributes of the managed type.Returns an entity type and path that owns this embeddable type via a plural attribute or null if there is none.Returns an entity type and path that owns this embeddable type via a singular attribute or null if there is none.javax.persistence.metamodel.SingularAttribute<X,
?> Returns the id attribute if it has one, otherwise null.Returns the id attributes or an empty set if it doesn't have an id.Map<String,
ExtendedAttribute<X, ?>> Returns the owned extended attributes of the managed type.Map<String,
ExtendedAttribute<X, ?>> Returns the singular owned extended attributes of the managed type.javax.persistence.metamodel.ManagedType<X>
getType()
Returns the underlying managed type.boolean
Returns whether the type has a cascading delete cycle.
-
Method Details
-
getType
javax.persistence.metamodel.ManagedType<X> getType()Returns the underlying managed type.- Returns:
- The managed type
-
getEmbeddableSingularOwner
Returns an entity type and path that owns this embeddable type via a singular attribute or null if there is none.- Returns:
- An entity type and path that owns this embeddable type via a singular attribute or null if there is none
- Since:
- 1.3.0
-
getEmbeddablePluralOwner
Returns an entity type and path that owns this embeddable type via a plural attribute or null if there is none.- Returns:
- An entity type and path that owns this embeddable type via a plural attribute or null if there is none
- Since:
- 1.3.0
-
hasCascadingDeleteCycle
boolean hasCascadingDeleteCycle()Returns whether the type has a cascading delete cycle.- Returns:
- True if it has a cascading delete cycle, false otherwise
-
getIdAttribute
javax.persistence.metamodel.SingularAttribute<X,?> getIdAttribute()Returns the id attribute if it has one, otherwise null.- Returns:
- The id attribute or null
-
getIdAttributes
Returns the id attributes or an empty set if it doesn't have an id.- Returns:
- The id attributes
- Since:
- 1.3.0
-
getAttributes
Map<String,ExtendedAttribute<X, getAttributes()?>> Returns the extended attributes of the managed type.- Returns:
- The extended attributes
-
getOwnedAttributes
Map<String,ExtendedAttribute<X, getOwnedAttributes()?>> Returns the owned extended attributes of the managed type.- Returns:
- The owned extended attributes
- Since:
- 1.3.0
-
getOwnedSingularAttributes
Map<String,ExtendedAttribute<X, getOwnedSingularAttributes()?>> Returns the singular owned extended attributes of the managed type.- Returns:
- The singular owned extended attributes
- Since:
- 1.3.0
-
getAttribute
Returns the extended attribute of the managed type for the given attribute name.- Parameters:
attributeName
- The attribute name- Returns:
- The extended attributes
- Throws:
IllegalArgumentException
- Is thrown when the attribute doesn't exist
-