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

    genClient.validateLength(getVersionName(), 255);

    genClient.validateLength(getHash(), 64);

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