Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.infinispan.schematic
Class Schematic

    java.lang.Object
      org.infinispan.schematic.Schematic

    public class Schematic

extends Object

Nested Class Summary
`static interface` | `Schematic.ContentTypes`
`protected static class` | `Schematic.DocumentChanges`
`protected static class` | `Schematic.EditorImpl`

Field Summary
`protected static DocumentValueFactory` | `DEFAULT_FACTORY`

Constructor Summary
`Schematic()`

Method Summary
`static SchemaLibrary` | `createSchemaLibrary()` Create an in-memory schema library.
`static SchemaLibrary` | `createSchemaLibrary(String name)` Create an in-memory schema library.
`static Editor` | `editDocument(Document document, boolean clone)` Obtain an editor for the supplied document.
`static org.infinispan.marshall.AdvancedExternalizer<Object>[]` | `externalizers()` Get the set of `Externalizer` implementations that are used by Schematic.
`static Set<org.infinispan.marshall.AdvancedExternalizer<?>>` | `externalizerSet()`
`static SchematicDb` | `get(org.infinispan.manager.CacheContainer cacheContainer, String cacheName)` Get the `SchematicDb` instance given the cache name and container.
`static EditableArray` | `newArray()` Create a new, empty editable array that can be used as a new array value in other documents.
`static EditableArray` | `newArray(Collection<?> values)` Create a new editable array that can be used as a new array value in other documents.
`static EditableArray` | `newArray(int initialCapacity)` Create a new, empty editable array that can be used as a new array value in other documents.
`static EditableArray` | `newArray(Object... values)` Create a new editable array that can be used as a new array value in other documents.
`static EditableDocument` | `newDocument()` Create a new editable document that can be used as a new document entry in a SchematicDb or as nested documents for other documents.
`static EditableDocument` | `newDocument(Document original)` Create a new editable document that is a copy of the supplied document.
`static EditableDocument` | `newDocument(String name, Object value)` Create a new editable document, initialized with a single field, that can be used as a new document entry in a SchematicDb or as nested documents for other documents.
`static EditableDocument` | `newDocument(String name1, Object value1, String name2, Object value2)` Create a new editable document, initialized with two fields, that can be used as a new document entry in a SchematicDb or as nested documents for other documents.
`static EditableDocument` | `newDocument(String name1, Object value1, String name2, Object value2, String name3, Object value3)` Create a new editable document, initialized with three fields, that can be used as a new document entry in a SchematicDb or as nested documents for other documents.
`static EditableDocument` | `newDocument(String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4)` Create a new editable document, initialized with four fields, that can be used as a new document entry in a SchematicDb or as nested documents for other documents.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_FACTORY

    protected static DocumentValueFactory DEFAULT_FACTORY

Constructor Detail

### Schematic

    public Schematic()

Method Detail

### get

    public static SchematicDb get(org.infinispan.manager.CacheContainer cacheContainer,
                                  String cacheName)

  Get the `SchematicDb` instance given the cache name and container.

  Parameters:
    `cacheContainer` - the container for the named cache; may not be null
    `cacheName` - the name of the cache; may not be null
  Returns:
    the schematic database instance; never null

### newDocument

    public static EditableDocument newDocument(Document original)

  Create a new editable document that is a copy of the supplied document.

  Parameters:
    `original` - the original document
  Returns:
    the editable document; never null

### newDocument

    public static EditableDocument newDocument()

  Create a new editable document that can be used as a new document entry in a SchematicDb or as nested documents for other documents.

  Returns:
    the editable document; never null

### newDocument

    public static EditableDocument newDocument(String name,
                                               Object value)

  Create a new editable document, initialized with a single field, that can be used as a new document entry in a SchematicDb or as nested documents for other documents.

  Parameters:
    `name` - the name of the initial field in the resulting document; if null, the field will not be added to the returned document
    `value` - the value of the initial field in the resulting document
  Returns:
    the editable document; never null

