@@ -0,0 +1,2620 @@
+/*%0A * Copyright 2017 Isaac Pateau%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage com.zaclimon.iptvproviderlibrary.persistence;%0A%0Aimport com.zaclimon.iptvproviderlibrary.model.AvContent;%0A%0Aimport java.util.List;%0A%0A/**%0A * Persistence API for %7B@link AvContent%7D.%0A * Will mostly be used if a content must be persisted to the disk (For caching or other reasons)%0A *%0A * @author zaclimon%0A * Creation date: 11/08/17%0A */%0A%0Apublic interface ContentPersistence %7B%0A%0A    /**%0A     * Gives a content to be persisted%0A     *%0A     * @param avContent the content that will be saved%0A     */%0A    void insert(AvContent avContent);%0A%0A    /**%0A     * Gives a list of content to be to be persisted%0A     *%0A     * @param avContents the list that will be saved%0A     */%0A    void insert(List%3CAvContent%3E avContents);%0A%0A    /**%0A     * Deletes a category based on %7B@link AvContent#mContentCategory%7D%0A     *%0A     * @param category the category which will get deleted.%0A     */%0A    void deleteCategory(String category);%0A%0A    /**%0A     * Deletes all the items that have been persisted.%0A     */%0A    void deleteAllItems();%0A%0A    /**%0A     * Lists all the items that have been persisted.%0A     *%0A     * @return the list of all the %7B@link AvContent%7D that have been persisted%0A     */%0A    List%3CAvContent%3E listAllItems();%0A%0A    /**%0A     * Gives a list of the %7B@link AvContent%7D belonging to a given category. The list can be sorted%0A     * or not.%0A     *%0A     * @param category the given category for a content%0A     * @param isAlphabeticallySorted whether the retrieved contents should be sorted by alphabetical order%0A     * @return the list of contents%0A     */%0A    List%3CAvContent%3E searchCategory(String category, boolean isAlphabeticallySorted);%0A%0A    /**%0A     * Gets the total size of the persistence medium%0A     *%0A     * @return the total number of elements for this medium.%0A     */%0A    int size();%0A%0A    /**%0A     * Gets the size for a given category in the persistence medium%0A     *%0A     * @param category the category in which a size is wanted%0A     * @return the total number of elements for that given category.%0A     */%0A    int size(String category);%0A%7D%0A

Implement a basic API for AvContent persistence