AssociationMapping
public abstract class AssociationMapping
Field Summary | |
---|---|
final integer | Specifies that an association is to be fetched when the owner of the association is fetched. |
final integer | Specifies that an association is to be fetched when it is first accessed. |
string | READ-ONLY: The name of the entity or mapped superclass that declares the association field in an inheritance hierarchy. |
integer | READ-ONLY: The fetch mode used for the association. |
string | READ-ONLY: The name of the entity class from which the association was inherited in an inheritance hierarchy. |
string | READ-ONLY: Identifies the field on the inverse side of a bidirectional association. |
boolean | READ-ONLY: Whether the association cascades detach() operations from the source entity to the target entity/entities. |
boolean | READ-ONLY: Whether the association cascades merge() operations from the source entity to the target entity/entities. |
boolean | READ-ONLY: Whether the association cascades save() operations from the source entity to the target entity/entities. |
boolean | READ-ONLY: Whether the association cascades refresh() operations from the source entity to the target entity/entities. |
boolean | READ-ONLY: Whether the association cascades delete() operations from the source entity to the target entity/entities. |
boolean | READ-ONLY: Flag that indicates whether the class that defines this mapping is the owning side of the association. |
array | READ-ONLY: The join table definition, if any. |
string | READ-ONLY: Identifies the field on the owning side of a bidirectional association that controls the mapping for the association. |
string | READ-ONLY: The name of the source Entity (the Entity that defines this mapping). |
string | READ-ONLY: Identifies the field on the source class (the class this AssociationMapping belongs to) that represents the association and stores the reference to the other entity/entities. |
string | READ-ONLY: The name of the target Entity (the Enitity that is the target of the association). |
Constructor Summary | |
---|---|
AssociationMapping(array mapping) Initializes a new instance of a class derived from AssociationMapping. |
Method Summary | |
---|---|
string | getQuotedJoinTableName(AbstractPlatform platform) Gets the (possibly quoted) name of the join table. |
boolean | Checks whether the association has any cascades configured. |
boolean | Whether the target entity/entities of the association are eagerly fetched. |
boolean | Whether the target entity/entities of the association are lazily fetched. |
boolean | Whether the association is a many-to-many association. |
boolean | Whether the association is a one-to-many association. |
boolean | Whether the association is a one-to-one association. |
abstract void | load(object sourceEntity, object target, EntityManager em, array joinColumnValues) Loads data in $target domain object using this association. |
boolean | Whether the association uses a join table for the mapping. |
public final integer FETCH_EAGER = 3
Specifies that an association is to be fetched when the owner of the association is fetched.
public final integer FETCH_LAZY = 2
Specifies that an association is to be fetched when it is first accessed.
public string $declared
READ-ONLY: The name of the entity or mapped superclass that declares the association field in an inheritance hierarchy.
public integer $fetchMode
READ-ONLY: The fetch mode used for the association.
public string $inherited
READ-ONLY: The name of the entity class from which the association was inherited in an inheritance hierarchy.
public string $inversedBy
READ-ONLY: Identifies the field on the inverse side of a bidirectional association. This is only set on the owning side of an association.
public boolean $isCascadeDetach
READ-ONLY: Whether the association cascades detach() operations from the source entity to the target entity/entities.
public boolean $isCascadeMerge
READ-ONLY: Whether the association cascades merge() operations from the source entity to the target entity/entities.
public boolean $isCascadePersist
READ-ONLY: Whether the association cascades save() operations from the source entity to the target entity/entities.
public boolean $isCascadeRefresh
READ-ONLY: Whether the association cascades refresh() operations from the source entity to the target entity/entities.
public boolean $isCascadeRemove
READ-ONLY: Whether the association cascades delete() operations from the source entity to the target entity/entities.
public boolean $isOwningSide = true
READ-ONLY: Flag that indicates whether the class that defines this mapping is the owning side of the association.
public array $joinTable
READ-ONLY: The join table definition, if any.
public string $mappedBy
READ-ONLY: Identifies the field on the owning side of a bidirectional association that controls the mapping for the association. This is only set on the inverse side of an association.
public string $sourceEntityName
READ-ONLY: The name of the source Entity (the Entity that defines this mapping).
public string $sourceFieldName
READ-ONLY: Identifies the field on the source class (the class this AssociationMapping belongs to) that represents the association and stores the reference to the other entity/entities.
public string $targetEntityName
READ-ONLY: The name of the target Entity (the Enitity that is the target of the association).
public AssociationMapping(array mapping)
Initializes a new instance of a class derived from AssociationMapping.
public string getQuotedJoinTableName(AbstractPlatform platform)
Gets the (possibly quoted) name of the join table.
public boolean hasCascades()
Checks whether the association has any cascades configured.
public boolean isEagerlyFetched()
Whether the target entity/entities of the association are eagerly fetched.
public boolean isLazilyFetched()
Whether the target entity/entities of the association are lazily fetched.
public boolean isManyToMany()
Whether the association is a many-to-many association.
public boolean isOneToMany()
Whether the association is a one-to-many association.
public boolean isOneToOne()
Whether the association is a one-to-one association.
public abstract void load(object sourceEntity, object target, EntityManager em, array joinColumnValues)
Loads data in $target domain object using this association. The data comes from the association navigated from $sourceEntity using $em.
public boolean usesJoinTable()
Whether the association uses a join table for the mapping.
Base class for association mappings.
IMPORTANT NOTE:
The fields of this class are only public for 2 reasons: 1) To allow fast, internal READ access. 2) To drastically reduce the size of a serialized instance (private/protected members get the whole class name, namespace inclusive, prepended to every property in the serialized representation).