Revisited internals

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-publishing/document-store-lib@125518 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2016-03-16 17:39:55 +00:00
parent b73751378f
commit 5cbd6ba072
3 changed files with 28 additions and 2 deletions

View File

@ -46,7 +46,9 @@ public interface AggregatedRecord<A extends AggregatedRecord<A,R>, R extends Rec
public static final String END_TIME = "endTime";
/**
* @return a Set containing the keys of required fields
* @return a Set containing the keys of aggregated fields
* The returned Set MUST be a copy of the internal representation.
* Any modification to the returned Set MUST not affect the object
*/
public Set<String> getAggregatedFields();

View File

@ -39,9 +39,18 @@ public interface Record extends Comparable<Record>, Serializable {
/**
* @return a Set containing the keys of required fields
* The returned Set MUST be a copy of the internal representation.
* Any modification to the returned Set MUST not affect the object
*/
public Set<String> getRequiredFields();
/**
* @return a Set containing the keys of computed fields
* The returned Set MUST be a copy of the internal representation.
* Any modification to the returned Set MUST not affect the object
*/
public Set<String> getComputedFields();
/**
* Return the {@link Record} Type
* @return {@link Record} Type

View File

@ -190,7 +190,22 @@ public abstract class AbstractRecord implements Record {
*/
@Override
public Set<String> getRequiredFields() {
return requiredFields;
return new HashSet<String>(requiredFields);
}
/**
* {@inheritDoc}
*/
@Override
public Set<String> getComputedFields() {
return new HashSet<String>(computedFields);
}
/**
* {@inheritDoc}
*/
public Set<String> getAggregatedFields() {
return new HashSet<String>(aggregatedFields);
}
@Override