R
- the type of the sandbox log recordpublic abstract class SandboxLogRecord<R extends SandboxLogRecord<R>> extends java.lang.Object implements MetadataEnvironment.DiagnosticRecord
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
_values
The field values.
|
Modifier | Constructor and Description |
---|---|
protected |
SandboxLogRecord(java.util.Map<java.lang.String,java.lang.Object> values)
Creates a record from existing values.
|
protected |
SandboxLogRecord(java.lang.String summary)
Creates a record.
|
Modifier and Type | Method and Description |
---|---|
R |
clone()
Returns an exact copy of this record.
|
abstract R |
clone(java.lang.String newSummary)
Returns a new record which is a copy of this record.
|
java.lang.Object |
get(java.lang.String name)
Gets the value of a field.
|
java.util.List<R> |
getChildren()
Returns the child records of this record if any.
|
java.lang.String |
getDiagnosticRecordId()
Returns the ID of the record.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getPersistableValues()
Returns the values that may be persisted in a new mutable map.
|
java.lang.String |
getSummary()
Returns the summary of this record.
|
boolean |
hasChildren()
Returns
true if this record has child records. |
R |
newChild(R childRecord)
Adds a record as a child record of this record.
|
protected R |
put(java.lang.String name,
java.lang.Object value)
Sets the value of a field.
|
java.lang.String |
toString() |
protected final java.util.Map<java.lang.String,java.lang.Object> _values
protected SandboxLogRecord(java.lang.String summary)
summary
- the summary of the recordjava.lang.IllegalArgumentException
- if the given summary is nullprotected SandboxLogRecord(java.util.Map<java.lang.String,java.lang.Object> values)
values
- the existing valuesjava.lang.NullPointerException
- If the given map is nullpublic final java.lang.String getSummary()
public java.lang.String toString()
toString
in class java.lang.Object
public abstract R clone(java.lang.String newSummary)
newSummary
- the new summary; null
if the summary should
be kept the samepublic R clone()
clone
in class java.lang.Object
clone(String)
public java.lang.Object get(java.lang.String name)
name
- the name of the fieldnull
if the field is
undefined or not setprotected R put(java.lang.String name, java.lang.Object value)
name
- the name of the fieldvalue
- the value of the fieldprotected java.util.Map<java.lang.String,java.lang.Object> getPersistableValues()
public java.lang.String getDiagnosticRecordId()
MetadataEnvironment.DiagnosticRecord
getDiagnosticRecordId
in interface MetadataEnvironment.DiagnosticRecord
public R newChild(R childRecord)
childRecord
- the record to be added as a childjava.lang.IllegalArgumentException
- if the given record is nullpublic java.util.List<R> getChildren()
public boolean hasChildren()
true
if this record has child records.true
if this record has child records