Class ResourceIdentifierImpl
- All Implemented Interfaces:
ResourceIdentifier
,WithKey
,io.vrap.rmf.base.client.ModelBase
Draft type to create a Reference or a KeyReference to a resource. Provide either the id
or (wherever supported) the key
of the resource to reference, but depending on the API endpoint the response returns either a Reference or a KeyReference. For example, the field parent
of a CategoryDraft takes a ResourceIdentifier for its value while the value of the corresponding field of a Category is a Reference.
Each resource type has its corresponding ResourceIdentifier, like ChannelResourceIdentifier.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getId()
Unique identifier of the referenced resource.getKey()
User-defined unique identifier of the referenced resource.Type of referenced resource.int
hashCode()
void
Unique identifier of the referenced resource.void
User-defined unique identifier of the referenced resource.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
Methods inherited from interface com.commercetools.api.models.common.ResourceIdentifier
withResourceIdentifier
-
Constructor Details
-
ResourceIdentifierImpl
public ResourceIdentifierImpl()create empty instance
-
-
Method Details
-
getTypeId
Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.
- Specified by:
getTypeId
in interfaceResourceIdentifier
- Returns:
- typeId
-
getId
Unique identifier of the referenced resource. Required if
key
is absent.- Specified by:
getId
in interfaceResourceIdentifier
- Returns:
- id
-
getKey
User-defined unique identifier of the referenced resource. Required if
id
is absent.- Specified by:
getKey
in interfaceResourceIdentifier
- Specified by:
getKey
in interfaceWithKey
- Returns:
- key
-
setId
Description copied from interface:ResourceIdentifier
Unique identifier of the referenced resource. Required if
key
is absent.- Specified by:
setId
in interfaceResourceIdentifier
- Parameters:
id
- value to be set
-
setKey
Description copied from interface:ResourceIdentifier
User-defined unique identifier of the referenced resource. Required if
id
is absent.- Specified by:
setKey
in interfaceResourceIdentifier
- Parameters:
key
- value to be set
-
equals
-
hashCode
public int hashCode()
-