com.ibm.ram.common.data
Class RelationshipRange

java.lang.Object
  extended by com.ibm.ram.common.data.RelationshipRange

public class RelationshipRange
extends java.lang.Object

Contains information about the relationship version rules. Relationship version rules can be specified on a given relationship between two assets.

 Two types of relationship version rules can be specified:
 a) Highest Version Rule: The asset relationship is maintained to the highest version of the 
          related asset in the range boundary specified.
 b) All Versions Rule: The asset relationship is maintained to all the versions of the
          related asset in the range boundary specified
 
 You can set relationship version rule types by calling the setType(String) method.
 Two possible values can be passed to the set types:
 a) HIGHEST_VERSION
 b) ALL_VERSIONS
 
 You can specify the range boundary by setting the following properties:
 a) Lowest Version: Specify the lowest version of the range by calling setLowestVersion().
 b) Lowest Version Type: Specify the type of the lowest version by calling setLowestVersionType(). 
          The two possible types are GREATER_THAN and GREATER_THAN_OR_EQUAL_TO. 
 c) Highest Version: Specify the highest version of the range by calling setHighestVersion().
 d) Highest Version Type: Specify the type of the highest version by calling setHighestVersionType().
          The two possible types are LESS_THAN and LESS_THAN_OR_EQUAL_TO.
 

Since:
7.1.1

Field Summary
static java.lang.String ALL_VERSIONS
           
static java.lang.String GREATER_THAN
           
static java.lang.String GREATER_THAN_OR_EQUAL_TO
           
static java.lang.String HIGHEST_VERSION
           
static java.lang.String LESS_THAN
           
static java.lang.String LESS_THAN_OR_EQUAL_TO
           
 
Constructor Summary
RelationshipRange()
           
RelationshipRange(RangeInfo rinfo, boolean highest)
          Create based upon a RangeInfo.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getHighestVersion()
           
 java.lang.String getHighestVersionType()
           
 java.lang.String getLowestVersion()
           
 java.lang.String getLowestVersionType()
           
 RangeInfo getRangeInfo()
          Get the RangeInfo.
 java.lang.String getType()
           
 int hashCode()
           
 boolean isAllVersionsRangeRelationship()
           
 boolean isHigherVersionIncluded()
          Is the higher version included in the range?
 boolean isHighestVersionRangeRelationship()
           
 boolean isLowerVersionIncluded()
          Is the lower version included in the range?
 void setHighestVersion(java.lang.String highestVersion)
           
 void setHighestVersionType(java.lang.String highestVersionType)
          
 void setLowestVersion(java.lang.String lowestVersion)
          Sets the lowest version of the range.
 void setLowestVersionType(java.lang.String lowestVersionType)
          
 void setType(java.lang.String type)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

GREATER_THAN_OR_EQUAL_TO

public static final java.lang.String GREATER_THAN_OR_EQUAL_TO
See Also:
Constant Field Values

GREATER_THAN

public static final java.lang.String GREATER_THAN
See Also:
Constant Field Values

LESS_THAN

public static final java.lang.String LESS_THAN
See Also:
Constant Field Values

LESS_THAN_OR_EQUAL_TO

public static final java.lang.String LESS_THAN_OR_EQUAL_TO
See Also:
Constant Field Values

HIGHEST_VERSION

public static final java.lang.String HIGHEST_VERSION
See Also:
Constant Field Values

ALL_VERSIONS

public static final java.lang.String ALL_VERSIONS
See Also:
Constant Field Values
Constructor Detail

RelationshipRange

public RelationshipRange()

RelationshipRange

public RelationshipRange(RangeInfo rinfo,
                         boolean highest)
Create based upon a RangeInfo.

Parameters:
rinfo -
highest -
Since:
7.5.1
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getLowestVersion

public java.lang.String getLowestVersion()
Returns:
Returns the lowest version of the range.
Since:
7.1.1

setLowestVersion

public void setLowestVersion(java.lang.String lowestVersion)
Sets the lowest version of the range.

Parameters:
lowestVersion - The lowest version to set.
Since:
7.1.1

getLowestVersionType

public java.lang.String getLowestVersionType()
Returns:
Returns the lowest version range type.
Since:
7.1.1

isLowerVersionIncluded

public boolean isLowerVersionIncluded()
Is the lower version included in the range?

Returns:
true if lower version included in range, false if only greater than lower version.
Since:
7.5.1

setLowestVersionType

public void setLowestVersionType(java.lang.String lowestVersionType)

 The method sets the lowest version range type. The two possible values are
 a) GREATER_THAN_OR_EQUAL_TO
 b) GREATER_THAN
 

Parameters:
lowestVersionType - The lowest version range type to set.
Since:
7.1.1

getHighestVersion

public java.lang.String getHighestVersion()
Returns:
Returns the highest version.
Since:
7.1.1

setHighestVersion

public void setHighestVersion(java.lang.String highestVersion)
Parameters:
highestVersion - The highest version to set.
Since:
7.1.1

getHighestVersionType

public java.lang.String getHighestVersionType()
Returns:
Returns the highest version range type.
Since:
7.1.1

setHighestVersionType

public void setHighestVersionType(java.lang.String highestVersionType)

 The method sets the lowest version range type. The two possible values are
 a) LESS_THAN_OR_EQUAL_TO
 b) LESS_THAN.
 

Parameters:
highestVersionType - The highest version range type to set.
Since:
7.1.1

isHigherVersionIncluded

public boolean isHigherVersionIncluded()
Is the higher version included in the range?

Returns:
true if higher version included in range, false if only less than higher version.
Since:
7.5.1

getType

public java.lang.String getType()
Returns:
Returns the type.
Since:
7.1.1

setType

public void setType(java.lang.String type)
Parameters:
type - The type to set.
Since:
7.1.1

isHighestVersionRangeRelationship

public boolean isHighestVersionRangeRelationship()
Returns:
boolean true if the type is set to highest version
Since:
7.1.1

isAllVersionsRangeRelationship

public boolean isAllVersionsRangeRelationship()
Returns:
boolean true if the type is set to contain all versions
Since:
7.1.1

getRangeInfo

public RangeInfo getRangeInfo()
Get the RangeInfo.

Returns:
the RangeInfo.
Since:
7.5.1