public class Coupon
extends java.lang.Object
implements android.provider.BaseColumns
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COLUMN_CODE |
static java.lang.String |
COLUMN_COUPON_ID |
static java.lang.String |
COLUMN_END_DATE |
static java.lang.String |
COLUMN_LINK |
static java.lang.String |
COLUMN_NAME |
static java.lang.String |
COLUMN_OBJECT_ID |
static java.lang.String |
COLUMN_START_DATE |
static java.lang.String |
FROM_ID |
static java.lang.String |
FROM_OBJECT |
static java.lang.String |
ID |
static java.lang.String |
PATH |
Constructor and Description |
---|
Coupon() |
Modifier and Type | Method and Description |
---|---|
static android.net.Uri |
BuildUriFromId(android.content.Context context,
java.lang.String couponId)
Get the uri of a specific coupon, within the GiiftProvider, from its id.
|
static android.net.Uri |
BuildUriFromObject(android.content.Context context,
java.lang.String objectId)
Get the uri of all coupons, within the GiiftProvider, linked to an object.
|
static java.lang.String |
GetContentItemType(android.content.Context context) |
static java.lang.String |
GetContentType(android.content.Context context) |
static android.net.Uri |
GetContentUri(android.content.Context context)
Get uri of the about contents in the GiiftProvider.
|
static java.lang.String |
GetIdFromUri(android.net.Uri uri)
Get a coupon id from its uri
|
static java.lang.String |
GetObjectFromUri(android.net.Uri uri)
Deconstruct a uri to extract the object id
|
static android.net.Uri |
UpdateFromJSon(android.content.Context context,
org.json.JSONObject obj,
java.lang.String objectId)
Update/Insert the definition of a coupon from its JSON representation, into the GiiftProvider
|
public static final java.lang.String ID
public static final java.lang.String PATH
public static final java.lang.String FROM_OBJECT
public static final java.lang.String FROM_ID
public static final java.lang.String COLUMN_COUPON_ID
public static final java.lang.String COLUMN_NAME
public static final java.lang.String COLUMN_LINK
public static final java.lang.String COLUMN_START_DATE
public static final java.lang.String COLUMN_END_DATE
public static final java.lang.String COLUMN_CODE
public static final java.lang.String COLUMN_OBJECT_ID
public static android.net.Uri GetContentUri(@NonNull android.content.Context context)
GiiftProvider
public static java.lang.String GetContentType(@NonNull android.content.Context context)
public static java.lang.String GetContentItemType(@NonNull android.content.Context context)
@Nullable public static android.net.Uri BuildUriFromId(@NonNull android.content.Context context, @NonNull java.lang.String couponId)
couponId
- id of the couponGiiftProvider
@Nullable public static java.lang.String GetIdFromUri(@NonNull android.net.Uri uri)
uri
- Uri to be decompiledGiiftProvider
@Nullable public static java.lang.String GetObjectFromUri(@NonNull android.net.Uri uri)
uri
- uri to be deconstructed@Nullable public static android.net.Uri BuildUriFromObject(@NonNull android.content.Context context, @NonNull java.lang.String objectId)
objectId
- id of the card or of the dmoGiiftProvider
public static android.net.Uri UpdateFromJSon(@NonNull android.content.Context context, @NonNull org.json.JSONObject obj, @NonNull java.lang.String objectId)
context
- used to access the GiiftProviderobj
- json representation of the couponobjectId
- card id or dmo id to which the coupon should be linked.GiiftProvider