de.bsvrz.ars.ars.persistence
Class KeyValProps

java.lang.Object
  extended by 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 Laenge..

Version:
$Revision: 1.1 $ / $Date: 2008/01/22 16:39:54 $ / ($Author: yvonnes $)
Author:
beck et al. projects GmbH, Alexander Schmidt

Field Summary
static int BOOL_STR_LEN
          Laenge 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 fuer Parameter im Container-Header.
protected static java.lang.String FALSE
          Textuelle Repraesentationdes boolsches Kennzeichen für 'Falsch'.
static int HDR_TXT_LEN
          Laenge des Key/Value-Blocks in Byte.
protected  java.util.Properties properties
           
protected static java.lang.String TRUE
          Textuelle Repraesentation des boolsches Kennzeichen für 'Wahr'.
 
Constructor Summary
KeyValProps()
           
 
Method Summary
 void clear()
           
protected static KeyValParam createNumParam(java.lang.String key, long defaultValue, int valueLength, long minVal, long maxVal)
           
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 Detail

properties

protected 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_LEN
Laenge 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

HDR_TXT_LEN

public static int HDR_TXT_LEN
Laenge des Key/Value-Blocks in Byte.


TRUE

protected static final java.lang.String TRUE
Textuelle Repraesentation des boolsches Kennzeichen für 'Wahr'.

See Also:
Constant Field Values

FALSE

protected static final java.lang.String FALSE
Textuelle Repraesentationdes boolsches Kennzeichen für 'Falsch'.

See Also:
Constant Field Values

CH_DELIM

protected static final java.lang.String CH_DELIM
Delimiter fuer Parameter im Container-Header.

See Also:
Constant Field Values
Constructor Detail

KeyValProps

public KeyValProps()
Method Detail

clear

public void clear()

setVal

public void setVal(KeyValParam chp,
                   boolean val)
            throws PersistenceException
Throws:
PersistenceException

setVal

public void setVal(KeyValParam chp,
                   long val)
            throws PersistenceException
Throws:
PersistenceException

setVal

public void setVal(KeyValParam chp,
                   java.lang.String val)
            throws PersistenceException
Throws:
PersistenceException

setDefaultVal

public void setDefaultVal(KeyValParam chp)

getValAsString

public java.lang.String getValAsString(KeyValParam chp)

getValAsLong

public java.lang.Long getValAsLong(KeyValParam chp)
                            throws PersistenceException
Throws:
PersistenceException

getValAsBool

public java.lang.Boolean getValAsBool(KeyValParam chp)
                               throws PersistenceException
Throws:
PersistenceException

getValAsInt

public java.lang.Integer getValAsInt(KeyValParam chp)
                              throws PersistenceException
Throws:
PersistenceException

createNumParam

protected static KeyValParam createNumParam(java.lang.String key,
                                            long defaultValue,
                                            int valueLength,
                                            long minVal,
                                            long maxVal)

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)


Copyright © 2005-2008 beck et al. projects GmbH All Rights Reserved.