Android Open Source - twitt4droid Status Cursor Impl






From Project

Back to project page twitt4droid.

License

The source code is released under:

Apache License

If you think the Android project twitt4droid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*
 * Copyright 2014 Daniel Pedraza-Arcega/*  w w  w.j  a va 2  s  .  com*/
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.twitt4droid.data.dao.impl.sqlite;

import android.database.Cursor;

import twitter4j.GeoLocation;
import twitter4j.HashtagEntity;
import twitter4j.MediaEntity;
import twitter4j.Place;
import twitter4j.RateLimitStatus;
import twitter4j.Scopes;
import twitter4j.Status;
import twitter4j.SymbolEntity;
import twitter4j.URLEntity;
import twitter4j.UserMentionEntity;

import java.util.Date;

/**
 * Twitter status cursor implementation.
 * 
 * @author Daniel Pedraza-Arcega
 * @since version 1.0
 */
class StatusCursorImpl implements Status {

    private static final long serialVersionUID = -7346562209217982116L;

    private long id;
    private Date createdAt;
    private String text;
    private UserCursorImpl user;

    /**
     * Creates a status with the given Cursor.
     * 
     * @param cursor a cursor
     */
    public StatusCursorImpl(Cursor cursor) {
        id = SQLiteUtils.containsColumn(cursor, "id") ? cursor.getLong(cursor.getColumnIndex("id")) : -1;
        createdAt = SQLiteUtils.getDateFromLong(cursor, "created_at");
        text = SQLiteUtils.getString(cursor, "tweet_content");
        user = new UserCursorImpl(cursor);
    }
    
    @Override
    public int compareTo(Status arg0) {
        // TODO Auto-generated method stub
        return 0;
    }

    @Override
    public int getAccessLevel() {
        // TODO Auto-generated method stub
        return 0;
    }

    @Override
    public RateLimitStatus getRateLimitStatus() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public HashtagEntity[] getHashtagEntities() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public MediaEntity[] getMediaEntities() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public SymbolEntity[] getSymbolEntities() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public URLEntity[] getURLEntities() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public UserMentionEntity[] getUserMentionEntities() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public long[] getContributors() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public Date getCreatedAt() {
        return createdAt;
    }

    @Override
    public long getCurrentUserRetweetId() {
        // TODO Auto-generated method stub
        return 0;
    }

    @Override
    public int getFavoriteCount() {
        // TODO Auto-generated method stub
        return 0;
    }

    @Override
    public GeoLocation getGeoLocation() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public long getId() {
        return id;
    }

    @Override
    public String getInReplyToScreenName() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public long getInReplyToStatusId() {
        // TODO Auto-generated method stub
        return 0;
    }

    @Override
    public long getInReplyToUserId() {
        // TODO Auto-generated method stub
        return 0;
    }

    @Override
    public String getLang() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public Place getPlace() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public int getRetweetCount() {
        // TODO Auto-generated method stub
        return 0;
    }

    @Override
    public Status getRetweetedStatus() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public Scopes getScopes() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String getSource() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String getText() {
        return text;
    }

    @Override
    public UserCursorImpl getUser() {
        return user;
    }

    @Override
    public boolean isFavorited() {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean isPossiblySensitive() {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean isRetweet() {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean isRetweeted() {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean isRetweetedByMe() {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean isTruncated() {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public MediaEntity[] getExtendedMediaEntities() {
        // TODO Auto-generated method stub
        return null;
    }
}




Java Source Code List

com.twitt4droid.Resources.java
com.twitt4droid.Twitt4droid.java
com.twitt4droid.activity.UserProfileActivity.java
com.twitt4droid.activity.WebLoginActivity.java
com.twitt4droid.app.activity.MainActivity.java
com.twitt4droid.app.activity.SettingsActivity.java
com.twitt4droid.app.activity.SignInActivity.java
com.twitt4droid.app.fragment.ListsFragment.java
com.twitt4droid.app.widget.DrawerItemAdapter.java
com.twitt4droid.app.widget.DrawerItem.java
com.twitt4droid.app.widget.ScrimInsetsFrameLayout.java
com.twitt4droid.data.dao.GenericDAO.java
com.twitt4droid.data.dao.ListTimelineDAO.java
com.twitt4droid.data.dao.TimelineDAO.java
com.twitt4droid.data.dao.UserDAO.java
com.twitt4droid.data.dao.UserTimelineDAO.java
com.twitt4droid.data.dao.impl.DAOFactory.java
com.twitt4droid.data.dao.impl.sqlite.ListSQLiteDAO.java
com.twitt4droid.data.dao.impl.sqlite.SQLiteTemplate.java
com.twitt4droid.data.dao.impl.sqlite.SQLiteUtils.java
com.twitt4droid.data.dao.impl.sqlite.StatusCursorImpl.java
com.twitt4droid.data.dao.impl.sqlite.TimelineSQLiteDAO.java
com.twitt4droid.data.dao.impl.sqlite.UserCursorImpl.java
com.twitt4droid.data.dao.impl.sqlite.UserSQLiteDAO.java
com.twitt4droid.data.dao.impl.sqlite.UserTimelineSQLiteDAO.java
com.twitt4droid.data.source.SQLFileParser.java
com.twitt4droid.data.source.Twitt4droidDatabaseHelper.java
com.twitt4droid.fragment.FixedQueryTimelineFragment.java
com.twitt4droid.fragment.HomeTimelineFragment.java
com.twitt4droid.fragment.ListTimelineFragment.java
com.twitt4droid.fragment.MentionsTimelineFragment.java
com.twitt4droid.fragment.QueryableTimelineFragment.java
com.twitt4droid.fragment.TimelineFragment.java
com.twitt4droid.fragment.UserTimelineFragment.java
com.twitt4droid.util.Files.java
com.twitt4droid.util.Images.java
com.twitt4droid.util.Objects.java
com.twitt4droid.util.Strings.java
com.twitt4droid.widget.LogInOutButton.java
com.twitt4droid.widget.TweetAdapter.java
com.twitt4droid.widget.TweetDialog.java