pl.slawas.entities
Enum BooleanEnum

java.lang.Object
  extended by java.lang.Enum<BooleanEnum>
      extended by pl.slawas.entities.BooleanEnum
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<BooleanEnum>, DictionaryWithIntegerId, NameValuePair

public enum BooleanEnum
extends java.lang.Enum<BooleanEnum>
implements DictionaryWithIntegerId

BooleanEnum - symulacja encji z wartościami boolean w wersji językowej polskiej oraz angielskiej.

Version:
$Revision: 1.2 $
Author:
Slawomir Cichy <slawas@slawas.pl>

Enum Constant Summary
NO
           
UNKNOWN
           
YES
           
 
Field Summary
static java.lang.String ENGLISH
          Stała reprezentująca definicję języka angielskiego
static java.lang.String POLISH
          Stała reprezentująca definicję języka polskiego (wartość domyślna dla pola lang).
 
Method Summary
 boolean getBoolean()
          Pobieranie wartości logicznej
 java.lang.String getCode()
          Pobieranie kodu
 java.lang.String getDescription()
          Pobieranie opisu
 java.lang.Integer getId()
          Pobieranie identyfikatora
 java.lang.String getLang()
           
static java.lang.String[] getLangs()
          Pobieranie listy dostępnych kodów językowych reprezentacji logicznych
 java.lang.String getName()
          Pobieranie opisu
 java.lang.String getValue()
          Pobieranie wartości
static BooleanEnum loadById(java.lang.Integer id)
          Pobieranie obiektu BooleanEnum na podstawie identyfikatora.
static BooleanEnum loadByValue(java.lang.String value, BooleanLangEnum booleanLang)
          Pobieranie obiektu BooleanEnum na podstawie wartości i obiektu reprezentacji wartości logicznych
static BooleanEnum loadByValue(java.lang.String value, java.lang.String lang)
          Pobieranie obiektu BooleanEnum na podstawie wartości i kodu językowego.
 boolean parse(java.lang.String value)
          Parsowanie do wartości logicznej
static boolean parse(java.lang.String value, java.lang.String lang)
          Parsowanie do wartości logicznej
 void setCode(java.lang.String code)
          Deprecated. 
 void setDescription(java.lang.String description)
          Deprecated. 
 void setId(java.lang.Integer code)
          Deprecated. 
 BooleanEnum setLang(java.lang.String lang)
           
 void setName(java.lang.String name)
          Deprecated. 
 void setValue(java.lang.String value)
          Deprecated. 
 java.lang.String toXMLItem()
          Metoda tworzaca element XML z wartosci pol obiektu.
 boolean useLabel()
          Metoda pomocnicza pozwalająca na pobrznie szybkiej informacji czy ma zostać pobrany nagówek polaz z formularza