### newDocument

    public static EditableDocument newDocument(String name1,
                                               Object value1,
                                               String name2,
                                               Object value2)

  Create a new editable document, initialized with two fields, that can be used as a new document entry in a SchematicDb or as nested documents for other documents.

  Parameters:
    `name1` - the name of the first field in the resulting document; if null, the field will not be added to the returned document
    `value1` - the value of the first field in the resulting document
    `name2` - the name of the second field in the resulting document; if null, the field will not be added to the returned document
    `value2` - the value of the second field in the resulting document
  Returns:
    the editable document; never null

### newDocument

    public static EditableDocument newDocument(String name1,
                                               Object value1,
                                               String name2,
                                               Object value2,
                                               String name3,
                                               Object value3)

  Create a new editable document, initialized with three fields, that can be used as a new document entry in a SchematicDb or as nested documents for other documents.

  Parameters:
    `name1` - the name of the first field in the resulting document; if null, the field will not be added to the returned document
    `value1` - the value of the first field in the resulting document
    `name2` - the name of the second field in the resulting document; if null, the field will not be added to the returned document
    `value2` - the value of the second field in the resulting document
    `name3` - the name of the third field in the resulting document; if null, the field will not be added to the returned document
    `value3` - the value of the third field in the resulting document
  Returns:
    the editable document; never null

### newDocument

    public static EditableDocument newDocument(String name1,
                                               Object value1,
                                               String name2,
                                               Object value2,
                                               String name3,
                                               Object value3,
                                               String name4,
                                               Object value4)

  Create a new editable document, initialized with four fields, that can be used as a new document entry in a SchematicDb or as nested documents for other documents.

  Parameters:
    `name1` - the name of the first field in the resulting document; if null, the field will not be added to the returned document
    `value1` - the value of the first field in the resulting document
    `name2` - the name of the second field in the resulting document; if null, the field will not be added to the returned document
    `value2` - the value of the second field in the resulting document
    `name3` - the name of the third field in the resulting document; if null, the field will not be added to the returned document
    `value3` - the value of the third field in the resulting document
    `name4` - the name of the fourth field in the resulting document; if null, the field will not be added to the returned document
    `value4` - the value of the fourth field in the resulting document
  Returns:
    the editable document; never null

### newArray

    public static EditableArray newArray()

  Create a new, empty editable array that can be used as a new array value in other documents.

  Returns:
    the editable array; never null

### newArray

    public static EditableArray newArray(int initialCapacity)

  Create a new, empty editable array that can be used as a new array value in other documents.

  Parameters:
    `initialCapacity` - the initial allocated capacity for the array
  Returns:
    the editable array; never null

### newArray

    public static EditableArray newArray(Collection<?> values)

  Create a new editable array that can be used as a new array value in other documents.

  Parameters:
    `values` - the initial values for the array
  Returns:
    the editable array; never null

### newArray

    public static EditableArray newArray(Object... values)

  Create a new editable array that can be used as a new array value in other documents.

  Parameters:
    `values` - the initial values for the array
  Returns:
    the editable array; never null

### editDocument

    public static Editor editDocument(Document document,
                                      boolean clone)

  Obtain an editor for the supplied document. The editor allows the caller to make changes to the document and to obtain these changes as a `serializable memento` that can be applied to another document.

  Parameters:
    `document` - the document to be edited
    `clone` - true if the editor should operate against a clone of the document, or false if it should operate against the supplied document
  Returns:
    the editor for the document

### createSchemaLibrary

    public static SchemaLibrary createSchemaLibrary()

  Create an in-memory schema library.

  Returns:
    the empty, in-memory schema library

### createSchemaLibrary

    public static SchemaLibrary createSchemaLibrary(String name)

  Create an in-memory schema library.

  Parameters:
    `name` - the name of the library; may be null if a default name is to be used
  Returns:
    the empty, in-memory schema library

### externalizers

    public static org.infinispan.marshall.AdvancedExternalizer<Object>[] externalizers()

  Get the set of `Externalizer` implementations that are used by Schematic. These need to be registered with the `GlobalConfiguration`:

       GlobalConfiguration config = new GlobalConfiguration();
       config = config.fluent().serialization().addAdvancedExternalizer(Schematic.externalizers()).build();

  Returns:
    the list of externalizer

### externalizerSet

    public static Set<org.infinispan.marshall.AdvancedExternalizer<?>> externalizerSet()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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