public abstract class AbstractRecord extends Object implements Record
| Constructor and Description |
|---|
AbstractRecord() |
AbstractRecord(Map<String,? extends Serializable> properties) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Record record) |
Set<String> |
getAggregatedFields() |
Set<String> |
getComputedFields() |
Calendar |
getCreationTime()
Return the instant when this
Record was created. |
String |
getId()
Return the unique id for this
Record |
SortedSet<String> |
getQuerableKeys() |
Set<String> |
getRequiredFields() |
Map<String,Serializable> |
getResourceProperties()
Return all resource-specific properties.
|
Serializable |
getResourceProperty(String key)
Return the value of the given resource property.
|
void |
removeResourceProperty(String key)
Remove a property from Record.
|
void |
setCreationTime(Calendar creationTime)
The CreationTime is automatically created by the implementation Class.
|
void |
setId(String id)
The ID SHOULD be automatically created by the implementation Class.
|
void |
setResourceProperties(Map<String,? extends Serializable> properties)
Set all resource-specific properties, replacing existing ones
|
void |
setResourceProperty(String key,
Serializable value)
Set the value of the given resource property.
|
static Calendar |
timestampToCalendar(long millis) |
String |
toString() |
void |
validate()
Validate the Resource Record.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetRecordTypepublic AbstractRecord()
public AbstractRecord(Map<String,? extends Serializable> properties) throws InvalidValueException
InvalidValueExceptionpublic SortedSet<String> getQuerableKeys() throws Exception
getQuerableKeys in interface RecordExceptionpublic Set<String> getRequiredFields()
getRequiredFields in interface Recordpublic Set<String> getComputedFields()
getComputedFields in interface Recordpublic void setId(String id) throws InvalidValueException
RecordsetId in interface Recordid - Unique IDInvalidValueExceptionpublic static Calendar timestampToCalendar(long millis)
public Calendar getCreationTime()
Record was created.getCreationTime in interface RecordRecordpublic void setCreationTime(Calendar creationTime) throws InvalidValueException
Record was created.setCreationTime in interface RecordcreationTime - Creation TimeInvalidValueExceptionpublic Map<String,Serializable> getResourceProperties()
getResourceProperties in interface Recordpublic void setResourceProperties(Map<String,? extends Serializable> properties) throws InvalidValueException
setResourceProperties in interface RecordInvalidValueExceptionpublic Serializable getResourceProperty(String key)
getResourceProperty in interface Recordkey - the key of the requested propertypublic void removeResourceProperty(String key)
RecordremoveResourceProperty in interface Recordkey - the key of the requested property to removepublic void setResourceProperty(String key, Serializable value) throws InvalidValueException
setResourceProperty in interface Recordkey - the key of the requested propertyvalue - the value of the given resource propertyInvalidValueExceptionpublic void validate()
throws InvalidValueException
validate in interface RecordInvalidValueExceptionpublic int compareTo(Record record)
compareTo in interface Comparable<Record>Copyright © 2020. All Rights Reserved.