static BooleanEnum valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static BooleanEnum[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

YES

public static final BooleanEnum YES

NO

public static final BooleanEnum NO

UNKNOWN

public static final BooleanEnum UNKNOWN
Field Detail

POLISH

public static final java.lang.String POLISH
Stała reprezentująca definicję języka polskiego (wartość domyślna dla pola lang).

See Also:
BooleanLangEnum.POLISH

ENGLISH

public static final java.lang.String ENGLISH
Stała reprezentująca definicję języka angielskiego

See Also:
BooleanLangEnum.ENGLISH
Method Detail

values

public static BooleanEnum[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (BooleanEnum c : BooleanEnum.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static BooleanEnum valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getCode

public java.lang.String getCode()
Pobieranie kodu

Specified by:
getCode in interface DictionaryWithIntegerId
Returns:
kod reprezentacji wartości logicznych w zależności od ustawionej wartości lang

getDescription

public java.lang.String getDescription()
Pobieranie opisu

Specified by:
getDescription in interface DictionaryWithIntegerId
Returns:
opis reprezentacji wartości logicznych w zależności od ustawionej wartości lang

useLabel

public boolean useLabel()
Metoda pomocnicza pozwalająca na pobrznie szybkiej informacji czy ma zostać pobrany nagówek polaz z formularza

Returns:
true, jeżeli YES, w przeciwnym wypadku false

setCode

@Deprecated
public void setCode(java.lang.String code)
Deprecated. 

Ustawaianie kodu, metoda nie wspierana

Specified by:
setCode in interface DictionaryWithIntegerId
Parameters:
code - the code to set
See Also:
java.lang.UnsupportedOperationException()

setDescription

@Deprecated
public void setDescription(java.lang.String description)
Deprecated. 

Ustawianie opisu, metoda nie wspierana

Specified by:
setDescription in interface DictionaryWithIntegerId
Parameters:
description - the description to set
See Also:
java.lang.UnsupportedOperationException()

getName

public java.lang.String getName()
Pobieranie opisu

Specified by:
getName in interface NameValuePair
Returns:
opis reprezentacji wartości logicznych w zależności od ustawionej wartości lang
See Also:
getDescription()

getValue

public java.lang.String getValue()
Pobieranie wartości

Specified by:
getValue in interface NameValuePair
Returns:
wartości reprezentacji wartości logicznych w zależności od ustawionej wartości lang
See Also:
getCode()

setName

@Deprecated
public void setName(java.lang.String name)
Deprecated. 

Ustawianie nazwy, metoda nie wspierana

Specified by:
setName in interface NameValuePair
Parameters:
name - nazwa do ustawienia
See Also:
java.lang.UnsupportedOperationException()

setValue

@Deprecated
public void setValue(java.lang.String value)
Deprecated. 

Ustawianie wartości, metoda nie wspierana

Specified by:
setValue in interface NameValuePair
Parameters:
value - wartośc do ustawienia
See Also:
java.lang.UnsupportedOperationException()

toXMLItem

public java.lang.String toXMLItem()
Description copied from interface: NameValuePair
Metoda tworzaca element XML z wartosci pol obiektu.

Specified by:
toXMLItem in interface NameValuePair
Returns:
łańcuch znakowy elementu w postaci XML

getId

public java.lang.Integer getId()
Pobieranie identyfikatora

Specified by:
getId in interface DictionaryWithIntegerId
Returns:
the id

setId

@Deprecated
public void setId(java.lang.Integer code)
Deprecated. 

Ustawianie wartości identyfikatora, metoda nie wspierana

Specified by:
setId in interface DictionaryWithIntegerId
See Also:
java.lang.UnsupportedOperationException()

loadById

public static BooleanEnum loadById(java.lang.Integer id)
Pobieranie obiektu BooleanEnum na podstawie identyfikatora. Identyfikatory pobierane są z BooleanLangEnum.INTEGER.

Parameters:
id - identyfikator
Returns:
odpowieni obiekt symulowanej encji

loadByValue

public static BooleanEnum loadByValue(java.lang.String value,
                                      java.lang.String lang)
Pobieranie obiektu BooleanEnum na podstawie wartości i kodu językowego.

Parameters:
value - wartość
lang - wersja językowa. Lista dostępnych wartosci otrzyma się po wywołaniu metody getLangs()
Returns:
odpowieni obiekt symulowanej encji

loadByValue

public static BooleanEnum loadByValue(java.lang.String value,
                                      BooleanLangEnum booleanLang)
Pobieranie obiektu BooleanEnum na podstawie wartości i obiektu reprezentacji wartości logicznych

Parameters:
value - wartość
booleanLang - obiekt reprezentacji wartości logicznyc. Lista dostępnych wartosci otrzyma się po wywołaniu metody BooleanLangEnum.values()
Returns:
odpowieni obiekt symulowanej encji

getLang

public java.lang.String getLang()
Returns:
the lang

setLang

public BooleanEnum setLang(java.lang.String lang)
Parameters:
lang - do ustwienia wersji językowej. Lista dostępnych wartosci otrzyma się po wywołaniu metody getLangs()

getLangs

public static java.lang.String[] getLangs()
Pobieranie listy dostępnych kodów językowych reprezentacji logicznych

Returns:
lista kodów

parse

public static boolean parse(java.lang.String value,
                            java.lang.String lang)
Parsowanie do wartości logicznej

Parameters:
value - wartość podstawowa
lang - wersja językowa. Lista dostępnych wartosci otrzyma się po wywołaniu metody getLangs()
Returns:
jeżeli wartość odpowiada YES to zwrócona będzie wartość true, w przeciwnym wypadku bedzie zwracana wartość false

parse

public boolean parse(java.lang.String value)
Parsowanie do wartości logicznej

Parameters:
value - wartość podstawowa
Returns:
jeżeli wartość odpowiada YES to zwrócona będzie wartość true, w przeciwnym wypadku bedzie zwracana wartość false. Informacja o kodzie językowym jest dostępna za pomoca metody getLang().

getBoolean

public boolean getBoolean()
Pobieranie wartości logicznej

Returns:
jeżeli wartość odpowiada YES to zwrócona będzie wartość true, w przeciwnym wypadku bedzie zwracana wartość false


Copyright © 2014 Sci Software. All Rights Reserved.