@java.lang.SuppressWarnings("rawtypes") public abstract class Association<T extends Property> extends AbstractPersistentProperty
Models an association between one class and another
Modifiers | Name | Description |
---|---|---|
private static java.util.Set<javax.persistence.CascadeType> |
DEFAULT_CHILD_CASCADE |
|
private static java.util.Set<javax.persistence.CascadeType> |
DEFAULT_OWNER_CASCADE |
|
private PersistentEntity |
associatedEntity |
|
private java.util.Set<javax.persistence.CascadeType> |
cascadeOperations |
|
private static java.util.Map<java.lang.String, javax.persistence.CascadeType> |
cascadeTypeConversions |
|
private CascadeValidateType |
cascadeValidateType |
|
private boolean |
orphanRemoval |
|
private boolean |
owningSide |
|
private java.lang.String |
referencedPropertyName |
Constructor and description |
---|
Association
(PersistentEntity owner, MappingContext context, java.beans.PropertyDescriptor descriptor) |
Association
(PersistentEntity owner, MappingContext context, java.lang.String name, java.lang.Class type) |
Type Params | Return Type | Name and description |
---|---|---|
|
private void |
buildCascadeOperations() It is possible this method could be called multiple times in some threaded initialization scenarios. |
|
public boolean |
doesCascade(javax.persistence.CascadeType cascadeOperation) Returns true if the this association cascade for the given cascade operation |
|
public boolean |
doesCascade(javax.persistence.CascadeType cascadeOperations) Returns true if this association cascades for the given cascade operation |
|
public boolean |
doesCascadeValidate(java.lang.Object associatedObject) Returns true if this association should cascade validation to the given entity. |
|
public PersistentEntity |
getAssociatedEntity()
|
|
protected java.util.Set<javax.persistence.CascadeType> |
getCascadeOperations() |
|
protected CascadeValidateType |
getCascadeValidateOperation() |
|
public javax.persistence.FetchType |
getFetchStrategy()
|
|
public Association |
getInverseSide()
|
|
public java.lang.String |
getReferencedPropertyName()
|
|
private CascadeValidateType |
initializeCascadeValidateType() It is possible this method could be called multiple times in some threaded initialization scenarios. |
|
public boolean |
isBasic()
|
|
public boolean |
isBidirectional()
|
|
public boolean |
isCircular()
|
|
public boolean |
isEmbedded()
|
|
public boolean |
isList()
|
|
public boolean |
isOrphanRemoval()
|
|
public boolean |
isOwningSide() Returns whether this side owns the relationship. |
|
public void |
setAssociatedEntity(PersistentEntity associatedEntity) Sets the associated entity |
|
public void |
setOwningSide(boolean owningSide) Sets whether this association is the owning side |
|
public void |
setReferencedPropertyName(java.lang.String referencedPropertyName) Sets the name of the inverse property |
|
public java.lang.String |
toString() |
Methods inherited from class | Name |
---|---|
class AbstractPersistentProperty |
getCapitilizedName, getName, getOwner, getReader, getType, getWriter, isInherited, isNullable, toString |
It is possible this method could be called multiple times in some threaded initialization scenarios. It needs to either remain idempotent or have the synchronization beefed up if that precondition ever changes.
Returns true if the this association cascade for the given cascade operation
cascadeOperation
- The cascadeOperationReturns true if this association cascades for the given cascade operation
cascadeOperations
- The cascadeOperationsReturns true if this association should cascade validation to the given entity. Note that if the object state is persisted, it may still be validated as part of the object graph.
associatedObject
- The associated object that may or may not be validated further
It is possible this method could be called multiple times in some threaded initialization scenarios. It needs to either remain idempotent or have the synchronization beefed up if that precondition ever changes.
Returns whether this side owns the relationship. This controls the default cascading behavior if none is specified
Sets the associated entity
associatedEntity
- The associated entitySets whether this association is the owning side
owningSide
- True if it isSets the name of the inverse property
referencedPropertyName
- The referenced property name