public class RecordImpl extends java.lang.Object implements Record, java.io.Serializable
| 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.
|
java.lang.String |
toString() |
public java.lang.String getId()
Recordpublic java.lang.String getSource()
public AnyMap getMetadata()
RecordgetMetadata in interface Recordpublic int attachmentSize()
RecordattachmentSize in interface Recordpublic Attachment getAttachment(java.lang.String name)
RecordgetAttachment in interface Recordname - attachment name.public byte[] getAttachmentAsBytes(java.lang.String name)
RecordgetAttachmentAsBytes in interface Recordname - attachment name.public java.util.Iterator<java.lang.String> getAttachmentNames()
RecordgetAttachmentNames in interface Recordpublic boolean hasAttachments()
RecordhasAttachments in interface Recordpublic boolean hasAttachment(java.lang.String name)
RecordhasAttachment in interface Recordname - attachment name.public void removeAttachment(java.lang.String name)
RecordremoveAttachment in interface Recordname - attachment name.public void removeAttachments()
RecordremoveAttachments in interface Recordpublic void setAttachment(Attachment attachment)
RecordsetAttachment in interface Recordattachment - the new attachment.public void setAttachment(java.lang.String name,
byte[] attachment)
RecordsetAttachment in interface Recordname - attachment name.attachment - attachment value.public void setId(java.lang.String id)
Recordpublic void setSource(java.lang.String source)
Recordpublic java.lang.String toString()
toString in class java.lang.Objectpublic DataFactory getFactory()
RecordgetFactory in interface Record