コード例 #1
0
  @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);
 }