istorage.java

来自「Local Lucene ==================== Prov」· Java 代码 · 共 69 行

JAVA
69
字号
package com.pjaol.ifodder.storage;/** * IStorage interface, provides an encapsulated method to store data * using a predefined storage class. StorageExceptions are thrown upon failure. * @author pjaol * */public interface IStorage {	/**	 * Add a datum to the storage method, returns true if succeeds	 * @param url	 * @return	 * @throws StorageException	 */	public abstract boolean addDatum(String url) throws StorageException;	/**	 * Add a list item to the storage method, returns true if succeeds	 * @param user_id	 * @param datum_id	 * @param description	 * @return	 * @throws StorageException	 */	public abstract boolean addListItem(int user_id, int datum_id,			String description) throws StorageException;	/**	 * Add tag to storage system, returns true if succeeds	 * @param user_id	 * @param li_id	 * @param tag	 * @return	 * @throws StorageException	 */	public abstract boolean addTag(int user_id, int li_id, String tag)			throws StorageException;	/**	 * return the id of a list item, returns -1 if failed	 * @param user_id	 * @param datum_id	 * @return	 * @throws StorageException	 */	public abstract int getListId(int user_id, int datum_id)			throws StorageException;	/**	 * return the id of a datum item, returns -1 if failed	 * @param url	 * @return	 * @throws StorageException	 */	public abstract int getDatumId(String url) throws StorageException;		/**	 * delete a list item, expected to delete all tag_items for a list item as well	 * in a cascading fashion.	 * @param user_id	 * @param datum_id	 * @return	 * @throws StorageException	 */	public abstract boolean deleteListItem(int user_id, int datum_id) throws StorageException;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?