Class 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 overloaded builder() methods. The variant builder(MParticleUser, MParticleUser) creates a default request based on the 2 MParticleUser instances provided, and requires no additional input other than calling AliasRequest.Builder.build(), while the no-arg method relies entirely on your input in the Builder to populate the request.
    • Method Detail

      • getSourceMpid

        public long getSourceMpid()
      • getDestinationMpid

        public long getDestinationMpid()
      • getStartTime

        public long getStartTime()
      • getEndTime

        public long getEndTime()
      • builder

        public static AliasRequest.Builder builder​(@NonNull
                                                   MParticleUser sourceUser,
                                                   @NonNull
                                                   MParticleUser destinationUser)
        Create a default AliasRequest.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" over
        destinationUser - the user which the sourceUser will be "copied" onto
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object