Codota Logo
com.ebay.cloud.cms.utils
Code IndexAdd Codota to your IDE (free)

How to use com.ebay.cloud.cms.utils

Best Java code snippets using com.ebay.cloud.cms.utils (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: eBay/YiDB

private final void checkArguments(String branchId, String entityId, String entityType) {
  CheckConditions.checkArgument(!StringUtils.isNullOrEmpty(branchId), "Miss valid branch id");
  CheckConditions.checkArgument(!StringUtils.isNullOrEmpty(entityId), "Miss valid entity id");
  CheckConditions.checkArgument(!StringUtils.isNullOrEmpty(entityType), "Miss valid entity type");
}
origin: eBay/YiDB

public static String generateEmbedIdByEmbedPath(String embedPath, String embedId) {
  CheckConditions.checkArgument(!StringUtils.isNullOrEmpty(embedPath));
  CheckConditions.checkArgument(!StringUtils.isNullOrEmpty(embedId));
  return StringUtils.join(IEntity.ID_SEP, embedPath, embedId);
}

origin: eBay/YiDB

@Override
public Object read(IEntity curEntity, Object value, MetaField metaField) {
  CheckConditions.checkNotNull(metaField);
  if (!(value instanceof DBObject)) {
    return null;
  }
  return value;
}
origin: eBay/YiDB

private void validate(Object value, MetaField metaField) throws IllegalArgumentException {
  CheckConditions.checkNotNull(metaField);
  CheckConditions.checkArgument(value != null, "reference could not be null!");
}
origin: eBay/YiDB

@Override
public long getPercentileValue(int percentile) {
  CheckConditions.checkArgument(percentile >= 0 && percentile <= 100, "percentile %s should be between 1 and 99", percentile);
  long[] tempMetrics = sortedMetrics;
  int offset = percentile * (tempMetrics.length - 1) / 100;
  long ret = 0;
  if (offset < tempMetrics.length) {
    ret = tempMetrics[offset];
  }
  return ret;
}

origin: eBay/YiDB

public static boolean isEquals(Object obj1, Object obj2) {
  if (obj1 instanceof List && obj2 instanceof List) {
    return isEquals((List<?>)obj1, (List<?>)obj2);
  } else {
    return equal(obj1, obj2);
  }
}

origin: eBay/YiDB

public boolean isOverridable(MetaField parentAttr) {
  return EqualsUtil.equal(name, parentAttr.name) 
      && (dataType == parentAttr.dataType)
      && (cardinality == parentAttr.cardinality) 
      && EqualsUtil.equal(description, parentAttr.description);
}
 
origin: eBay/YiDB

  /**
   * add ONE to a 62 based value
   * 
   * @param value a 62 based value in string format
   * @return the value plus ONE in 62 based format
   */
  public static String addOne(String value) {
    int v = sixtyTwoBaseToTen(value);
    return tenBaseToSixtyTwo(v + 1);
  }
}
origin: eBay/YiDB

@Override
public int compareTo(MetricItem o) {
  if (this == o) {
    return 0;
  }
  return EqualsUtil.compare(this.value, o.value);
}
origin: eBay/YiDB

public MongoMetaCacheManager(int maxCacheSize, int cacheExpiredTime,
    int collectionCountCacheSize, int collectionCountCacheExpiredTime) {
  this.nameCache = new ExpirableCache<MetaClass>(maxCacheSize, cacheExpiredTime);
  this.pluralNameCache = new ExpirableCache<MetaClass>(maxCacheSize, cacheExpiredTime);
  this.countCache = new ExpirableCache<Integer>(collectionCountCacheSize, collectionCountCacheExpiredTime);
}
origin: eBay/YiDB

/**
 * className is either metaclass name or pluralName
 * 
 * @param className
 * @return
 */
public MetaClass getMetaClassFromCache(String className) {
  MetaClass m = nameCache.getObject(className);
  if (m == null) {
    m = pluralNameCache.getObject(className);
  }
  return m;
}

origin: eBay/YiDB

@Override
public int hashCode() {
  return EqualsUtil.hashCode(value, timestamp, detail);
}
origin: eBay/YiDB

private final void checkArguments(String branchId, String entityId, String entityType) {
  CheckConditions.checkArgument(!StringUtils.isNullOrEmpty(branchId), "Miss valid branch id");
  CheckConditions.checkArgument(!StringUtils.isNullOrEmpty(entityId), "Miss valid entity id");
  CheckConditions.checkArgument(!StringUtils.isNullOrEmpty(entityType), "Miss valid entity type");
}
origin: eBay/YiDB

public MetricsRegister(MonitorStatisticsManager msm) {
  super();
  CheckConditions.checkNotNull(msm);
  this.msm = msm;
}
origin: eBay/YiDB

protected BsonEntity checkBsonEntity(IEntity entity) {
  CheckConditions.checkArgument(entity instanceof BsonEntity, "Incorrect call of passing non-bson entity to bson persistent impl!");
  return (BsonEntity) entity;
}
origin: eBay/YiDB

@Override
public boolean equals(Object o) {
  if (!(o instanceof MetricItem)) {
    return false;
  }
  return (this.value == ((MetricItem) o).value) && (this.timestamp == ((MetricItem) o).timestamp)
      && EqualsUtil.equal(this.detail, ((MetricItem) o).detail);
}
origin: eBay/YiDB

  @Override
  public int compare(TimedMetric object1, TimedMetric object2) {
    // reverse order
    return EqualsUtil.compare(object2.timestamp, object1.timestamp);
  }
});
origin: eBay/YiDB

private final void checkArguments(String branchId, String entityId, String entityType) {
  CheckConditions.checkArgument(!StringUtils.isNullOrEmpty(branchId), "Miss valid branch id");
  CheckConditions.checkArgument(!StringUtils.isNullOrEmpty(entityId), "Miss valid entity id");
  CheckConditions.checkArgument(!StringUtils.isNullOrEmpty(entityType), "Miss valid entity type");
}
origin: eBay/YiDB

@Override
public boolean equals(Object other) {
  if (this == other) return true;
  
  if (!(other instanceof MetaField)) return false;
  
  MetaField o = (MetaField)other;
  return EqualsUtil.equal(name, o.name) 
      && (dataType == o.dataType)
      && (cardinality == o.cardinality) 
      && (mandatory == o.mandatory)
      && EqualsUtil.equal(description, o.description);
}
origin: eBay/YiDB

  @Override
  public int compareTo(MetricItem o) {
    return EqualsUtil.compare(this.value, o.value);
  }
}
com.ebay.cloud.cms.utils

Most used classes

  • CheckConditions
  • StringUtils
  • EqualsUtil
  • CollectionUtils
  • ExpirableCache
  • MongoUtils,
  • SixtyTwoBase,
  • CMSMongoTest,
  • DateUtils,
  • CacheEntry,
  • MongoUtilsTest
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now