public final class InventoryContract extends Object
IInventoryService
.
The content provider for inventory may be used directly by apps wishing to
use a Cursor
to navigate a large inventory
database. Read
Content provider basics
for an overview of how to interact with a content provider. In this case
only methods which read data such as
ContentResolver.query(Uri, String[], Bundle, CancellationSignal)
will work. Methods which write data will be rejected.
Using this contract requires the client app have
Permission.INVENTORY_R
permission.
Note that there are frequently multiple content URIs which join multiple
tables such as InventoryContract.ItemModifierGroup.CONTENT_WITH_NAME_URI
.
These join tables are very helpful when a client app needs to display
filtered results. In this particular example an app can retrieve
ModifierGroup
details for a particular
Item
by querying the above content URI
and selecting by InventoryContract.ItemModifierGroupColumns.ITEM_ID
.
To insert/update/delete inventory use the
IInventoryService
via binding to the
AIDL service, or through the wrapper class
InventoryConnector
.
The inventory database is typically kept up to date using push notifications
from the Clover server to the client, so in most cases any changes made
through the web or through another device will be immediately reflected
on all devices belonging to a particular merchant. When network connections
are available but unreliable, the inventory service will attempt to
synchronize its local database (i.e. the backing store for this content
provider) with the server on a regular basis, usually on an interval no
greater than 3 hours.Modifier and Type | Class and Description |
---|---|
static class |
InventoryContract.Attribute
Contract for accessing
Attribute instances via content provider. |
static interface |
InventoryContract.AttributeColumns
These columns correspond to fields of an
Attribute . |
static class |
InventoryContract.Category
Contract for accessing
Category instances via content provider. |
static interface |
InventoryContract.CategoryColumns
These columns correspond to fields of an
Category . |
static class |
InventoryContract.Discount
Contract for accessing
Discount instances via content provider. |
static interface |
InventoryContract.DiscountColumns
These columns correspond to fields of an
Discount . |
static class |
InventoryContract.Group
Contract for accessing
ModifierGroup instances via content provider. |
static interface |
InventoryContract.GroupColumns
These columns correspond to fields of an
ModifierGroup . |
static class |
InventoryContract.Item
Contract for accessing
Item instances via content provider. |
static interface |
InventoryContract.ItemColumns
These columns correspond to fields of an
Item . |
static class |
InventoryContract.ItemGroup
Contract for accessing
ItemGroup instances via content provider. |
static interface |
InventoryContract.ItemGroupColumns
These columns correspond to fields of an
ItemGroup . |
static interface |
InventoryContract.ItemGroupsAndItemsColumns
|
static class |
InventoryContract.ItemModifierGroup
Contract for accessing
ItemModifierGroup instances via content provider. |
static interface |
InventoryContract.ItemModifierGroupColumns
These columns correspond to fields of an
ItemModifierGroup . |
static class |
InventoryContract.ItemOption
Contract for accessing
OptionItem instances via content provider. |
static interface |
InventoryContract.ItemOptionColumns
These columns correspond to fields of an
OptionItem . |
static class |
InventoryContract.ItemStock
Contract for accessing
ItemStock instances via content provider. |
static interface |
InventoryContract.ItemStockColumns
These columns correspond to fields of an
ItemStock . |
static class |
InventoryContract.ItemTag
Contract for accessing
TagItem instances via content provider. |
static interface |
InventoryContract.ItemTagColumns
These columns correspond to fields of an
TagItem . |
static class |
InventoryContract.ItemTaxRate
Contract for accessing
TaxRateItem instances via content provider. |
static interface |
InventoryContract.ItemTaxRateColumns
These columns correspond to fields of an
TaxRateItem . |
static class |
InventoryContract.MenuItem
Contract for accessing
MenuItem instances via
content provider. |
static interface |
InventoryContract.MenuItemColumns
These columns correspond to fields of an
MenuItem . |
static class |
InventoryContract.MenuModifier
Contract for accessing
MenuModifier instances via
content provider. |
static interface |
InventoryContract.MenuModifierColumns
These columns correspond to fields of an
MenuModifier . |
static class |
InventoryContract.MenuModifierGroup
Contract for accessing
MenuModifierGroup instances
via content provider. |
static interface |
InventoryContract.MenuModifierGroupColumns
These columns correspond to fields of an
MenuModifierGroup . |
static class |
InventoryContract.MenuSection
Contract for accessing
MenuSection instances via
content provider. |
static interface |
InventoryContract.MenuSectionColumns
These columns correspond to fields of an
MenuSection . |
static class |
InventoryContract.Modifier
Contract for accessing
Modifier instances via content provider. |
static interface |
InventoryContract.ModifierColumns
These columns correspond to fields of an
Modifier . |
static class |
InventoryContract.Option
Contract for accessing
Option instances via content provider. |
static interface |
InventoryContract.OptionColumns
These columns correspond to fields of an
Option . |
static class |
InventoryContract.PrinterTag
Contract for accessing
TagPrinter instances via content provider. |
static interface |
InventoryContract.PrinterTagColumns
These columns correspond to fields of an
TagPrinter . |
static class |
InventoryContract.Tag
Contract for accessing
Tag instances via content provider. |
static interface |
InventoryContract.TagColumns
These columns correspond to fields of an
Tag . |
static class |
InventoryContract.TaxRate
Contract for accessing
TaxRate instances via content provider. |
static interface |
InventoryContract.TaxRateColumns
These columns correspond to fields of an
TaxRate . |
static class |
InventoryContract.TaxRule
Contract for accessing tax rule information.
|
static interface |
InventoryContract.TaxRuleColumns
Columns containing data for tax rules.
|
static class |
InventoryContract.TaxRuleItem
Contract for accessing tax rule and
Item
associations via content provider. |
static interface |
InventoryContract.TaxRuleItemColumns
Columns for rows of data mapping UUIDs of tax rules to items.
|
static class |
InventoryContract.TaxRuleTaxRate
Contract for accessing tax rule and
TaxRate
association data. |
static interface |
InventoryContract.TaxRuleTaxRateColumns
Columns for rows of data mapping UUIDs of tax rule to
TaxRate . |
Modifier and Type | Field and Description |
---|---|
static String |
AUTHORITY
The authority for the inventory provider
|
static Uri |
AUTHORITY_URI
A content:// style uri to the authority for the modifiers provider
|
static String |
COUNT_KEY
Integer result returned by call count methods.
|
static String |
GET_COUNT_METHOD
Call method to get the inventory item count.
|
static String |
GET_ITEM_MOD_OR_VAR_COUNT_METHOD
Call method to get the inventory item count.
|
static String |
GET_ITEMS_WITH_MODIFIERS_METHOD
Call method to get the inventory item count with modifiers.
|
static String |
GET_ITEMS_WITH_VARIANTS_METHOD
Call method to get the inventory item count with variants.
|
Constructor and Description |
---|
InventoryContract() |
public static final String GET_COUNT_METHOD
public static final String GET_ITEM_MOD_OR_VAR_COUNT_METHOD
public static final String GET_ITEMS_WITH_VARIANTS_METHOD
public static final String GET_ITEMS_WITH_MODIFIERS_METHOD
public static final String COUNT_KEY
public static final String AUTHORITY
public static final Uri AUTHORITY_URI