Package com.mparticle.identity
Class AliasRequest
- java.lang.Object
-
- com.mparticle.identity.AliasRequest
-
public class AliasRequest extends java.lang.ObjectThis class represents a request to indicate that a provided mpid should be a proxy for another, over a given timespan. This class must be initialzed with one of the overloadedbuilder()methods. The variantbuilder(MParticleUser, MParticleUser)creates a default request based on the 2MParticleUserinstances provided, and requires no additional input other than callingAliasRequest.Builder.build(), while the no-arg method relies entirely on your input in the Builder to populate the request.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAliasRequest.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AliasRequest.Builderbuilder()Create an emptyAliasRequest.Builderinstancestatic AliasRequest.Builderbuilder(MParticleUser sourceUser, MParticleUser destinationUser)Create a defaultAliasRequest.Builderfor 2 MParticleUsers.booleanequals(java.lang.Object obj)longgetDestinationMpid()longgetEndTime()longgetSourceMpid()longgetStartTime()inthashCode()
-
-
-
Method Detail
-
getSourceMpid
public long getSourceMpid()
-
getDestinationMpid
public long getDestinationMpid()
-
getStartTime
public long getStartTime()
-
getEndTime
public long getEndTime()
-
builder
public static AliasRequest.Builder builder()
Create an emptyAliasRequest.Builderinstance- Returns:
-
builder
public static AliasRequest.Builder builder(@NonNull MParticleUser sourceUser, @NonNull MParticleUser destinationUser)
Create a defaultAliasRequest.Builderfor 2 MParticleUsers. This will construct the request using the sourceUser's firstSeenTime as the startTime, and its lastSeenTime as the endTime. There is a limit to how old the startTime can be, represented by the config field 'aliasMaxWindow', in days. if the startTime falls before the limit, it will be adjusted to the oldest allowed startTime. In rare cases, where the sourceUser's lastSeenTime also falls outside of the aliasMaxWindow limit, after applying this adjustment it will be impossible to create an aliasRequest passes the aliasUsers() validation that the startTime must be less than the endTime- Parameters:
sourceUser- the user which is to be "copied" overdestinationUser- the user which the sourceUser will be "copied" onto
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-