org.infinispan.schematic.internal

## Class SchematicEntryLiteral

- java.lang.Object
- - org.infinispan.schematic.internal.SchematicEntryLiteral

- All Implemented Interfaces:
    Cloneable, SchematicEntry

      @SerializeWith(value=SchematicEntryLiteral.Externalizer.class)
      public class SchematicEntryLiteral
      extends Object
      implements SchematicEntry

  The primary implementation of `SchematicEntry`.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SchematicEntryLiteral.Externalizer` The `Externalizer` for `SchematicEntryLiteral` instances.
    `protected static class` | `SchematicEntryLiteral.FieldPath`

    - ### Nested classes/interfaces inherited from interface org.infinispan.schematic.SchematicEntry

      `SchematicEntry.FieldName`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `SchematicEntryLiteral()`
    `protected` | `SchematicEntryLiteral(Document metadata, Document content)`
    `protected` | `SchematicEntryLiteral(MutableDocument document)`
    `` | `SchematicEntryLiteral(String key)`
    `` | `SchematicEntryLiteral(String key, Document content)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Document` | `asDocument()` Get the representation of this entry as a document, which will include the `metadata` and `content` as nested documents.
    `SchematicEntryLiteral` | `clone()`
    `protected MutableDocument` | `data()`
    `protected EditableDocument` | `edit(String key, AdvancedCache<String,SchematicEntry> cache, AdvancedCache<String,SchematicEntry> lockingCache)`
    `Document` | `getContent()` Return this value's content.
    `protected String` | `getKey()`
    `Document` | `getMetadata()` Get the metadata associated with this value.
    `protected String` | `key()`
    `void` | `markRemoved(boolean b)`
    `static SchematicEntry` | `newInstance(Cache<String,SchematicEntry> cache, String key)` Construction only allowed through this factory method.
    `void` | `setContent(Document content)` Set the content for this value to be the supplied Document and set the content type to be " `application/json`".
    `protected void` | `setDocument(Document document)`
    `protected void` | `setMetadata(Document metadata)`
    `String` | `toString()`
    `protected MutableDocument` | `unwrap(Document doc)`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### SchematicEntryLiteral

          public SchematicEntryLiteral()

    - #### SchematicEntryLiteral

          public SchematicEntryLiteral(String key)

    - #### SchematicEntryLiteral

          protected SchematicEntryLiteral(MutableDocument document)

    - #### SchematicEntryLiteral

          public SchematicEntryLiteral(String key,
                               Document content)

    - #### SchematicEntryLiteral

          protected SchematicEntryLiteral(Document metadata,
                               Document content)

  - ### Method Detail

    - #### newInstance

          public static SchematicEntry newInstance(Cache<String,SchematicEntry> cache,
                                   String key)

      Construction only allowed through this factory method. This factory is intended for use internally by the CacheDelegate.
      Parameters:
        `cache` - underlying cache
        `key` - key under which the schematic value exists
      Returns:
        the schematic entry

    - #### unwrap

          protected MutableDocument unwrap(Document doc)

    - #### key

          protected final String key()

    - #### data

          protected final MutableDocument data()

    - #### setDocument

          protected void setDocument(Document document)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### markRemoved

          public void markRemoved(boolean b)

    - #### getMetadata

          public Document getMetadata()

      Description copied from interface: `SchematicEntry`
      Get the metadata associated with this value.
      Specified by:
        `getMetadata` in interface `SchematicEntry`
      Returns:
        the metadata document; never null

    - #### getKey

          protected String getKey()

    - #### getContent

          public Document getContent()

      Description copied from interface: `SchematicEntry`
      Return this value's content. The result will either be a `Document`.
      Specified by:
        `getContent` in interface `SchematicEntry`
      Returns:
        the content, or null if there is no content

    - #### setMetadata

          protected void setMetadata(Document metadata)

    - #### setContent

          public void setContent(Document content)

      Description copied from interface: `SchematicEntry`
      Set the content for this value to be the supplied Document and set the content type to be " `application/json`".
      Specified by:
        `setContent` in interface `SchematicEntry`
      Parameters:
        `content` - the Document representing the JSON content; may not be null

    - #### asDocument

          public Document asDocument()

      Description copied from interface: `SchematicEntry`
      Get the representation of this entry as a document, which will include the `metadata` and `content` as nested documents.
      Specified by:
        `asDocument` in interface `SchematicEntry`
      Returns:
        the entry's representation as a document

    - #### edit

          protected EditableDocument edit(String key,
                              AdvancedCache<String,SchematicEntry> cache,
                              AdvancedCache<String,SchematicEntry> lockingCache)

    - #### clone

          public SchematicEntryLiteral clone()

      Overrides:
        `clone` in class `Object`

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.