public interface Record
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
RECORD_ID
key for the record id in metadata.
|
static java.lang.String |
SOURCE
key for the data source in metadata.
|
Modifier and Type | Method and Description |
---|---|
int |
attachmentSize()
get number of attachments.
|
Attachment |
getAttachment(java.lang.String name)
get attachment value with the specified name.
|
byte[] |
getAttachmentAsBytes(java.lang.String name)
get attachment value for the specified name.
|
java.util.Iterator<java.lang.String> |
getAttachmentNames()
Get iterator on names of attachments of this record.
|
DataFactory |
getFactory()
get record factory to use for adding objects to this record.
|
java.lang.String |
getId()
Get the ID of this record.
|
AnyMap |
getMetadata()
Get the metadata of this record.
|
java.lang.String |
getSource()
Get the data source of this record.
|
boolean |
hasAttachment(java.lang.String name)
check if this record has an attachment of the specified name.
|
boolean |
hasAttachments()
check if this record has attachments.
|
void |
removeAttachment(java.lang.String name)
remove attachment for specified name.
|
void |
removeAttachments()
remove attachments.
|
void |
setAttachment(Attachment attachment)
set attachment.
|
void |
setAttachment(java.lang.String name,
byte[] attachment)
set attachment content for the specified name.
|
void |
setId(java.lang.String id)
Set the ID of this record.
|
void |
setSource(java.lang.String source)
Set the data source of this record.
|
static final java.lang.String RECORD_ID
static final java.lang.String SOURCE
DataFactory getFactory()
java.lang.String getId()
void setId(java.lang.String id)
id
- new record IDjava.lang.String getSource()
void setSource(java.lang.String source)
source
- data sourceAnyMap getMetadata()
boolean hasAttachments()
boolean hasAttachment(java.lang.String name)
name
- attachment name.int attachmentSize()
java.util.Iterator<java.lang.String> getAttachmentNames()
Attachment getAttachment(java.lang.String name)
name
- attachment name.byte[] getAttachmentAsBytes(java.lang.String name)
name
- attachment name.void setAttachment(Attachment attachment)
attachment
- the new attachment.void setAttachment(java.lang.String name, byte[] attachment)
name
- attachment name.attachment
- attachment value.void removeAttachment(java.lang.String name)
name
- attachment name.void removeAttachments()