public class DBProperties
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected Database |
db |
protected BTree |
index |
protected long |
record |
| Constructor and Description |
|---|
DBProperties(Nd nd)
Allocate storage for a new DBProperties record in the specified database
|
DBProperties(Nd nd,
long record)
Creates an object for accessing an existing DBProperties record at the specified location
of the specified database.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Deletes all properties, does not delete the record associated with the object itself
- that is it can be re-populated.
|
void |
delete()
Deletes all properties stored in this object and the record associated with this object
itself.
|
java.util.Set<java.lang.String> |
getKeySet()
Returns the Set of property names stored in this object
|
java.lang.String |
getProperty(java.lang.String key)
Reads the named property from this properties storage.
|
java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue)
Reads the named property from this properties storage, returning the default value if there
is no such property.
|
long |
getRecord() |
boolean |
removeProperty(java.lang.String key)
Deletes a property from this DBProperties object.
|
void |
setProperty(java.lang.String key,
java.lang.String value)
Writes the key, value mapping to the properties.
|
public DBProperties(Nd nd) throws IndexException
IndexExceptionpublic DBProperties(Nd nd, long record) throws IndexException
IndexExceptionpublic java.lang.String getProperty(java.lang.String key)
throws IndexException
key - a case-sensitive identifier for a property, or nullIndexExceptionpublic java.lang.String getProperty(java.lang.String key,
java.lang.String defaultValue)
throws IndexException
key - a case-sensitive identifier for a property, or nulldefaultValue - a value to return in case the specified key was nullIndexExceptionpublic java.util.Set<java.lang.String> getKeySet()
throws IndexException
IndexExceptionpublic void setProperty(java.lang.String key,
java.lang.String value)
throws IndexException
key - a non-null property namevalue - a value to associate with the key. may not be null.IndexExceptionjava.lang.NullPointerException - if key is nullpublic boolean removeProperty(java.lang.String key)
throws IndexException
key - IndexExceptionpublic void clear()
throws IndexException
IndexExceptionpublic void delete()
throws IndexException
IndexExceptionpublic long getRecord()