Package com.mparticle.identity
Class AliasRequest
- java.lang.Object
-
- com.mparticle.identity.AliasRequest
-
public class AliasRequest extends java.lang.Object
This 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 2MParticleUser
instances 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 class
AliasRequest.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AliasRequest.Builder
builder()
Create an emptyAliasRequest.Builder
instancestatic AliasRequest.Builder
builder(MParticleUser sourceUser, MParticleUser destinationUser)
Create a defaultAliasRequest.Builder
for 2 MParticleUsers.boolean
equals(java.lang.Object obj)
long
getDestinationMpid()
long
getEndTime()
long
getSourceMpid()
long
getStartTime()
int
hashCode()
-
-
-
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.Builder
instance- Returns:
-
builder
public static AliasRequest.Builder builder(@NonNull MParticleUser sourceUser, @NonNull MParticleUser destinationUser)
Create a defaultAliasRequest.Builder
for 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:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-