程序包 cn.leancloud

类 LCStatus


  • public class LCStatus
    extends LCObject
    Status 预定义属性: 1. messageId, Integer, message sequence number, Receiver-side only 2. inboxType, String, identifier for multiple purpose, default is 'default' which stands for timeline. 3. source, Pointer, point to source user. 4. owner, Pointer, point to target user, Receiver-side only. status sample:
    • 字段详细资料

      • CLASS_NAME

        public static final java.lang.String CLASS_NAME
        另请参阅:
        常量字段值
      • ATTR_MESSAGE_ID

        public static final java.lang.String ATTR_MESSAGE_ID
        另请参阅:
        常量字段值
      • ATTR_INBOX_TYPE

        public static final java.lang.String ATTR_INBOX_TYPE
        另请参阅:
        常量字段值
      • ATTR_SOURCE

        public static final java.lang.String ATTR_SOURCE
        另请参阅:
        常量字段值
      • ATTR_OWNER

        public static final java.lang.String ATTR_OWNER
        另请参阅:
        常量字段值
      • ATTR_IMAGE

        public static final java.lang.String ATTR_IMAGE
        另请参阅:
        常量字段值
      • ATTR_MESSAGE

        public static final java.lang.String ATTR_MESSAGE
        另请参阅:
        常量字段值
      • INVALID_MESSAGE_ID

        public static final int INVALID_MESSAGE_ID
        另请参阅:
        常量字段值
    • 构造器详细资料

      • LCStatus

        public LCStatus()
        default constructor.
      • LCStatus

        public LCStatus​(LCObject o)
        constructor from AVObject instance.
        参数:
        o - object instance
    • 方法详细资料

      • createStatus

        public static LCStatus createStatus​(java.lang.String imageUrl,
                                            java.lang.String message)
        create a status instance.
        参数:
        imageUrl - image url
        message - message text
        返回:
        Return an instance of AVStatus
      • createStatusWithData

        public static LCStatus createStatusWithData​(java.util.Map<java.lang.String,​java.lang.Object> data)
        create a status instance.
        参数:
        data - map data
        返回:
        Return an instance of AVStatus
      • setImageUrl

        public void setImageUrl​(java.lang.String imageUrl)
        set image url attribute.
        参数:
        imageUrl - image url
      • getImageUrl

        public java.lang.String getImageUrl()
        get image url attribute.
        返回:
        Return the value of image url
      • setMessage

        public void setMessage​(java.lang.String msg)
        set message text
        参数:
        msg - the message text.
      • getMessage

        public java.lang.String getMessage()
        get message text
        返回:
        Return the message text.
      • getMessageId

        public long getMessageId()
        此状态在用户 Inbox 中的 ID 注意: 仅用于分片查询,不具有唯一性
        返回:
        Return the message id in inbox.
      • setMessageId

        protected void setMessageId​(long messageId)
      • getInboxType

        public java.lang.String getInboxType()
        到达收件箱类型, 默认是`default`,私信是`private`, 可以自定义任何类型
        返回:
        inbox type.
      • getSource

        public LCUser getSource()
        获取 Status 的发送者
        返回:
        source user of the status
      • setSource

        public void setSource​(LCObject source)
        set source of status
        参数:
        source - source user of the status
      • setInboxType

        public void setInboxType​(java.lang.String type)
        set inbox type.
        参数:
        type - inbox type
      • put

        public void put​(java.lang.String key,
                        java.lang.Object value)
        添加 AVStatus 中的一对自定义内容
        覆盖:
        put 在类中 LCObject
        参数:
        key - attribute key
        value - attribute value
      • get

        public java.lang.Object get​(java.lang.String key)
        get customized key value.
        覆盖:
        get 在类中 LCObject
        参数:
        key - attribute key
        返回:
        attribute value
      • remove

        public void remove​(java.lang.String key)
        删除 AVStatus 中的一对自定义内容
        覆盖:
        remove 在类中 LCObject
        参数:
        key - attribute key
      • deleteInBackground

        public io.reactivex.Observable<LCNull> deleteInBackground()
        delete status
        覆盖:
        deleteInBackground 在类中 LCObject
        返回:
        Observable instance
      • deleteInBackground

        public static io.reactivex.Observable<LCNull> deleteInBackground​(LCStatus status)
        delete status(class method)
        参数:
        status - instance of AVStatus
        返回:
        Observable instance
      • deleteInBackground

        public static io.reactivex.Observable<LCNull> deleteInBackground​(LCUser asAuthenticatedUser,
                                                                         LCStatus status)
        delete status(class method)
        参数:
        asAuthenticatedUser - explicit user for request authentication.
        status - instance of AVStatus
        返回:
        Observable instance in general, this method should be invoked in lean engine.
      • getStatusWithIdInBackground

        public static io.reactivex.Observable<LCStatus> getStatusWithIdInBackground​(java.lang.String statusId)
        fetch status with specified objectId
        参数:
        statusId - status id.
        返回:
        Observable instance
      • getStatusWithIdInBackground

        public static io.reactivex.Observable<LCStatus> getStatusWithIdInBackground​(LCUser asAuthenticatedUser,
                                                                                    java.lang.String statusId)
        fetch status with specified objectId
        参数:
        asAuthenticatedUser - explicit user for request authentication.
        statusId - status id.
        返回:
        Observable instance in general, this method should be invoked in lean engine.
      • sendToUsersInBackground

        public io.reactivex.Observable<LCStatus> sendToUsersInBackground​(LCQuery query)
        send to user with query.
        参数:
        query - instance of AVQuery
        返回:
        Observable instance
      • sendToUsersInBackground

        public io.reactivex.Observable<LCStatus> sendToUsersInBackground​(java.lang.String inboxType,
                                                                         LCQuery query)
        send to user with query and inboxType.
        参数:
        inboxType - inbox type
        query - instance of AVQuery
        返回:
        Observable instance
      • sendToFollowersInBackground

        public io.reactivex.Observable<LCStatus> sendToFollowersInBackground()
        send status to followers.
        返回:
        Observable instance
      • sendToFollowersInBackground

        public io.reactivex.Observable<LCStatus> sendToFollowersInBackground​(java.lang.String inboxType)
        send status with inboxType to followers.
        参数:
        inboxType - inbox type
        返回:
        Observable instance
      • sendPrivatelyInBackground

        public io.reactivex.Observable<LCStatus> sendPrivatelyInBackground​(java.lang.String receiverObjectId)
        send privately message.
        参数:
        receiverObjectId - receiver objectId
        返回:
        Observable instance
      • statusQuery

        public static LCStatusQuery statusQuery​(LCUser source)
        query statuses sent by User owner. default query direction: from NEW to OLD.
        参数:
        source - source User
        返回:
        instance of AVStatusQuery
      • inboxQuery

        public static LCStatusQuery inboxQuery​(LCUser owner,
                                               java.lang.String inboxType)
        query statuses send to User owner and with inboxType default query direction: from NEW to OLD.
        参数:
        owner - owner user
        inboxType - inbox type
        返回:
        instance of AVStatusQuery
      • equals

        public boolean equals​(java.lang.Object obj)
        覆盖:
        equals 在类中 LCObject
      • add

        @Deprecated
        public void add​(java.lang.String key,
                        java.lang.Object value)
        已过时。
        此方法并没有实现,调用会抛出 UnsupportedOperationException
        覆盖:
        add 在类中 LCObject
        参数:
        key - target key.
        value - value object.
      • getACL

        @Deprecated
        public LCACL getACL()
        已过时。
        此方法并没有实现,调用会抛出 UnsupportedOperationException
        覆盖:
        getACL 在类中 LCObject
        返回:
        acl object.
      • setACL

        @Deprecated
        public void setACL​(LCACL acl)
        已过时。
        此方法并没有实现,调用会抛出 UnsupportedOperationException
        覆盖:
        setACL 在类中 LCObject
        参数:
        acl - acl object.
      • addAll

        @Deprecated
        public void addAll​(java.lang.String key,
                           java.util.Collection<?> values)
        已过时。
        此方法并没有实现,调用会抛出 UnsupportedOperationException
        覆盖:
        addAll 在类中 LCObject
        参数:
        key - target key.
        values - values collection.
      • addAllUnique

        @Deprecated
        public void addAllUnique​(java.lang.String key,
                                 java.util.Collection<?> values)
        已过时。
        此方法并没有实现,调用会抛出 UnsupportedOperationException
        覆盖:
        addAllUnique 在类中 LCObject
        参数:
        key - target key.
        values - value collection.
      • addUnique

        @Deprecated
        public void addUnique​(java.lang.String key,
                              java.lang.Object value)
        已过时。
        此方法并没有实现,调用会抛出 UnsupportedOperationException
        覆盖:
        addUnique 在类中 LCObject
        参数:
        key - target key.
        value - value object.
      • fetch

        @Deprecated
        public LCObject fetch()
        已过时。
        此方法并没有实现,调用会抛出 UnsupportedOperationException
        覆盖:
        fetch 在类中 LCObject
        返回:
        current object.
      • fetch

        @Deprecated
        public LCObject fetch​(java.lang.String includedKeys)
        已过时。
        此方法并没有实现,调用会抛出 UnsupportedOperationException
        覆盖:
        fetch 在类中 LCObject
        参数:
        includedKeys - include keys, which object will be return together.
        返回:
        current object.
      • refresh

        @Deprecated
        public void refresh()
        已过时。
        此方法并没有实现,调用会抛出 UnsupportedOperationException
        覆盖:
        refresh 在类中 LCObject
      • refresh

        @Deprecated
        public void refresh​(java.lang.String includedKeys)
        已过时。
        此方法并没有实现,调用会抛出 UnsupportedOperationException
        覆盖:
        refresh 在类中 LCObject
        参数:
        includedKeys - include keys, which object will be return together.
      • fetchIfNeeded

        @Deprecated
        public LCObject fetchIfNeeded()
        已过时。
        此方法并没有实现,调用会抛出 UnsupportedOperationException
        覆盖:
        fetchIfNeeded 在类中 LCObject
        返回:
        current object.
      • fetchIfNeededInBackground

        @Deprecated
        public io.reactivex.Observable<LCObject> fetchIfNeededInBackground()
        已过时。
        此方法并没有实现,调用会抛出 UnsupportedOperationException
        覆盖:
        fetchIfNeededInBackground 在类中 LCObject
        返回:
        observable instance.
      • fetchInBackground

        @Deprecated
        public io.reactivex.Observable<LCObject> fetchInBackground()
        已过时。
        此方法并没有实现,调用会抛出 UnsupportedOperationException
        覆盖:
        fetchInBackground 在类中 LCObject
        返回:
        observable instance.
      • refreshInBackground

        @Deprecated
        public io.reactivex.Observable<LCObject> refreshInBackground()
        已过时。
        此方法并没有实现,调用会抛出 UnsupportedOperationException
        覆盖:
        refreshInBackground 在类中 LCObject
        返回:
        observable instance.
      • fetchInBackground

        @Deprecated
        public io.reactivex.Observable<LCObject> fetchInBackground​(java.lang.String includeKeys)
        已过时。
        此方法并没有实现,调用会抛出 UnsupportedOperationException
        覆盖:
        fetchInBackground 在类中 LCObject
        参数:
        includeKeys - include keys, which object will be return together.
        返回:
        observable instance.
      • save

        @Deprecated
        public void save()
        已过时。
        此方法并没有实现,调用会抛出 UnsupportedOperationException
        覆盖:
        save 在类中 LCObject
      • saveInBackground

        @Deprecated
        public io.reactivex.Observable<? extends LCObject> saveInBackground()
        已过时。
        此方法并没有实现,调用会抛出 UnsupportedOperationException
        覆盖:
        saveInBackground 在类中 LCObject
        返回:
        observable instance.
      • saveEventually

        @Deprecated
        public void saveEventually()
        已过时。
        此方法并没有实现,调用会抛出 UnsupportedOperationException
        覆盖:
        saveEventually 在类中 LCObject
      • isFetchWhenSave

        @Deprecated
        public boolean isFetchWhenSave()
        已过时。
        此方法并没有实现,调用会抛出 UnsupportedOperationException
        覆盖:
        isFetchWhenSave 在类中 LCObject
        返回:
        flag for fetchWhenSave.
      • setFetchWhenSave

        @Deprecated
        public void setFetchWhenSave​(boolean fetchWhenSave)
        已过时。
        此方法并没有实现,调用会抛出 UnsupportedOperationException
        覆盖:
        setFetchWhenSave 在类中 LCObject
        参数:
        fetchWhenSave - flag.