001 package data.ooimpl; 002 003 import data.AbstractCurrency; 004 import data.CatalogIdentifier; 005 006 import java.util.Locale; 007 008 /** 009 * EURO-Implementation of AbstractCurrency 010 * 011 * @author Thomas Medack 012 * @version 3.0 013 */ 014 public class EUROCurrencyImpl extends AbstractCurrency { 015 016 /** 017 * ID for serialization. 018 */ 019 private static final long serialVersionUID = -6474533303521162699L; 020 021 /** 022 * Creates a new instance of EUROCurrencyImpl 023 */ 024 public EUROCurrencyImpl(String name) { 025 super(name); 026 } 027 028 /** 029 * Creates a new instance of EUROCurrencyImpl 030 */ 031 public EUROCurrencyImpl(String name, Locale locale) { 032 super(name, locale); 033 } 034 035 /** 036 * Creates a new instance of EUROCurrencyImpl 037 */ 038 public EUROCurrencyImpl(CatalogIdentifier<?> id) { 039 super(id.getName()); 040 } 041 042 /** 043 * This abstract method allows the programmer to choose the names and values of the 044 * CurrencyItems (EURO, DM, ...). 045 * 046 * A complete list of data containers, which always contain pairs of name and value, has to be returned. 047 * The single CurrencyItems can be found in the Catalog (Currency) with those names. 048 * 049 * @return an Array of data containers that contain names and values of CurrencyItems to be added. 050 */ 051 protected CurrencyItemData[] getCurrencyItemData() { 052 return new CurrencyItemData[] { 053 new CurrencyItemData(CENT_STCK_1, 1), new CurrencyItemData(CENT_STCK_2, 2), 054 new CurrencyItemData(CENT_STCK_5, 5), new CurrencyItemData(CENT_STCK_10, 10), 055 new CurrencyItemData(CENT_STCK_20, 20), new CurrencyItemData(CENT_STCK_50, 50), 056 new CurrencyItemData(EURO_STCK_1, 100), new CurrencyItemData(EURO_STCK_2, 200), 057 new CurrencyItemData(EURO_SCHEIN_5, 500), new CurrencyItemData(EURO_SCHEIN_10, 1000), 058 new CurrencyItemData(EURO_SCHEIN_20, 2000), new CurrencyItemData(EURO_SCHEIN_50, 5000), 059 new CurrencyItemData(EURO_SCHEIN_100, 10000), new CurrencyItemData(EURO_SCHEIN_200, 20000), 060 new CurrencyItemData(EURO_SCHEIN_500, 50000) 061 }; 062 } 063 064 /** 065 * Field string represents the mainkey for an added <code>CurrencyItemImpl</code>. 066 * <p>1-Cent-Stueck</p> 067 */ 068 public static String CENT_STCK_1 = "1-Cent-Stueck"; 069 070 /** 071 * Field string represents the mainkey for an added <code>CurrencyItemImpl</code>. 072 * <p>2-Cent-Stueck</p> 073 */ 074 public static String CENT_STCK_2 = "2-Cent-Stueck"; 075 076 /** 077 * Field string represents the mainkey for an added <code>CurrencyItemImpl</code>. 078 * <p>5-Cent-Stueck</p> 079 */ 080 public static String CENT_STCK_5 = "5-Cent-Stueck"; 081 082 /** 083 * Field string represents the mainkey for an added <code>CurrencyItemImpl</code>. 084 * <p>10-Cent-Stueck</p> 085 */ 086 public static String CENT_STCK_10 = "10-Cent-Stueck"; 087 088 /** 089 * Field string represents the mainkey for an added <code>CurrencyItemImpl</code>. 090 * <p>20-Cent-Stueck</p> 091 */ 092 public static String CENT_STCK_20 = "20-Cent-Stueck"; 093 094 /** 095 * Field string represents the mainkey for an added <code>CurrencyItemImpl</code>. 096 * <p>50-Cent-Stueck</p> 097 */ 098 public static String CENT_STCK_50 = "50-Cent-Stueck"; 099 100 /** 101 * Field string represents the mainkey for an added <code>CurrencyItemImpl</code>. 102 * <p>1-Euro-Stueck</p> 103 */ 104 public static String EURO_STCK_1 = "1-EURO-Stueck"; 105 106 /** 107 * Field string represents the mainkey for an added <code>CurrencyItemImpl</code>. 108 * <p>2-Euro-Stueck</p> 109 */ 110 public static String EURO_STCK_2 = "2-EURO-Stueck"; 111 112 /** 113 * Field string represents the mainkey for an added <code>CurrencyItemImpl</code>. 114 * <p>5-Euro-Schein</p> 115 */ 116 public static String EURO_SCHEIN_5 = "5-EURO-Schein"; 117 118 /** 119 * Field string represents the mainkey for an added <code>CurrencyItemImpl</code>. 120 * <p>10-Euro-Schein</p> 121 */ 122 public static String EURO_SCHEIN_10 = "10-EURO-Schein"; 123 124 /** 125 * Field string represents the mainkey for an added <code>CurrencyItemImpl</code>. 126 * <p>20-Euro-Schein</p> 127 */ 128 public static String EURO_SCHEIN_20 = "20-EURO-Schein"; 129 /** 130 * Field string represents the mainkey for an added <code>CurrencyItemImpl</code>. 131 * <p>50-Euro-Schein</p> 132 */ 133 public static String EURO_SCHEIN_50 = "50-EURO-Schein"; 134 /** 135 * Field string represents the mainkey for an added <code>CurrencyItemImpl</code>. 136 * <p>100-Euro-Schein</p> 137 */ 138 public static String EURO_SCHEIN_100 = "100-EURO-Schein"; 139 /** 140 * Field string represents the mainkey for an added <code>CurrencyItemImpl</code>. 141 * <p>200-Euro-Schein</p> 142 */ 143 public static String EURO_SCHEIN_200 = "200-EURO-Schein"; 144 /** 145 * Field string represents the mainkey for an added <code>CurrencyItemImpl</code>. 146 * <p>500-Euro-Schein</p> 147 */ 148 public static String EURO_SCHEIN_500 = "500-EURO-Schein"; 149 } 150 /* 151 * $Log: EUROCurrencyImpl.java,v $ 152 * Revision 1.1 2007/02/24 09:25:55 cvs_sp 153 * Initialer Release Version 3.3. 154 * 155 * Revision 1.4 2006/03/22 10:04:07 cvs_sp 156 * Migration zu Java 1.5 157 * 158 * Revision 1.3 2003/10/19 17:45:15 cvs_sp 159 * kleinere Kommentierungen und Variablenumbenennungen in den Displays 160 * 161 * Revision 1.6 2003/04/09 20:57:16 cvs_sp 162 * Javadoc korrigiert, um Warnungen und fehlerhafte Eintr�ge beim Erzeugen zu verhindern. 163 * 164 * Revision 1.2 2003/02/28 17:05:08 cvs_sp 165 * no message 166 * 167 * Revision 1.1 2002/07/11 15:31:10 tm11 168 * Neue Currencyklassen geschrieben. CurrencyImpl als deprecated erkl�rt. 169 * EUROCurrencyImpl geschrieben. 170 * 171 */