当前位置: 首页>>代码示例>>Java>>正文


Java SnappydbException.printStackTrace方法代码示例

本文整理汇总了Java中com.snappydb.SnappydbException.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java SnappydbException.printStackTrace方法的具体用法?Java SnappydbException.printStackTrace怎么用?Java SnappydbException.printStackTrace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.snappydb.SnappydbException的用法示例。


在下文中一共展示了SnappydbException.printStackTrace方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onPostExecute

import com.snappydb.SnappydbException; //导入方法依赖的package包/类
@Override
protected void onPostExecute(String s) {
    super.onPostExecute(s);
    Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();
    progressBar.setVisibility(View.GONE);
    if (s.equalsIgnoreCase("Success"))
    {
        try {
            snappyDB.put("Email", etemail.getText().toString());
            snappyDB.put("Password", etpassword.getText().toString());
            snappyDB.close();
        }
        catch (SnappydbException e){e.printStackTrace();}
        Intent intent=new Intent(LoginActivity.this,HomeActivity.class);
        startActivity(intent);
        finish();
    }
}
 
开发者ID:rishabh115,项目名称:Odyssey2017,代码行数:19,代码来源:LoginActivity.java

示例2: searchAllPostsOrderByDate

import com.snappydb.SnappydbException; //导入方法依赖的package包/类
@Override
protected List<Post> searchAllPostsOrderByDate() {
    List<Post> result = new ArrayList<>();
    try {
        String keys[] = snappydb.findKeys(POST_PREFIX);
        for (String key: keys) {
            Post post = snappydb.getObject(key, Post.class);
            result.add(post);
        }
    } catch (SnappydbException e) {
        e.printStackTrace();
    }

    Collections.sort(result, new PostComparator());
    return result;
}
 
开发者ID:AmeliaPessoa,项目名称:DBPA,代码行数:17,代码来源:SnappyDB.java

示例3: init

import com.snappydb.SnappydbException; //导入方法依赖的package包/类
@Override
    public ControllerParent<InternetShield> init(String tag) {
        // TODO Auto-generated method stub\
        try {
            InternetManager.getInstance();
            // initializing local db for fetched responses
            if (InternetManager.getInstance().getCachDB() == null || !InternetManager.getInstance().getCachDB().isOpen())
                InternetManager.getInstance().init(getApplication());
            else {
                if (!InternetManager.getInstance().getCachDB().isOpen()) {
                    InternetManager.getInstance().close();
                    InternetManager.resetInstance().init(getApplication());
                }
            }
        } catch (SnappydbException e) {
            e.printStackTrace();
        }
//        if (true)
//            throw new ClassCastException();
        return super.init(tag);
    }
 
开发者ID:Dnet3,项目名称:CustomAndroidOneSheeld,代码行数:22,代码来源:InternetShield.java

示例4: initView

import com.snappydb.SnappydbException; //导入方法依赖的package包/类
private void initView() {


        id = getArguments().getString(CHANNELID);
        name = getArguments().getString(CHANNELNAME);

        if (TextUtils.isEmpty(id) || TextUtils.isEmpty(name)) {
            return;
        }

        try {
            snappydb = DBFactory.open(getActivity());
            old_data = snappydb.getObject(id, NewsItemData.class);
        } catch (SnappydbException e) {
            e.printStackTrace();
        }

        initRecycleView();

        if (old_data == null) {
            getData();
        } else {
            setData(old_data);
        }
    }
 
开发者ID:Daemon1993,项目名称:Pas,代码行数:26,代码来源:FragmentNewsItem.java

示例5: onClick

import com.snappydb.SnappydbException; //导入方法依赖的package包/类
@Override
public void onClick(View v) {
    new GuillotineAnimation.GuillotineBuilder(guillotineMenu, guillotineMenu.findViewById(R.id.guillotine_hamburger), contentHamburger)
            .setStartDelay(RIPPLE_DURATION)
            .setActionBarViewForAnimation(toolbar)
            .setClosedOnStart(true)
            .build();
    switch (v.getId())
    {
        case R.id.activity_group:
            Toast.makeText(this,"My Events",Toast.LENGTH_SHORT).show();
            break;
        case R.id.feed_group:
            Intent intent2=new Intent(HomeActivity.this,FeedActivity.class);
            startActivity(intent2);
            break;
        case R.id.profile_group:
            Intent intent1=new Intent(HomeActivity.this,ProfileActivity.class);
            startActivity(intent1);
            break;
        case R.id.settings_group:
            LogSaver.appendLog("Facebook Logged Out :"+LoginManager.getInstance());
            LoginManager.getInstance().logOut();
            try {
                DB db = DBFactory.open(getApplicationContext(), "users");
                db.destroy();
                db.close();
            }
            catch (SnappydbException e){e.printStackTrace();}
            Intent intent=new Intent(HomeActivity.this,MainActivity.class);
            startActivity(intent);
            finish();
            LogSaver.appendLog("Facebook Logged Out");
           break;
    }
}
 
