@Override
  public void validate() {
    genClient.validateLength(getId(), 13);

    genClient.validateLength(getVersionName(), 255);

    genClient.validateLength(getHash(), 64);

    genClient.validateLength(getHashOriginal(), 64);
  }
Пример #2
0
 /** 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);
   }
 }
Пример #3
0
  @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);
  }
Пример #4
0
 @Override
 public String toString() {
   return genClient.toString();
 }
Пример #5
0
 /** 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);
   }
 }
Пример #6
0
 /** Returns true if this instance has any changes. */
 public boolean containsChanges() {
   return genClient.containsChanges();
 }
Пример #7
0
 /** Clears the 'itemStock' field, the 'has' method for this field will now return false */
 public void clearItemStock() {
   genClient.clear(CacheKey.itemStock);
 }
Пример #8
0
 /** Clears the 'categories' field, the 'has' method for this field will now return false */
 public void clearCategories() {
   genClient.clear(CacheKey.categories);
 }
Пример #9
0
 /** Clears the 'taxRates' field, the 'has' method for this field will now return false */
 public void clearTaxRates() {
   genClient.clear(CacheKey.taxRates);
 }
Пример #10
0
 /** Clears the 'name' field, the 'has' method for this field will now return false */
 public void clearName() {
   genClient.clear(CacheKey.name);
 }
Пример #11
0
 /** Clears the 'itemGroup' field, the 'has' method for this field will now return false */
 public void clearItemGroup() {
   genClient.clear(CacheKey.itemGroup);
 }
Пример #12
0
 /** Clears the 'hidden' field, the 'has' method for this field will now return false */
 public void clearHidden() {
   genClient.clear(CacheKey.hidden);
 }
Пример #13
0
 /** Clears the 'id' field, the 'has' method for this field will now return false */
 public void clearId() {
   genClient.clear(CacheKey.id);
 }
Пример #14
0
 /** Sets the field 'modifiedTime'. */
 public Item setModifiedTime(java.lang.Long modifiedTime) {
   return genClient.setOther(modifiedTime, CacheKey.modifiedTime);
 }
Пример #15
0
 /**
  * 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);
 }
Пример #16
0
 /** Clears the 'isRevenue' field, the 'has' method for this field will now return false */
 public void clearIsRevenue() {
   genClient.clear(CacheKey.isRevenue);
 }
Пример #17
0
 /** Clears the 'stockCount' field, the 'has' method for this field will now return false */
 public void clearStockCount() {
   genClient.clear(CacheKey.stockCount);
 }
Пример #18
0
 /** Clears the 'alternateName' field, the 'has' method for this field will now return false */
 public void clearAlternateName() {
   genClient.clear(CacheKey.alternateName);
 }
Пример #19
0
 /** Clears the 'modifierGroups' field, the 'has' method for this field will now return false */
 public void clearModifierGroups() {
   genClient.clear(CacheKey.modifierGroups);
 }
Пример #20
0
 /** Clears the 'code' field, the 'has' method for this field will now return false */
 public void clearCode() {
   genClient.clear(CacheKey.code);
 }
Пример #21
0
 /** Clears the 'tags' field, the 'has' method for this field will now return false */
 public void clearTags() {
   genClient.clear(CacheKey.tags);
 }
Пример #22
0
 /** Clears the 'sku' field, the 'has' method for this field will now return false */
 public void clearSku() {
   genClient.clear(CacheKey.sku);
 }
Пример #23
0
 /** Clears the 'modifiedTime' field, the 'has' method for this field will now return false */
 public void clearModifiedTime() {
   genClient.clear(CacheKey.modifiedTime);
 }
Пример #24
0
 /** Clears the 'priceType' field, the 'has' method for this field will now return false */
 public void clearPriceType() {
   genClient.clear(CacheKey.priceType);
 }
Пример #25
0
 /**
  * Reset the log of changes made to this instance, calling copyChanges() after this would return
  * an empty instance.
  */
 public void resetChangeLog() {
   genClient.resetChangeLog();
 }
Пример #26
0
 /** Clears the 'defaultTaxRates' field, the 'has' method for this field will now return false */
 public void clearDefaultTaxRates() {
   genClient.clear(CacheKey.defaultTaxRates);
 }
Пример #27
0
 /**
  * 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();
 }
Пример #28
0
 /** Clears the 'unitName' field, the 'has' method for this field will now return false */
 public void clearUnitName() {
   genClient.clear(CacheKey.unitName);
 }
Пример #29
0
 @Override
 public void writeToParcel(android.os.Parcel dest, int flags) {
   genClient.writeToParcel(dest, flags);
 }
Пример #30
0
 /** Clears the 'cost' field, the 'has' method for this field will now return false */
 public void clearCost() {
   genClient.clear(CacheKey.cost);
 }