com.hubspot.chrome.devtools.client.core.indexeddb.ObjectStore Maven / Gradle / Ivy
package com.hubspot.chrome.devtools.client.core.indexeddb;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/**
* Object store.
*/
public final class ObjectStore {
private String name;
private KeyPath keyPath;
private Boolean autoIncrement;
private List indexes;
@JsonCreator
public ObjectStore(@JsonProperty("name") String name, @JsonProperty("keyPath") KeyPath keyPath,
@JsonProperty("autoIncrement") Boolean autoIncrement,
@JsonProperty("indexes") List indexes) {
this.name = name;
this.keyPath = keyPath;
this.autoIncrement = autoIncrement;
this.indexes = indexes;
}
public String getName() {
return name;
}
public KeyPath getKeyPath() {
return keyPath;
}
public Boolean getAutoIncrement() {
return autoIncrement;
}
public List getIndexes() {
return indexes;
}
public static ObjectStore.Builder builder() {
return new ObjectStore.Builder();
}
public static final class Builder {
private String name;
private KeyPath keyPath;
private Boolean autoIncrement;
private List indexes;
private Builder() {
}
public ObjectStore.Builder setName(String name) {
this.name = name;
return this;
}
public ObjectStore.Builder setKeyPath(KeyPath keyPath) {
this.keyPath = keyPath;
return this;
}
public ObjectStore.Builder setAutoIncrement(Boolean autoIncrement) {
this.autoIncrement = autoIncrement;
return this;
}
public ObjectStore.Builder setIndexes(List indexes) {
this.indexes = indexes;
return this;
}
public ObjectStore build() {
return new ObjectStore(name, keyPath, autoIncrement, indexes);
}
}
}