![JAR search and dependency download from the Maven repository](/logo.png)
com.evrythng.thng.resource.model.store.Batch Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of thng-resource-model Show documentation
Show all versions of thng-resource-model Show documentation
Models for REST resources representations.
/*
* (c) Copyright 2015 EVRYTHNG Ltd London / Zurich
* www.evrythng.com
*/
package com.evrythng.thng.resource.model.store;
import com.evrythng.thng.resource.model.core.DurableResourceModel;
import java.util.Map;
/**
* Model representation for batches.
*/
public class Batch extends DurableResourceModel {
private static final long serialVersionUID = -4440334109484551488L;
public static final String FIELD_NAME = "name";
public static final String FIELD_DESCRIPTION = "description";
public static final String FIELD_STATUS = "status";
public static final String FIELD_IDENTIFIERS = "identifiers";
public enum Status {
EMPTY, IN_PROGRESS, COMPLETE, SEALED
}
public static final class ResourceCount {
public static final String FIELD_THNGS = "thngs";
private Integer thngs;
public static final String FIELD_URL_BINDINGS = "urlBindings";
private Integer urlBindings;
public Integer getThngs() {
return thngs;
}
public void setThngs(final Integer thngs) {
this.thngs = thngs;
}
public Integer getUrlBindings() {
return urlBindings;
}
public void setUrlBindings(final Integer urlBindings) {
this.urlBindings = urlBindings;
}
}
private String name;
private String description;
private Map identifiers;
private Status status;
// TODO _MS_ validate here on creation: read-only
public static final String FIELD_RESOURCE_COUNTS_BY_PRODUCT = "resourceCountsByProduct";
public static final String NO_PRODUCT_RESOURCES_KEY = "NO_PRODUCT";
private Map resourceCountsByProduct;
public String getName() {
return name;
}
public void setName(final String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(final String description) {
this.description = description;
}
public Map getResourceCountsByProduct() {
return resourceCountsByProduct;
}
public void setResourceCountsByProduct(final Map resourceCountsByProduct){
this.resourceCountsByProduct = resourceCountsByProduct;
}
public Map getIdentifiers() {
return identifiers;
}
public void setIdentifiers(final Map identifiers) {
this.identifiers = identifiers;
}
public Status getStatus() {
return status;
}
public void setStatus(final Status status) {
this.status = status;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("Batch{");
sb.append("name='").append(name).append('\'');
sb.append(", description='").append(description).append('\'');
sb.append(", identifiers='").append(identifiers).append('\'');
sb.append(", status=").append(status);
sb.append('}');
return sb.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy