com.sap.mdm.data
Class Relationship

java.lang.Object
  extended bycom.sap.mdm.data.Relationship
All Implemented Interfaces:
Cloneable, RepositoryItem

public class Relationship
extends Object
implements RepositoryItem, Cloneable

This class represents relationship between two records where one of them is defined as anchor record

See Also:
RelationshipProperties, RelationshipGroup

Constructor Summary
Relationship(int type, RecordId anchorRecordId, RecordId memberRecordId, boolean hasQuantity, int quantity, boolean hasRequired, boolean isRequired)
          Constructs with the specified parameters.
Relationship(int type, Record anchorRecord, Record memberRecord, boolean hasQuantity, int quantity, boolean hasRequired, boolean isRequired)
          Constructs with the specified parameters.
Relationship(Relationship other)
          Copy constructor
 
Method Summary
 Object clone()
          Returns a clone.
 boolean equals(Object obj)
           
 Record getAnchorRecord()
          Get anchor record in this relationship
 RecordId getAnchorRecordId()
          Get ID of the anchor record in this relationship
 Record getMemberRecord()
          Get member record in this relationship
 RecordId getMemberRecordId()
          Get ID of the member record in this relationship
 int getQuantity()
          Get quantity of this relationship member
 int getType()
          Get type of this relationship
 int hashCode()
           
 boolean hasQuantity()
          Specify if this relationship member has 'quantity' parameter
 boolean hasREquired()
          Specify if this relationship member has 'required' parameter
 boolean isRequired()
          Specify if this relationship member is required
 void setHasQuantity(boolean hasQuantity)
          Define if this relationship member has 'quantity' parameter
 void setHasRequired(boolean hasRequired)
          Define if this relationship member has 'required' parameter
 void setQuantity(int quantity)
          Set quantity of this relationship member
 void setRequired(boolean isRequired)
          Set if this relationship member is required
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Relationship

public Relationship(int type,
                    RecordId anchorRecordId,
                    RecordId memberRecordId,
                    boolean hasQuantity,
                    int quantity,
                    boolean hasRequired,
                    boolean isRequired)
Constructs with the specified parameters.

Parameters:
type - the relationship type
anchorRecordId - the anchor record Id
memberRecordId - the member record Id
hasQuantity - whether it has a quantity
quantity - the quantity value
hasRequired - whether it has the required
isRequired - the required value

Relationship

public Relationship(int type,
                    Record anchorRecord,
                    Record memberRecord,
                    boolean hasQuantity,
                    int quantity,
                    boolean hasRequired,
                    boolean isRequired)
Constructs with the specified parameters.

Parameters:
type - the relationship type
anchorRecord - the anchor record
memberRecord - the member record
hasQuantity - whether it has a quantity
quantity - the quantity value
hasRequired - whether it has the required
isRequired - the required value

Relationship

public Relationship(Relationship other)
Copy constructor

Parameters:
other - relationship
Method Detail

getType

public int getType()
Get type of this relationship

Returns:
relationship type
See Also:
RelationshipProperties

getAnchorRecordId

public RecordId getAnchorRecordId()
Get ID of the anchor record in this relationship

Returns:
anchor record ID

getMemberRecordId

public RecordId getMemberRecordId()
Get ID of the member record in this relationship

Returns:
member record ID

getAnchorRecord

public Record getAnchorRecord()
Get anchor record in this relationship

Returns:
anchor record

getMemberRecord

public Record getMemberRecord()
Get member record in this relationship

Returns:
member record

hasQuantity

public boolean hasQuantity()
Specify if this relationship member has 'quantity' parameter

Returns:
true if this relationship member has quantity parameter, false otherwise

setHasQuantity

public void setHasQuantity(boolean hasQuantity)
Define if this relationship member has 'quantity' parameter

Parameters:
hasQuantity -

getQuantity

public int getQuantity()
Get quantity of this relationship member

Returns:
quantity

setQuantity

public void setQuantity(int quantity)
Set quantity of this relationship member

Parameters:
quantity - quantity

hasREquired

public boolean hasREquired()
Specify if this relationship member has 'required' parameter

Returns:
true if this relationship member has 'required' parameter, false otherwise

setHasRequired

public void setHasRequired(boolean hasRequired)
Define if this relationship member has 'required' parameter

Parameters:
hasRequired -

isRequired

public boolean isRequired()
Specify if this relationship member is required

Returns:
true if this relationship member is required, false otherwise

setRequired

public void setRequired(boolean isRequired)
Set if this relationship member is required

Parameters:
isRequired - specify if this relationship member is required

hashCode

public int hashCode()

equals

public boolean equals(Object obj)

toString

public String toString()

clone

public Object clone()
Returns a clone.

Returns:
a clone


Copyright 2004-2007 by SAP AG. All Rights Reserved.

SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (SAP Group) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.