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 intBOOL_STR_LENLänge eines Boolschen Werts bei textueller Repraesentation mit '0' und '1'.protected static longBYTE4_MAXVALprotected static longBYTE5_MAXVALprotected static longBYTE6_MAXVALprotected static longBYTE8_MAXVALstatic intBYTES4_STR_LENstatic intBYTES5_STR_LENstatic intBYTES6_STR_LENstatic intBYTES8_STR_LENprotected static java.lang.StringCH_DELIMDelimiter für Parameter im Container-Header.protected static java.lang.StringFALSETextuelle Repraesentationdes boolsches Kennzeichen für 'Falsch'.protected java.util.Propertiespropertiesprotected static java.lang.StringTRUETextuelle Repraesentation des boolsches Kennzeichen für 'Wahr'. -
Constructor Summary
Constructors Constructor Description KeyValProps() -
Method Summary
Modifier and Type Method Description voidclear()protected static KeyValParamcreateNumParam(java.lang.String key, long defaultValue, int valueLength, long minVal, long maxVal, int byteLength)protected static KeyValParamcreateStringParam(java.lang.String key, java.lang.String defaultValue, int valueLength)protected static KeyValParamcreateStringParam(java.lang.String key, java.lang.String defaultValue, int valueLength, java.lang.String[] allowedValues)java.lang.BooleangetValAsBool(KeyValParam chp)java.lang.IntegergetValAsInt(KeyValParam chp)java.lang.LonggetValAsLong(KeyValParam chp)java.lang.StringgetValAsString(KeyValParam chp)voidsetDefaultVal(KeyValParam chp)voidsetVal(KeyValParam chp, boolean val)voidsetVal(KeyValParam chp, long val)voidsetVal(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)
-