Package org.b3log.latke.repository

Examples of org.b3log.latke.repository.Query.addFilter()


            throws RepositoryException {
        final Query query = new Query();
        query.addFilter(BlogSync.BLOG_SYNC_EXTERNAL_ARTICLE_ID,
                        FilterOperator.EQUAL,
                        externalArticleId);
        query.addFilter(BlogSync.BLOG_SYNC_EXTERNAL_BLOGGING_SYS,
                        FilterOperator.EQUAL, externalBloggingSys);

        final JSONObject result = get(query);
        final JSONArray array = result.optJSONArray(Keys.RESULTS);
View Full Code Here


    @Override
    public JSONObject getByExternalArticleId(final String externalArticleId,
                                             final String externalBloggingSys)
            throws RepositoryException {
        final Query query = new Query();
        query.addFilter(BlogSync.BLOG_SYNC_EXTERNAL_ARTICLE_ID,
                        FilterOperator.EQUAL,
                        externalArticleId);
        query.addFilter(BlogSync.BLOG_SYNC_EXTERNAL_BLOGGING_SYS,
                        FilterOperator.EQUAL, externalBloggingSys);
View Full Code Here

            throws RepositoryException {
        final Query query = new Query();
        query.addFilter(BlogSync.BLOG_SYNC_EXTERNAL_ARTICLE_ID,
                        FilterOperator.EQUAL,
                        externalArticleId);
        query.addFilter(BlogSync.BLOG_SYNC_EXTERNAL_BLOGGING_SYS,
                        FilterOperator.EQUAL, externalBloggingSys);

        try {
            final JSONObject result = get(query);
            final JSONArray array = result.getJSONArray(Keys.RESULTS);
View Full Code Here

    @Override
    public JSONObject getBySoloArticleId(final String soloArticleId,
                                         final String externalBloggingSys)
            throws RepositoryException {
        final Query query = new Query();
        query.addFilter(Article.ARTICLE + "_" + Keys.OBJECT_ID,
                        FilterOperator.EQUAL, soloArticleId);
        query.addFilter(BlogSync.BLOG_SYNC_EXTERNAL_BLOGGING_SYS,
                        FilterOperator.EQUAL, externalBloggingSys);
        try {
            final JSONObject result = get(query);
View Full Code Here

                                         final String externalBloggingSys)
            throws RepositoryException {
        final Query query = new Query();
        query.addFilter(Article.ARTICLE + "_" + Keys.OBJECT_ID,
                        FilterOperator.EQUAL, soloArticleId);
        query.addFilter(BlogSync.BLOG_SYNC_EXTERNAL_BLOGGING_SYS,
                        FilterOperator.EQUAL, externalBloggingSys);
        try {
            final JSONObject result = get(query);
            final JSONArray array = result.getJSONArray(Keys.RESULTS);
View Full Code Here

    }

    @Override
    public JSONObject getByAddress(final String address) {
        final Query query = new Query();
        query.addFilter(Link.LINK_ADDRESS, FilterOperator.EQUAL, address);

        try {
            final JSONObject result = get(query);
            final JSONArray array = result.getJSONArray(Keys.RESULTS);
View Full Code Here

    }

    @Override
    public JSONObject getByOrder(final int order) {
        final Query query = new Query();
        query.addFilter(Link.LINK_ORDER, FilterOperator.EQUAL, order);

        try {
            final JSONObject result = get(query);
            final JSONArray array = result.getJSONArray(Keys.RESULTS);
View Full Code Here

    }

    @Override
    public JSONObject getByPermalink(final String permalink) {
        final Query query = new Query();
        query.addFilter(Page.PAGE_PERMALINK,
                        FilterOperator.EQUAL, permalink);
        try {
            final JSONObject result = get(query);
            final JSONArray array = result.getJSONArray(Keys.RESULTS);
View Full Code Here

    }

    @Override
    public JSONObject getByOrder(final int order) {
        final Query query = new Query();
        query.addFilter(Page.PAGE_ORDER, FilterOperator.EQUAL, order);
        try {
            final JSONObject result = get(query);
            final JSONArray array = result.getJSONArray(Keys.RESULTS);

            if (0 == array.length()) {
View Full Code Here

    @Override
    public JSONObject getByExternalBloggingSystem(
            final String externalBloggingSystem) {
        final Query query = new Query();
        query.addFilter(BlogSync.BLOG_SYNC_EXTERNAL_BLOGGING_SYS,
                        FilterOperator.EQUAL, externalBloggingSystem);


        try {
            final JSONObject result = get(query);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.