public class Textschluessel extends Object implements Cloneable, Comparable, Serializable
A Textschlüssel is made up of a two-digit positive integer (the key) and a three-digit positive integer (the extension). The key, together with a constant extension, uniquely identifies a transaction's type. The extension may also be used to hold non-identifying data. In such cases only the key is used to identify a transaction's type and the extension holds variable data.
TextschluesselVerzeichnis
,
Serialized FormModifier and Type | Field and Description |
---|---|
static String |
PROP_DEBIT
Constant for the name of property
debit . |
static String |
PROP_EXTENSION
Constant for the name of property
extension . |
static String |
PROP_KEY
Constant for the name of property
key . |
static String |
PROP_REMITTANCE
Constant for the name of property
remittance . |
static String |
PROP_SHORTDESCRIPTION
Constant for the name of property
shortDescription . |
static String |
PROP_VALID_FROM
Constant for the name of property
validFrom . |
static String |
PROP_VALID_TO
Constant for the name of property
validTo . |
static String |
PROP_VARIABLE
Constant for the name of property
variable . |
Constructor and Description |
---|
Textschluessel()
Creates a new
Textschluessel instance. |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Creates and returns a copy of this object.
|
int |
compareTo(Object o)
Compares this object with the specified object for order.
|
boolean |
equals(Object o)
Indicates whether some other object is equal to this one by comparing the values of all properties.
|
int |
getExtension()
Getter for property
extension . |
int |
getKey()
Getter for property
key . |
Locale[] |
getLocales()
Gets all locales for which the instance holds short descriptions.
|
String |
getShortDescription(Locale locale)
Gets the short description of the Textschlüssel for a given locale.
|
Date |
getValidFrom()
Gets the date of validity of the Textschlüssel.
|
Date |
getValidTo()
Gets the date of expiration of the Textschlüssel.
|
int |
hashCode()
Returns a hash code value for this object.
|
boolean |
isDebit()
Flag indicating if a transaction of this type is a debit.
|
boolean |
isRemittance()
Flag indicating if a transaction of this type is a remittance.
|
boolean |
isValidAt(Date date)
Gets a flag indicating that the Textschlüssel is valid at a given date.
|
boolean |
isVariable()
Flag indicating if the extension holds non-identifying, variable data.
|
void |
setDebit(boolean value)
Setter for property
debit . |
void |
setExtension(int value)
Setter for property
extension . |
void |
setKey(int value)
Setter for property
key . |
void |
setRemittance(boolean value)
Setter for property
remittance . |
String |
setShortDescription(Locale locale,
String shortDescription)
Setter for property
shortDescription . |
void |
setValidFrom(Date value)
Sets the date of validity of the Textschlüssel.
|
void |
setValidTo(Date value)
Sets the date of expiration of the Textschlüssel.
|
void |
setVariable(boolean value)
Setter for property
variable . |
String |
toString()
Returns a string representation of the object.
|
public static final String PROP_DEBIT
debit
.public static final String PROP_EXTENSION
extension
.public static final String PROP_KEY
key
.public static final String PROP_REMITTANCE
remittance
.public static final String PROP_SHORTDESCRIPTION
shortDescription
.public static final String PROP_VALID_FROM
validFrom
.public static final String PROP_VALID_TO
validTo
.public static final String PROP_VARIABLE
variable
.public Textschluessel()
Textschluessel
instance.public int compareTo(Object o)
Compares the values of properties key
and extension
and returns a negative integer, zero, or a
positive integer as this object is less than, equal to, or greater than the specified object.
compareTo
in interface Comparable
o
- The Object to be compared.NullPointerException
- if o
is null
.ClassCastException
- if the specified object's type prevents it from being compared to this Object.public boolean equals(Object o)
The extension will only be compared if it is part of the identifying key based on the value of property
variable
.
public int getExtension()
extension
.public int getKey()
key
.public Locale[] getLocales()
public String getShortDescription(Locale locale)
locale
- The locale of the short description to return or null
for Locale.getDefault()
.locale
.public Date getValidFrom()
null
if nothing is known about the start
of validity of the Textschlüssel.public Date getValidTo()
null
if nothing is known about the date of
expiration of the Textschlüssel.public int hashCode()
public boolean isDebit()
true
if a transaction of this type is a debit; false
if not.public boolean isRemittance()
true
if a transaction of this type is a remittance; false
if not.public boolean isValidAt(Date date)
date
- The date with which to check.true
, if the Textschlüssel is valid at date
; false
if not.NullPointerException
- if date
is null
.public boolean isVariable()
true
if the extension holds non-identifying, variable data; false
if the extension is
part of the identifying key.public void setDebit(boolean value)
debit
.value
- true
if a transaction of this type is a debit; false
if not.public void setExtension(int value)
extension
.value
- New extension of the Textschlüssel.public void setKey(int value)
key
.value
- New key of the Textschlüssel.public void setRemittance(boolean value)
remittance
.value
- true
if a transaction of this type is a remittance; false
if not.public String setShortDescription(Locale locale, String shortDescription)
shortDescription
.locale
- The locale to set the short description for or null
for Locale.getDefault()
.shortDescription
- The new value for property shortDescription
for locale
.locale
or null
if the instance previously
held no value for locale
.NullPointerException
- if shortDescription
is null
.public void setValidFrom(Date value)
value
- The new date the Textschlüssel is valid from or null
if nothing is known about the start of
validity of the Textschlüssel.public void setValidTo(Date value)
value
- The new date the Textschlüssel is valid to or null
if nothing is known about the date of
expiration of the Textschlüssel.public void setVariable(boolean value)
variable
.value
- true
if the extension holds non-identifying, variable data; false
if the extension
is part of the identifying key.Copyright © 2005–2014 jDTAUS. All rights reserved.