public static enum FDBRecordStoreBase.StoreExistenceCheck extends Enum<FDBRecordStoreBase.StoreExistenceCheck>
Enum Constant and Description |
---|
ERROR_IF_EXISTS
Throw if the record store already exists.
|
ERROR_IF_NO_INFO_AND_HAS_RECORDS_OR_INDEXES
Throw if the record store does not have an info header but does have have at least one
record.
|
ERROR_IF_NO_INFO_AND_NOT_EMPTY
Throw if the record store does not have an info header but is not empty.
|
ERROR_IF_NOT_EXISTS
Throw if the record store does not already exist.
|
NONE
No special action.
|
Modifier and Type | Method and Description |
---|---|
static FDBRecordStoreBase.StoreExistenceCheck |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FDBRecordStoreBase.StoreExistenceCheck[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FDBRecordStoreBase.StoreExistenceCheck NONE
uncheckedOpen
or build
to a checked open.public static final FDBRecordStoreBase.StoreExistenceCheck ERROR_IF_NO_INFO_AND_HAS_RECORDS_OR_INDEXES
ERROR_IF_NO_INFO_AND_NOT_EMPTY
in that there is
data stored in the record store other than just the records and the indexes, including
meta-data about which indexes have been built. A record store that is missing a header
but has this other data is in a corrupt state, but as there are no records, it can be
recovered when creating the store in a straightforward way.public static final FDBRecordStoreBase.StoreExistenceCheck ERROR_IF_NO_INFO_AND_NOT_EMPTY
ERROR_IF_NO_INFO_AND_HAS_RECORDS_OR_INDEXES
, this existence check will throw an
error even if there are no records in the store, only data stored internally by the
Record Layer.
This corresponds to FDBRecordStoreBase.BaseBuilder.createOrOpen()
public static final FDBRecordStoreBase.StoreExistenceCheck ERROR_IF_EXISTS
FDBRecordStoreBase.BaseBuilder.create()
RecordStoreAlreadyExistsException
public static final FDBRecordStoreBase.StoreExistenceCheck ERROR_IF_NOT_EXISTS
FDBRecordStoreBase.BaseBuilder.open()
RecordStoreDoesNotExistException
public static FDBRecordStoreBase.StoreExistenceCheck[] values()
for (FDBRecordStoreBase.StoreExistenceCheck c : FDBRecordStoreBase.StoreExistenceCheck.values()) System.out.println(c);
public static FDBRecordStoreBase.StoreExistenceCheck valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null