@Override public void validate() { genClient.validateLength(getId(), 13); genClient.validateLength(getVersionName(), 255); genClient.validateLength(getHash(), 64); genClient.validateLength(getHashOriginal(), 64); }
/** Constructs a new instance from the given JSON String. */ public Item(String json) throws IllegalArgumentException { try { genClient.setJsonObject(new org.json.JSONObject(json)); } catch (org.json.JSONException e) { throw new IllegalArgumentException("invalid json", e); } }
@Override public void validate() { genClient.validateLength(getId(), 13); genClient.validateNull(getName(), "name"); genClient.validateLength(getName(), 127); genClient.validateLength(getAlternateName(), 127); genClient.validateLength(getCode(), 100); genClient.validateLength(getSku(), 100); genClient.validateNull(getPrice(), "price"); if (getPrice() != null && (getPrice() < 0)) throw new IllegalArgumentException("Invalid value for 'getPrice()'"); genClient.validateLength(getUnitName(), 64); }
@Override public String toString() { return genClient.toString(); }
/** Copy all the changed fields from the given source to this instance. */ public void mergeChanges(Item src) { if (src.genClient.getChangeLog() != null) { genClient.mergeChanges(new Item(src).getJSONObject(), src.genClient); } }
/** Returns true if this instance has any changes. */ public boolean containsChanges() { return genClient.containsChanges(); }
/** Clears the 'itemStock' field, the 'has' method for this field will now return false */ public void clearItemStock() { genClient.clear(CacheKey.itemStock); }
/** Clears the 'categories' field, the 'has' method for this field will now return false */ public void clearCategories() { genClient.clear(CacheKey.categories); }
/** Clears the 'taxRates' field, the 'has' method for this field will now return false */ public void clearTaxRates() { genClient.clear(CacheKey.taxRates); }
/** Clears the 'name' field, the 'has' method for this field will now return false */ public void clearName() { genClient.clear(CacheKey.name); }
/** Clears the 'itemGroup' field, the 'has' method for this field will now return false */ public void clearItemGroup() { genClient.clear(CacheKey.itemGroup); }
/** Clears the 'hidden' field, the 'has' method for this field will now return false */ public void clearHidden() { genClient.clear(CacheKey.hidden); }
/** Clears the 'id' field, the 'has' method for this field will now return false */ public void clearId() { genClient.clear(CacheKey.id); }
/** Sets the field 'modifiedTime'. */ public Item setModifiedTime(java.lang.Long modifiedTime) { return genClient.setOther(modifiedTime, CacheKey.modifiedTime); }
/** * Sets the field 'itemStock'. * * <p>The parameter is not copied so changes to it will be reflected in this instance and * vice-versa. */ public Item setItemStock(com.clover.sdk.v3.inventory.ItemStock itemStock) { return genClient.setRecord(itemStock, CacheKey.itemStock); }
/** Clears the 'isRevenue' field, the 'has' method for this field will now return false */ public void clearIsRevenue() { genClient.clear(CacheKey.isRevenue); }
/** Clears the 'stockCount' field, the 'has' method for this field will now return false */ public void clearStockCount() { genClient.clear(CacheKey.stockCount); }
/** Clears the 'alternateName' field, the 'has' method for this field will now return false */ public void clearAlternateName() { genClient.clear(CacheKey.alternateName); }
/** Clears the 'modifierGroups' field, the 'has' method for this field will now return false */ public void clearModifierGroups() { genClient.clear(CacheKey.modifierGroups); }
/** Clears the 'code' field, the 'has' method for this field will now return false */ public void clearCode() { genClient.clear(CacheKey.code); }
/** Clears the 'tags' field, the 'has' method for this field will now return false */ public void clearTags() { genClient.clear(CacheKey.tags); }
/** Clears the 'sku' field, the 'has' method for this field will now return false */ public void clearSku() { genClient.clear(CacheKey.sku); }
/** Clears the 'modifiedTime' field, the 'has' method for this field will now return false */ public void clearModifiedTime() { genClient.clear(CacheKey.modifiedTime); }
/** Clears the 'priceType' field, the 'has' method for this field will now return false */ public void clearPriceType() { genClient.clear(CacheKey.priceType); }
/** * Reset the log of changes made to this instance, calling copyChanges() after this would return * an empty instance. */ public void resetChangeLog() { genClient.resetChangeLog(); }
/** Clears the 'defaultTaxRates' field, the 'has' method for this field will now return false */ public void clearDefaultTaxRates() { genClient.clear(CacheKey.defaultTaxRates); }
/** * Gets a Bundle which can be used to get and set data attached to this instance. The attached * Bundle will be parcelled but not jsonified. */ public android.os.Bundle getBundle() { return genClient.getBundle(); }
/** Clears the 'unitName' field, the 'has' method for this field will now return false */ public void clearUnitName() { genClient.clear(CacheKey.unitName); }
@Override public void writeToParcel(android.os.Parcel dest, int flags) { genClient.writeToParcel(dest, flags); }
/** Clears the 'cost' field, the 'has' method for this field will now return false */ public void clearCost() { genClient.clear(CacheKey.cost); }