Interface TrackingData
public interface TrackingData
Information that helps track a Parcel.
Example to create an instance using the builder pattern
TrackingData trackingData = TrackingData.builder()
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic TrackingDataBuilder
builder()
builder factory method for TrackingDatastatic TrackingDataBuilder
builder
(TrackingData template) create builder for TrackingData instancestatic TrackingData
deepCopy
(TrackingData template) factory method to create a deep copy of TrackingDataName of the carrier that delivers the Parcel.Iftrue
, the Parcel is being returned. Iffalse
, the Parcel is being delivered to the customer.Name of the provider that serves as facade to several carriers.Transaction identifier with theprovider
.Identifier to track the Parcel.static TrackingData
of()
factory methodstatic TrackingData
of
(TrackingData template) factory method to create a shallow copy TrackingDatavoid
setCarrier
(String carrier) Name of the carrier that delivers the Parcel.void
setIsReturn
(Boolean isReturn) Iftrue
, the Parcel is being returned. Iffalse
, the Parcel is being delivered to the customer.void
setProvider
(String provider) Name of the provider that serves as facade to several carriers.void
setProviderTransaction
(String providerTransaction) Transaction identifier with theprovider
.void
setTrackingId
(String trackingId) Identifier to track the Parcel.static com.fasterxml.jackson.core.type.TypeReference<TrackingData>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withTrackingData
(Function<TrackingData, T> helper) accessor map function
-
Method Details
-
getTrackingId
String getTrackingId()Identifier to track the Parcel.
- Returns:
- trackingId
-
getCarrier
String getCarrier()Name of the carrier that delivers the Parcel.
- Returns:
- carrier
-
getProvider
String getProvider()Name of the provider that serves as facade to several carriers.
- Returns:
- provider
-
getProviderTransaction
String getProviderTransaction()Transaction identifier with the
provider
.- Returns:
- providerTransaction
-
getIsReturn
Boolean getIsReturn()- If
true
, the Parcel is being returned. - If
false
, the Parcel is being delivered to the customer.
- Returns:
- isReturn
- If
-
setTrackingId
Identifier to track the Parcel.
- Parameters:
trackingId
- value to be set
-
setCarrier
Name of the carrier that delivers the Parcel.
- Parameters:
carrier
- value to be set
-
setProvider
Name of the provider that serves as facade to several carriers.
- Parameters:
provider
- value to be set
-
setProviderTransaction
Transaction identifier with the
provider
.- Parameters:
providerTransaction
- value to be set
-
setIsReturn
- If
true
, the Parcel is being returned. - If
false
, the Parcel is being delivered to the customer.
- Parameters:
isReturn
- value to be set
- If
-
of
factory method- Returns:
- instance of TrackingData
-
of
factory method to create a shallow copy TrackingData- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of TrackingData- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for TrackingData- Returns:
- builder
-
builder
create builder for TrackingData instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withTrackingData
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-