Package de.bsvrz.ars.ars.persistence
Class KeyValProps
java.lang.Object
de.bsvrz.ars.ars.persistence.KeyValProps
- Direct Known Subclasses:
ContainerHdr
,StartupProperties
public abstract class KeyValProps
extends java.lang.Object
Klasse zum Lesen/Schreiben von Key/Value-Paaren. Die Values haben stets feste Länge..
-
Field Summary
Fields Modifier and Type Field Description static int
BOOL_STR_LEN
Länge eines Boolschen Werts bei textueller Repraesentation mit '0' und '1'.protected static long
BYTE4_MAXVAL
protected static long
BYTE5_MAXVAL
protected static long
BYTE6_MAXVAL
protected static long
BYTE8_MAXVAL
static int
BYTES4_STR_LEN
static int
BYTES5_STR_LEN
static int
BYTES6_STR_LEN
static int
BYTES8_STR_LEN
protected static java.lang.String
CH_DELIM
Delimiter für Parameter im Container-Header.protected static java.lang.String
FALSE
Textuelle Repraesentationdes boolsches Kennzeichen für 'Falsch'.protected java.util.Properties
properties
protected static java.lang.String
TRUE
Textuelle Repraesentation des boolsches Kennzeichen für 'Wahr'. -
Constructor Summary
Constructors Constructor Description KeyValProps()
-
Method Summary
Modifier and Type Method Description void
clear()
protected static KeyValParam
createNumParam(java.lang.String key, long defaultValue, int valueLength, long minVal, long maxVal, int byteLength)
protected static KeyValParam
createStringParam(java.lang.String key, java.lang.String defaultValue, int valueLength)
protected static KeyValParam
createStringParam(java.lang.String key, java.lang.String defaultValue, int valueLength, java.lang.String[] allowedValues)
java.lang.Boolean
getValAsBool(KeyValParam chp)
java.lang.Integer
getValAsInt(KeyValParam chp)
java.lang.Long
getValAsLong(KeyValParam chp)
java.lang.String
getValAsString(KeyValParam chp)
void
setDefaultVal(KeyValParam chp)
void
setVal(KeyValParam chp, boolean val)
void
setVal(KeyValParam chp, long val)
void
setVal(KeyValParam chp, java.lang.String val)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
properties
protected final java.util.Properties properties -
BYTES4_STR_LEN
public static final int BYTES4_STR_LEN- See Also:
- Constant Field Values
-
BYTES5_STR_LEN
public static final int BYTES5_STR_LEN- See Also:
- Constant Field Values
-
BYTES6_STR_LEN
public static final int BYTES6_STR_LEN- See Also:
- Constant Field Values
-
BYTES8_STR_LEN
public static final int BYTES8_STR_LEN- See Also:
- Constant Field Values
-
BOOL_STR_LEN
public static final int BOOL_STR_LENLänge eines Boolschen Werts bei textueller Repraesentation mit '0' und '1'.- See Also:
- Constant Field Values
-
BYTE4_MAXVAL
protected static final long BYTE4_MAXVAL- See Also:
- Constant Field Values
-
BYTE5_MAXVAL
protected static final long BYTE5_MAXVAL- See Also:
- Constant Field Values
-
BYTE6_MAXVAL
protected static final long BYTE6_MAXVAL- See Also:
- Constant Field Values
-
BYTE8_MAXVAL
protected static final long BYTE8_MAXVAL- See Also:
- Constant Field Values
-
TRUE
protected static final java.lang.String TRUETextuelle Repraesentation des boolsches Kennzeichen für 'Wahr'.- See Also:
- Constant Field Values
-
FALSE
protected static final java.lang.String FALSETextuelle Repraesentationdes boolsches Kennzeichen für 'Falsch'.- See Also:
- Constant Field Values
-
CH_DELIM
protected static final java.lang.String CH_DELIMDelimiter für Parameter im Container-Header.- See Also:
- Constant Field Values
-
-
Constructor Details
-
KeyValProps
public KeyValProps()
-
-
Method Details
-
clear
public void clear() -
setVal
- Throws:
PersistenceException
-
setVal
- Throws:
PersistenceException
-
setVal
- Throws:
PersistenceException
-
setDefaultVal
-
getValAsString
-
getValAsLong
- Throws:
PersistenceException
-
getValAsBool
- Throws:
PersistenceException
-
getValAsInt
- Throws:
PersistenceException
-
createNumParam
protected static KeyValParam createNumParam(java.lang.String key, long defaultValue, int valueLength, long minVal, long maxVal, int byteLength) -
createStringParam
protected static KeyValParam createStringParam(java.lang.String key, java.lang.String defaultValue, int valueLength) -
createStringParam
protected static KeyValParam createStringParam(java.lang.String key, java.lang.String defaultValue, int valueLength, java.lang.String[] allowedValues)
-