org.jSyncManager.API.Protocol.Util.StdApps
Class AbstractAppBlock
- Serializable
public abstract class AbstractAppBlock
This interface provides the common method signatures for App Block classes.
categories
protected CategoryInfo[] categories
An array to hold category information.
lastUniqueID
protected byte lastUniqueID
The last unique ID in use.
numCategories
protected int numCategories
The number of categories in this database.
sortOrder
protected byte sortOrder
The sort order for this database.
AbstractAppBlock
public AbstractAppBlock()
addCategory
public void addCategory(CategoryInfo newCategory)
Adds a category to this application block.
newCategory - the new category to be added.
findCategoryInfo
public int findCategoryInfo(int i)
Find the category info block, given the category ID.
- the index of the category info block.
findCategoryInfoByName
public int findCategoryInfoByName(String categoryName)
Find a category info object, given the category ID.
categoryName - the name of the category to search for.
- the index of the category info block, or -1 if not found.
findCategoryInfoObject
public CategoryInfo findCategoryInfoObject(int i)
Find a category info object, given the category ID.
- the matching CategoryInfo object, or null if no matching category object is found.
getCategories
public CategoryInfo[] getCategories()
Return an array of the category info blocks.
- an array of the category info blocks.
getCategoryInfo
public CategoryInfo getCategoryInfo(int i)
Get the category info block given the category index.
i - int index to the desired category info.
- the CategoryInfo object containing the requested category information.
getLastUniqueID
public byte getLastUniqueID()
Return the last unique ID.
getNumCategories
public int getNumCategories()
Return the number of categories.
- the number of categories.
getSortOrder
public byte getSortOrder()
Get the sort order for the data records.
- the sort order used by this database.
setCategoryInfo
public void setCategoryInfo(CategoryInfo categoryinfo,
int i)Set the category info block, given the index.
categoryinfo - the CategoryInfo object to set.i - Index in which to insert of the category info.
setLastUniqueID
public void setLastUniqueID(byte newValue)
Set the last unique ID value.
newValue - the last unique ID value.
setSortOrder
public void setSortOrder(byte order)
Set the sort order of this application block.
order - byte representation of the sort order.