Class UserDeviceData

    • Constructor Detail

      • UserDeviceData

        public UserDeviceData()
    • Method Detail

      • getUser

        public UserData getUser()
        The user that this device is associated with.
        Hibernate: many-to-one
        column="`user_id`" not-null="true" update="false" outer-join="false"
      • setUser

        public void setUser​(UserData user)
      • getClient

        public ClientData getClient()
        Get the client application this device is associated with.
        Hibernate: many-to-one
        column="`client_id`" not-null="true" update="false" outer-join="false"
      • setClient

        public void setClient​(ClientData client)
      • getEntryDate

        public Date getEntryDate()
        Description copied from interface: RegisteredData
        Get the date this item was added to the database. The value is generated at creation time and can't be modified later.
        Specified by:
        getEntryDate in interface RegisteredData
      • setEntryDate

        public void setEntryDate​(Date entryDate)
      • getName

        public String getName()
        Description copied from interface: NameableData
        Get the name of the item.
        Specified by:
        getName in interface NameableData
        Returns:
        A String with the name of the item
      • setName

        public void setName​(String name)
        Description copied from interface: NameableData
        Set the name of the item. The name cannot be null and mustn't be longer than the value specified by the MAX_NAME_LENGTH constant.
        Specified by:
        setName in interface NameableData
        Parameters:
        name - The new name for the item
      • getDescription

        public String getDescription()
        Description copied from interface: NameableData
        Get the description for the item.
        Specified by:
        getDescription in interface NameableData
        Returns:
        A String with a description of the item
      • setDescription

        public void setDescription​(String description)
        Description copied from interface: NameableData
        Set the description for the item. The description can be null but mustn't be longer than the value specified by the MAX_DESCRIPTION_LENGTH constant.
        Specified by:
        setDescription in interface NameableData
        Parameters:
        description - The new description for the item
      • getToken

        public String getToken()
        Get the device token.
        Hibernate: property
        column="`token`" type="string" length="255" not-null="true" update="false"
      • setToken

        public void setToken​(String token)
      • getUserAgent

        public String getUserAgent()
        Get a string with more information about the device (eg. User-Agent from a web browser).
        Hibernate: property
        column="`user_agent`" type="text" not-null="false"
      • setUserAgent

        public void setUserAgent​(String userAgent)
      • getLastUsed

        public Date getLastUsed()
        Get the date and time the user last logged in from this device.
        Hibernate: property
        column="`last_used`" type="timestamp" not-null="true"
      • setLastUsed

        public void setLastUsed​(Date lastUsed)
      • getLastRemoteId

        public String getLastRemoteId()
        Get the remote id (=ip address) of the last login from this device.
        Hibernate: property
        column="`lastremote_id`" type="string" length="255" not-null="false"
      • setLastRemoteId

        public void setLastRemoteId​(String remoteId)
      • getLocation

        public String getLocation()
        Get the location of the user (if known).
        Hibernate: property
        column="`location`" type="string" length="255" not-null="false"
      • setLocation

        public void setLocation​(String location)
      • getLocationLatitude

        public Float getLocationLatitude()
        Get the location latitude of the user (if known).
        Hibernate: property
        column="`location_lat`" type="float" not-null="false"
      • setLocationLatitude

        public void setLocationLatitude​(Float locationLat)
      • getLocationLongitude

        public Float getLocationLongitude()
        Get the location longitude of the user (if known).
        Hibernate: property
        column="`location_long`" type="float" not-null="false"
      • setLocationLongitude

        public void setLocationLongitude​(Float locationLong)
      • getSessions

        Set<SessionData> getSessions()
        This is the inverse end but we do not map with inverse="true" cascade="delete" since we want Hibernate to set SessionData.device_id = null instead of deleting sessions.
        See Also:
        SessionData.getDevice()
        Hibernate: set
        lazy="true"
        Hibernate: collection-key
        column="`device_id`"
        Hibernate: collection-one-to-many
        class="net.sf.basedb.core.data.SessionData"