package be.cytomine.client.abst;
import be.cytomine.client.*;
import java.util.*;
import org.json.simple.*;
import be.cytomine.client.AnnotationIndex;
import be.cytomine.client.Server;
import org.json.simple.JSONObject;
/**
* A index entry that store, for an image and a user, the number of annotation created/reviewed
*
* @author ClientBuilder (Loïc Rollus)
* @version 0.1
*
* DO NOT EDIT THIS FILE. THIS IS CODE IS BUILD AUTOMATICALY. ALL CHANGE WILL BE LOST AFTER NEXT GENERATION.
*
* IF YOU WANT TO EDIT A DOMAIN FILE (change method, add property,...), JUST EDIT THE CHILD FILE “YourDomain.java” instead of this file “AbstractYourDomain.java”. I WON'T BE CLEAR IF IT ALREADY EXIST.
*
*/
public abstract class AbstractAnnotationIndex
extends AbstractDomain
{
/**
* Undefined
*
*/
protected Object clazz;
/**
* Undefined
*
*/
protected Object id;
/**
* Undefined
*
*/
protected Object created;
/**
* Undefined
*
*/
protected Object updated;
/**
* Undefined
*
*/
protected Object deleted;
/**
* The user criteria
*
*/
protected Long user;
/**
* The image criteria
*
*/
protected Long image;
/**
* The number of annotation added by the user (auto incr with trigger)
*
*/
protected Long countAnnotation;
/**
* The number of review added by the user (auto incr with trigger)
*
*/
protected Long countReviewedAnnotation;
/**
*
* @return
* Undefined
*/
public Object getClazz()
throws Exception
{
return clazz;
}
/**
*
* @param clazz
* Undefined
*/
public void setClazz(Object clazz)
throws Exception
{
this.clazz = clazz;
}
/**
*
* @return
* Undefined
*/
public Object getId()
throws Exception
{
return id;
}
/**
*
* @param id
* Undefined
*/
public void setId(Object id)
throws Exception
{
this.id = id;
}
/**
*
* @return
* Undefined
*/
public Object getCreated()
throws Exception
{
return created;
}
/**
*
* @param created
* Undefined
*/
public void setCreated(Object created)
throws Exception
{
this.created = created;
}
/**
*
* @return
* Undefined
*/
public Object getUpdated()
throws Exception
{
return updated;
}
/**
*
* @param updated
* Undefined
*/
public void setUpdated(Object updated)
throws Exception
{
this.updated = updated;
}
/**
*
* @return
* Undefined
*/
public Object getDeleted()
throws Exception
{
return deleted;
}
/**
*
* @param deleted
* Undefined
*/
public void setDeleted(Object deleted)
throws Exception
{
this.deleted = deleted;
}
/**
*
* @return
* The user criteria
*/
public Long getUser()
throws Exception
{
return user;
}
/**
*
* @return
* The image criteria
*/
public Long getImage()
throws Exception
{
return image;
}
/**
*
* @return
* The number of annotation added by the user (auto incr with trigger)
*/
public Long getCountAnnotation()
throws Exception
{
return countAnnotation;
}
/**
*
* @return
* The number of review added by the user (auto incr with trigger)
*/
public Long getCountReviewedAnnotation()
throws Exception
{
return countReviewedAnnotation;
}
public void build()
throws Exception
{
}
public void build(JSONObject json)
throws Exception
{
this.clazz =JSONUtils.extractJSONObject(json.get("class"));
this.id =JSONUtils.extractJSONObject(json.get("id"));
this.created =JSONUtils.extractJSONObject(json.get("created"));
this.updated =JSONUtils.extractJSONObject(json.get("updated"));
this.deleted =JSONUtils.extractJSONObject(json.get("deleted"));
this.user =JSONUtils.extractJSONLong(json.get("user"));
this.image =JSONUtils.extractJSONLong(json.get("image"));
this.countAnnotation =JSONUtils.extractJSONLong(json.get("countAnnotation"));
this.countReviewedAnnotation =JSONUtils.extractJSONLong(json.get("countReviewedAnnotation"));
}
public JSONObject toJSON()
throws Exception
{
JSONObject json=new JSONObject();
json.put("class",JSONUtils.formatJSON(this.clazz));
json.put("id",JSONUtils.formatJSON(this.id));
json.put("created",JSONUtils.formatJSON(this.created));
json.put("updated",JSONUtils.formatJSON(this.updated));
json.put("deleted",JSONUtils.formatJSON(this.deleted));
json.put("user",JSONUtils.formatJSON(this.user));
json.put("image",JSONUtils.formatJSON(this.image));
json.put("countAnnotation",JSONUtils.formatJSON(this.countAnnotation));
json.put("countReviewedAnnotation",JSONUtils.formatJSON(this.countReviewedAnnotation));
return json;
}
public static AnnotationIndex listByImage(Server server, Long id, Integer max, Integer offset)
throws Exception
{
throw new Exception("Not yet implemented");
}
}