开发者ID:rishabh115,项目名称:Odyssey2017,代码行数:37,代码来源:HomeActivity.java

示例6: SnappyDB

import com.snappydb.SnappydbException; //导入方法依赖的package包/类
public SnappyDB(Context context){
    try {
        snappydb = DBFactory.open(context);
        this.context = context;
    } catch (SnappydbException e) {
        e.printStackTrace();
    }
}
 
开发者ID:AmeliaPessoa,项目名称:DBPA,代码行数:9,代码来源:SnappyDB.java

示例7: cleanDatabase

import com.snappydb.SnappydbException; //导入方法依赖的package包/类
@Override
protected void cleanDatabase() {
    try {
        snappydb.destroy();
        //Create again
        snappydb = DBFactory.open(context);
    } catch (SnappydbException e) {
        e.printStackTrace();
    }
}
 
开发者ID:AmeliaPessoa,项目名称:DBPA,代码行数:11,代码来源:SnappyDB.java

示例8: insertAuthor

import com.snappydb.SnappydbException; //导入方法依赖的package包/类
@Override
protected void insertAuthor(Author author) {
    try {
        snappydb.put(AUTHOR_PREFIX+author.getKey(), author);
    } catch (SnappydbException e) {
        e.printStackTrace();
    }
}
 
开发者ID:AmeliaPessoa,项目名称:DBPA,代码行数:9,代码来源:SnappyDB.java

示例9: updateAuthorAndYourPosts

import com.snappydb.SnappydbException; //导入方法依赖的package包/类
@Override
protected void updateAuthorAndYourPosts(Author author) {
    try {
        snappydb.del(AUTHOR_PREFIX+author.getKey());
        snappydb.put(AUTHOR_PREFIX+author.getKey(), author);
    } catch (SnappydbException e) {
        e.printStackTrace();
    }
}
 
开发者ID:AmeliaPessoa,项目名称:DBPA,代码行数:10,代码来源:SnappyDB.java

示例10: deleteAuthorAndYourPosts

import com.snappydb.SnappydbException; //导入方法依赖的package包/类
@Override
protected void deleteAuthorAndYourPosts(Author author) {
    try {
        snappydb.del(AUTHOR_PREFIX+author.getKey());
        Post[] posts = snappydb.getObjectArray(AUTHOR_POST_PREFIX+author.getKey(), Post.class);
        for (Post post: posts) {
            snappydb.del(POST_PREFIX+post.getKey());
        }
        snappydb.del(AUTHOR_POST_PREFIX+author.getKey());
    } catch (SnappydbException e) {
        e.printStackTrace();
    }
}
 
开发者ID:AmeliaPessoa,项目名称:DBPA,代码行数:14,代码来源:SnappyDB.java

示例11: searchPostsByAuthor

import com.snappydb.SnappydbException; //导入方法依赖的package包/类
@Override
protected List<Post> searchPostsByAuthor(Author author) {
    try {
        Post[] posts = snappydb.getObjectArray(AUTHOR_POST_PREFIX+author.getKey(), Post.class);
        return Arrays.asList(posts);
    } catch (SnappydbException e) {
        e.printStackTrace();
    }
    return null;
}
 
开发者ID:AmeliaPessoa,项目名称:DBPA,代码行数:11,代码来源:SnappyDB.java

示例12: searchPostById

import com.snappydb.SnappydbException; //导入方法依赖的package包/类
@Override
protected Post searchPostById(Post post) {
    try {
        return snappydb.getObject(POST_PREFIX+post.getKey(), Post.class);
    } catch (SnappydbException e) {
        e.printStackTrace();
    }
    return null;
}
 
开发者ID:AmeliaPessoa,项目名称:DBPA,代码行数:10,代码来源:SnappyDB.java

示例13: selectCountPosts

import com.snappydb.SnappydbException; //导入方法依赖的package包/类
@Override
protected long selectCountPosts() {
    try {
        return snappydb.countKeys(POST_PREFIX);
    } catch (SnappydbException e) {
        e.printStackTrace();
    }
    return 0;
}
 
开发者ID:AmeliaPessoa,项目名称:DBPA,代码行数:10,代码来源:SnappyDB.java

示例14: selectCountAuthors

import com.snappydb.SnappydbException; //导入方法依赖的package包/类
@Override
protected long selectCountAuthors() {
    try {
        return snappydb.countKeys(AUTHOR_PREFIX);
    } catch (SnappydbException e) {
        e.printStackTrace();
    }
    return 0;
}
 
开发者ID:AmeliaPessoa,项目名称:DBPA,代码行数:10,代码来源:SnappyDB.java

示例15: close

import com.snappydb.SnappydbException; //导入方法依赖的package包/类
@Override
protected void close() {
    try {
        snappydb.close();
    } catch (SnappydbException e) {
        e.printStackTrace();
    }
}
 
开发者ID:AmeliaPessoa,项目名称:DBPA,代码行数:9,代码来源:SnappyDB.java


注:本文中的com.snappydb.SnappydbException.printStackTrace方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。