Package it.unipd.dei.eis.data.entities
Class JsonDataEntity
- java.lang.Object
-
- it.unipd.dei.eis.data.entities.DataEntity
-
- it.unipd.dei.eis.data.entities.JsonDataEntity
-
- All Implemented Interfaces:
IFilterable
public class JsonDataEntity extends DataEntity
A data entity that represents a JSON record.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanafter(Date date)Filters the object by a date.booleanbefore(Date date)Filters the object by a date.booleancontains(String s)Filters the object by a string.
-
-
-
Field Detail
-
id
public final int id
The identifier of the record.
-
title
public final String title
The title of the record.
-
body
public final String body
The body of the record.
-
url
public final String url
The URL of the record.
-
date
public final Date date
The date of the record.
-
source
public final String source
The source of the record.
-
-
Constructor Detail
-
JsonDataEntity
public JsonDataEntity(int id, String title, String body, String url, Date date, String source)Creates a new JSON data entity.- Parameters:
id- the identifier of the recordtitle- the title of the recordbody- the body of the recordurl- the URL of the recorddate- the date of the recordsource- the source of the record
-
-
Method Detail
-
contains
public boolean contains(String s)
Filters the object by a string.- Specified by:
containsin interfaceIFilterable- Overrides:
containsin classDataEntity- Parameters:
s- the string to filter by- Returns:
- true if the object respects the filter, false otherwise
-
before
public boolean before(Date date)
Filters the object by a date.- Specified by:
beforein interfaceIFilterable- Overrides:
beforein classDataEntity- Parameters:
date- the date to filter from- Returns:
- true if the object respects the filter, false otherwise
-
after
public boolean after(Date date)
Filters the object by a date.- Specified by:
afterin interfaceIFilterable- Overrides:
afterin classDataEntity- Parameters:
date- the date to filter to- Returns:
- true if the object respects the filter, false otherwise
-
-