biz.c24.io.api.data
Interface Enumeration

All Superinterfaces:
ModelComponent, Serializable, Validator
All Known Implementing Classes:
DatabaseSourcedEnumeration, DefaultEnumeration, ISO3166CountryValidator, ISO4217CurrencyAttributeValidator, ISO4217CurrencyValidator, ISO9362BICValidator, LTAddressValidator, MappedEnumeration, SimpleValidator, SourcedEnumeration, SwiftCurrency_PCT_REN_YLD_Validator, TARGET2Validator, URISourcedEnumeration

public interface Enumeration
extends Validator, ModelComponent

An enumeration of values, one of which must match the value of an object for it to be considered valid.

Warning: Serialized objects of this class or of a deployed class which is derived from it may not be compatible with future releases of C24 Integreation Objects. The current serialization support is appropriate for short term storage or RMI between applications running the same version of C24 Integreation Objects.

See Also:
The W3C Schema Specification

Method Summary
 Annotation getAnnotation()
          Returns the annotation associated with this enumeration.
 Annotation getAnnotation(int index)
          Returns the annotation associated with the enumeration value at index.
 int getCount()
          Returns the number of enumeration values.
 String getErrorCode()
          Returns the error code for this enumeration.
 int getIndex(String value)
          Returns the first index of value or -1 if it was not found.
 String getName(int index)
          Returns the name associated with the enumeration value at index.
 String getValue(int index)
          Returns the enumeration value at index.
 
Methods inherited from interface biz.c24.io.api.data.Validator
validate
 
Methods inherited from interface biz.c24.io.api.data.ModelComponent
getName
 

Method Detail

getAnnotation

Annotation getAnnotation()
Returns the annotation associated with this enumeration.

Returns:
The annotation

getIndex

int getIndex(String value)
Returns the first index of value or -1 if it was not found.

Parameters:
value - The value to look for.
Returns:
The index of the first occurance of value or -1 if it was not found.

getCount

int getCount()
Returns the number of enumeration values.

Returns:
The number of values.

getValue

String getValue(int index)
Returns the enumeration value at index.

Parameters:
index - The index of the value to return.
Returns:
The value at index.
Throws:
IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= getCount()).

getName

String getName(int index)
Returns the name associated with the enumeration value at index.

Parameters:
index - The index of the name to return.
Returns:
The name at index.
Throws:
IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= getCount()).

getAnnotation

Annotation getAnnotation(int index)
Returns the annotation associated with the enumeration value at index.

Parameters:
index - The index of the annotation to return.
Returns:
The name at index.
Throws:
IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= getCount()).

getErrorCode

String getErrorCode()
Returns the error code for this enumeration.

Returns:
The error code.


C24 Technologies © 2002-2012: All Rights Reserved.