All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.contentful.java.cda.AbsQuery Maven / Gradle / Ivy

There is a newer version: 9.1.0
Show newest version
package com.contentful.java.cda;

import java.util.HashMap;
import java.util.Map;

import static com.contentful.java.cda.Util.resourcePath;

abstract class AbsQuery> {
  final Class type;

  final CDAClient client;

  final Map params = new HashMap();

  AbsQuery(Class type, CDAClient client) {
    this.type = type;
    this.client = client;
  }

  protected String path() {
    return resourcePath(type);
  }

  @SuppressWarnings("unchecked")
  public E where(String key, String value) {
    params.put(key, value);
    return (E) this;
  }

  @SuppressWarnings("unchecked")
  protected E where(Map params) {
    this.params.clear();
    this.params.putAll(params);
    return (E) this;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy