org.springframework.datastore.mapping.types
Class Association<T>
java.lang.Object
org.springframework.datastore.mapping.AbstractPersistentProperty
org.springframework.datastore.mapping.types.Association<T>
- All Implemented Interfaces:
- PersistentProperty
- Direct Known Subclasses:
- Embedded, ManyToMany, OneToMany, ToOne
public abstract class Association<T>
- extends AbstractPersistentProperty
Models an association between one class and another
- Since:
- 1.0
DEFAULT_OWNER_CASCADE
public static final List<javax.persistence.CascadeType> DEFAULT_OWNER_CASCADE
DEFAULT_CHILD_CASCADE
public static final List<javax.persistence.CascadeType> DEFAULT_CHILD_CASCADE
Association
public Association(PersistentEntity owner,
MappingContext context,
PropertyDescriptor descriptor)
Association
public Association(PersistentEntity owner,
MappingContext context,
String name,
Class type)
getFetchStrategy
public javax.persistence.FetchType getFetchStrategy()
setFetchStrategy
public void setFetchStrategy(javax.persistence.FetchType fetchStrategy)
isBidirectional
public boolean isBidirectional()
getInverseSide
public Association getInverseSide()
doesCascade
public boolean doesCascade(javax.persistence.CascadeType cascadeOperation)
- Returns true if the this association cascade for the given cascade operation
- Parameters:
cascadeOperation
- The cascadeOperation
- Returns:
- True if it does
getCascadeOperations
protected List<javax.persistence.CascadeType> getCascadeOperations()
isOwningSide
public boolean isOwningSide()
- Returns whether this side owns the relationship. This controls
the default cascading behavior if none is specified
- Returns:
- True if this property is the owning side
setOwningSide
public void setOwningSide(boolean owningSide)
setAssociatedEntity
public void setAssociatedEntity(PersistentEntity associatedEntity)
getAssociatedEntity
public PersistentEntity getAssociatedEntity()
setReferencedPropertyName
public void setReferencedPropertyName(String referencedPropertyName)
getReferencedPropertyName
public String getReferencedPropertyName()
toString
public String toString()
- Overrides:
toString
in class AbstractPersistentProperty
isList
public boolean isList()