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 intcompareTo(BusinessKey otherBk)booleanequals(BusinessKey bk)booleanequals(Object object)StringgetObjectType()The type of concrete object that this business-key refers to.CharSequencegetPath()The path to this object, represented as a single sequence of characters.List<String>getPathElementsAsList()The path to this object.inthashCode()StringtoString()static BusinessKeyvalueOf(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 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 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 CharSequence getPath()
The path to this object, represented as a single sequence of characters.- Returns:
- the path to this object.
-
equals
public boolean equals(BusinessKey bk)
-
compareTo
public int compareTo(BusinessKey otherBk)
- Specified by:
compareToin interfaceComparable<BusinessKey>
-
valueOf
public static BusinessKey valueOf(String typePath)
-
-