Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB Java Edition version 3.3.75
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sleepycat.persist.raw
Class RawStore

    java.lang.Object
      com.sleepycat.persist.raw.RawStore

    public class RawStore

extends Object

Provides access to the raw data in a store for use by general purpose tools. A `RawStore` provides access to stored entities without using entity classes or key classes. Keys are represented as simple type objects or, for composite keys, as `RawObject` instances, and entities are represented as `RawObject` instances.

`RawStore` objects are thread-safe. Multiple threads may safely call the methods of a shared `RawStore` object.

When using a `RawStore`, the current persistent class definitions are not used. Instead, the previously stored metadata and class definitions are used. This has several implications:

1. An `EntityModel` may not be specified using `StoreConfig.setModel(com.sleepycat.persist.model.EntityModel)`. In other words, the configured model must be null (the default).
2. When storing entities, their format will not automatically be evolved to the current class definition, even if the current class definition has changed.

Author:
  Mark Hayes

Constructor Summary
`RawStore(Environment env, String storeName, StoreConfig config)` Opens an entity store for raw data access.

Method Summary
`void` | `close()` Closes all databases and sequences that were opened by this model.
`StoreConfig` | `getConfig()` Returns a copy of the entity store configuration.
`Environment` | `getEnvironment()` Returns the environment associated with this store.
`EntityModel` | `getModel()` Returns the last configured and stored entity model for this store.
`Mutations` | `getMutations()` Returns the set of mutations that were configured and stored previously.
`PrimaryIndex<Object,RawObject>` | `getPrimaryIndex(String entityClass)` Opens the primary index for a given entity class.
`SecondaryIndex<Object,Object,RawObject>` | `getSecondaryIndex(String entityClass, String keyName)` Opens the secondary index for a given entity class and secondary key name.
`String` | `getStoreName()` Returns the name of this store.

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

Constructor Detail

### RawStore

    public RawStore(Environment env,
                    String storeName,
                    StoreConfig config)
             throws DatabaseException

  Opens an entity store for raw data access.

  Parameters:
    `env` - an open Berkeley DB environment.
    `storeName` - the name of the entity store within the given environment.
    `config` - the store configuration, or null to use default configuration properties.
  Throws:
    `IllegalArgumentException` - if the `Environment` is read-only and the `config ReadOnly` property is false.
    `DatabaseException`

Method Detail

### getPrimaryIndex

    public PrimaryIndex<Object,RawObject> getPrimaryIndex(String entityClass)
                                                   throws DatabaseException

  Opens the primary index for a given entity class.

  Throws:
    `DatabaseException`

### getSecondaryIndex

    public SecondaryIndex<Object,Object,RawObject> getSecondaryIndex(String entityClass,
                                                                     String keyName)
                                                              throws DatabaseException

  Opens the secondary index for a given entity class and secondary key name.

  Throws:
    `DatabaseException`

### getEnvironment

    public Environment getEnvironment()

  Returns the environment associated with this store.

### getConfig

    public StoreConfig getConfig()

  Returns a copy of the entity store configuration.

### getStoreName

    public String getStoreName()

  Returns the name of this store.

### getModel

    public EntityModel getModel()

  Returns the last configured and stored entity model for this store.

### getMutations

    public Mutations getMutations()

  Returns the set of mutations that were configured and stored previously.

### close

    public void close()
               throws DatabaseException

  Closes all databases and sequences that were opened by this model. No databases opened via this store may be in use.

  Throws:
    `DatabaseException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB Java Edition version 3.3.75
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2004,2008 Oracle. All rights reserved.