IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.projector.md
Class AssociationType

java.lang.Object
  extended by com.ibm.websphere.projector.md.AssociationType
All Implemented Interfaces:
Serializable

public final class AssociationType
extends Object
implements Serializable

The type of relationship or association between entities.

Since:
WAS XD 6.1
See Also:
TupleAssociation, Serialized Form

Field Summary
static AssociationType ManyToMany
          Specifies a many-valued association with many-to-many multiplicity.
static AssociationType ManyToOne
          Specifies a single-valued association to another entity that has many-to-one multiplicity.
static AssociationType OneToMany
          Specifies a muliti-valued association to another entity that has one-to-many multiplicity.
static AssociationType OneToOne
          Specifies a single-valued association to another entity that has one-to-one multiplicity.
 
Method Summary
 boolean equals(Object obj)
          Returns true if the input object is equivalent to this AssociationType.
 int getAssociationType()
          Retreive the value of this AssociationType.
 int hashCode()
          Retrieves the hash code of this AssociationType object.
 String toString()
          Returns a string representation of the AssociationType.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

OneToOne

public static final AssociationType OneToOne
Specifies a single-valued association to another entity that has one-to-one multiplicity. It is not normally necessary to specify the associated target entity explicitly since it can usually be inferred from the type of the object being referenced.


OneToMany

public static final AssociationType OneToMany
Specifies a muliti-valued association to another entity that has one-to-many multiplicity.


ManyToOne

public static final AssociationType ManyToOne
Specifies a single-valued association to another entity that has many-to-one multiplicity. It is not normally necessary to specify the associated target entity explicitly since it can usually be inferred from the type of the object being referenced.


ManyToMany

public static final AssociationType ManyToMany
Specifies a many-valued association with many-to-many multiplicity. If the Collection is defined using generics to specify the element type, the associated target entity class does not need to be specified; otherwise it must be specified.

Every many-to-many association has two sides, the owning side and the non-owning, or inverse, side. If the association is bidirectional, either side may be designated as the owning side

Method Detail

toString

public String toString()
Returns a string representation of the AssociationType.

Overrides:
toString in class Object
Returns:
a string representation of the AssociationType.

getAssociationType

public int getAssociationType()
Retreive the value of this AssociationType. Can be useful when using with a switch statement.

Returns:
the int value of this AssociationType.

hashCode

public int hashCode()
Retrieves the hash code of this AssociationType object.

Overrides:
hashCode in class Object
Returns:
the hash code value of this object.

equals

public boolean equals(Object obj)
Returns true if the input object is equivalent to this AssociationType.

Overrides:
equals in class Object
Parameters:
obj - the object with which to compare.
Returns:
true if the input Object is equivalent to this AssociationType

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

© Copyright International Business Machines Corp 2005,2012. All rights reserved.