Package com.redwood.scheduler.api.model
Class BusinessKey
- java.lang.Object
-
- com.redwood.scheduler.api.model.BusinessKey
-
- All Implemented Interfaces:
Serializable
,Comparable<BusinessKey>
public final class BusinessKey extends Object implements Serializable, Comparable<BusinessKey>
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static Comparator<BusinessKeyObject>
COMPARATOR
-
Constructor Summary
Constructors Constructor Description BusinessKey(String key)
BusinessKey(String initObjectType, CharSequence initPath)
Note: the initPath variable may not contain the object type, or the result will always be null.BusinessKey(String initObjectType, String[] initPathElements)
BusinessKey(String initObjectType, List<? extends CharSequence> initPathElements)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(BusinessKey otherBk)
boolean
equals(BusinessKey bk)
boolean
equals(Object object)
String
getObjectType()
The type of concrete object that this business-key refers to.CharSequence
getPath()
The path to this object, represented as a single sequence of characters.List<String>
getPathElementsAsList()
The path to this object.int
hashCode()
String
toString()
static BusinessKey
valueOf(String typePath)
-
-
-
Field Detail
-
COMPARATOR
public static final Comparator<BusinessKeyObject> COMPARATOR
-
-
Constructor Detail
-
BusinessKey
public BusinessKey(String key)
-
BusinessKey
public BusinessKey(String initObjectType, CharSequence initPath)
Note: the initPath variable may not contain the object type, or the result will always be null. (ie. a business key with String JobDefinition:GLOBAL.JobDefinitionName should only pass in GLOBAL.JobDefinitionName- Parameters:
initObjectType
-initPath
-
-
BusinessKey
public BusinessKey(String initObjectType, List<? extends CharSequence> initPathElements)
-
-
Method Detail
-
getObjectType
public final String getObjectType()
The type of concrete object that this business-key refers to.- Returns:
- the type of object this business-key refers to.
-
getPathElementsAsList
public final List<String> getPathElementsAsList()
The path to this object. This will be an unmodifiable reference to the path, represented as a series of elements.- Returns:
- the path to this object.
-
getPath
public final CharSequence getPath()
The path to this object, represented as a single sequence of characters.- Returns:
- the path to this object.
-
equals
public final boolean equals(BusinessKey bk)
-
compareTo
public int compareTo(BusinessKey otherBk)
- Specified by:
compareTo
in interfaceComparable<BusinessKey>
-
valueOf
public static BusinessKey valueOf(String typePath)
-
-