| 1 | /* |
| 2 | * Legal Notice |
| 3 | * |
| 4 | * This document and associated source code (the "Work") is a part of a |
| 5 | * benchmark specification maintained by the TPC. |
| 6 | * |
| 7 | * The TPC reserves all right, title, and interest to the Work as provided |
| 8 | * under U.S. and international laws, including without limitation all patent |
| 9 | * and trademark rights therein. |
| 10 | * |
| 11 | * No Warranty |
| 12 | * |
| 13 | * 1.1 TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE INFORMATION |
| 14 | * CONTAINED HEREIN IS PROVIDED "AS IS" AND WITH ALL FAULTS, AND THE |
| 15 | * AUTHORS AND DEVELOPERS OF THE WORK HEREBY DISCLAIM ALL OTHER |
| 16 | * WARRANTIES AND CONDITIONS, EITHER EXPRESS, IMPLIED OR STATUTORY, |
| 17 | * INCLUDING, BUT NOT LIMITED TO, ANY (IF ANY) IMPLIED WARRANTIES, |
| 18 | * DUTIES OR CONDITIONS OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR |
| 19 | * PURPOSE, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS, OF |
| 20 | * WORKMANLIKE EFFORT, OF LACK OF VIRUSES, AND OF LACK OF NEGLIGENCE. |
| 21 | * ALSO, THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT, |
| 22 | * QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT |
| 23 | * WITH REGARD TO THE WORK. |
| 24 | * 1.2 IN NO EVENT WILL ANY AUTHOR OR DEVELOPER OF THE WORK BE LIABLE TO |
| 25 | * ANY OTHER PARTY FOR ANY DAMAGES, INCLUDING BUT NOT LIMITED TO THE |
| 26 | * COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS |
| 27 | * OF USE, LOSS OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT, |
| 28 | * INDIRECT, OR SPECIAL DAMAGES WHETHER UNDER CONTRACT, TORT, WARRANTY, |
| 29 | * OR OTHERWISE, ARISING IN ANY WAY OUT OF THIS OR ANY OTHER AGREEMENT |
| 30 | * RELATING TO THE WORK, WHETHER OR NOT SUCH AUTHOR OR DEVELOPER HAD |
| 31 | * ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. |
| 32 | * |
| 33 | * Contributors |
| 34 | * - Sergey Vasilevskiy |
| 35 | * - Doug Johnson |
| 36 | */ |
| 37 | |
| 38 | /* |
| 39 | * Base interface for a loader class factory. |
| 40 | * This class instantiates particular table loader classs. |
| 41 | */ |
| 42 | |
| 43 | #ifndef BASE_LOADER_FACTORY_H |
| 44 | #define BASE_LOADER_FACTORY_H |
| 45 | |
| 46 | #include "BaseLoader.h" |
| 47 | #include "TableRows.h" |
| 48 | |
| 49 | namespace TPCE { |
| 50 | |
| 51 | class CBaseLoaderFactory { |
| 52 | |
| 53 | public: |
| 54 | /* |
| 55 | * Virtual destructor. Provided so that a sponsor-specific |
| 56 | * destructor can be called on destruction from the base-class pointer. |
| 57 | * |
| 58 | * PARAMETERS: |
| 59 | * none. |
| 60 | * |
| 61 | * RETURNS: |
| 62 | * not applicable. |
| 63 | */ |
| 64 | virtual ~CBaseLoaderFactory(){}; |
| 65 | |
| 66 | /* |
| 67 | * Create loader class for ACCOUNT_PERMISSION table. |
| 68 | * Should be defined in a subclass according to the subclass load type. |
| 69 | * |
| 70 | * PARAMETERS: |
| 71 | * none. |
| 72 | * |
| 73 | * RETURNS: |
| 74 | * Reference to the loader class. |
| 75 | */ |
| 76 | virtual CBaseLoader<ACCOUNT_PERMISSION_ROW> *CreateAccountPermissionLoader() = 0; |
| 77 | |
| 78 | /* |
| 79 | * Create loader class for ADDRESS table. |
| 80 | * Should be defined in a subclass according to the subclass load type. |
| 81 | * |
| 82 | * PARAMETERS: |
| 83 | * none. |
| 84 | * |
| 85 | * RETURNS: |
| 86 | * Reference to the loader class. |
| 87 | */ |
| 88 | virtual CBaseLoader<ADDRESS_ROW> *CreateAddressLoader() = 0; |
| 89 | |
| 90 | /* |
| 91 | * Create loader class for BROKER table. |
| 92 | * Should be defined in a subclass according to the subclass load type. |
| 93 | * |
| 94 | * PARAMETERS: |
| 95 | * none. |
| 96 | * |
| 97 | * RETURNS: |
| 98 | * Reference to the loader class. |
| 99 | */ |
| 100 | virtual CBaseLoader<BROKER_ROW> *CreateBrokerLoader() = 0; |
| 101 | |
| 102 | /* |
| 103 | * Create loader class for CASH_TRANSACTION table. |
| 104 | * Should be defined in a subclass according to the subclass load type. |
| 105 | * |
| 106 | * PARAMETERS: |
| 107 | * none. |
| 108 | * |
| 109 | * RETURNS: |
| 110 | * Reference to the loader class. |
| 111 | */ |
| 112 | virtual CBaseLoader<CASH_TRANSACTION_ROW> *CreateCashTransactionLoader() = 0; |
| 113 | |
| 114 | /* |
| 115 | * Create loader class for CHARGE table. |
| 116 | * Should be defined in a subclass according to the subclass load type. |
| 117 | * |
| 118 | * PARAMETERS: |
| 119 | * none. |
| 120 | * |
| 121 | * RETURNS: |
| 122 | * Reference to the loader class. |
| 123 | */ |
| 124 | virtual CBaseLoader<CHARGE_ROW> *CreateChargeLoader() = 0; |
| 125 | |
| 126 | /* |
| 127 | * Create loader class for COMMISSION_RATE table. |
| 128 | * Should be defined in a subclass according to the subclass load type. |
| 129 | * |
| 130 | * PARAMETERS: |
| 131 | * none. |
| 132 | * |
| 133 | * RETURNS: |
| 134 | * Reference to the loader class. |
| 135 | */ |
| 136 | virtual CBaseLoader<COMMISSION_RATE_ROW> *CreateCommissionRateLoader() = 0; |
| 137 | |
| 138 | /* |
| 139 | * Create loader class for COMPANY_COMPETITOR table. |
| 140 | * Should be defined in a subclass according to the subclass load type. |
| 141 | * |
| 142 | * PARAMETERS: |
| 143 | * none. |
| 144 | * |
| 145 | * RETURNS: |
| 146 | * Reference to the loader class. |
| 147 | */ |
| 148 | virtual CBaseLoader<COMPANY_COMPETITOR_ROW> *CreateCompanyCompetitorLoader() = 0; |
| 149 | |
| 150 | /* |
| 151 | * Create loader class for COMPANY table. |
| 152 | * Should be defined in a subclass according to the subclass load type. |
| 153 | * |
| 154 | * PARAMETERS: |
| 155 | * none. |
| 156 | * |
| 157 | * RETURNS: |
| 158 | * Reference to the loader class. |
| 159 | */ |
| 160 | virtual CBaseLoader<COMPANY_ROW> *CreateCompanyLoader() = 0; |
| 161 | |
| 162 | /* |
| 163 | * Create loader class for CUSTOMER_ACCOUNT table. |
| 164 | * Should be defined in a subclass according to the subclass load type. |
| 165 | * |
| 166 | * PARAMETERS: |
| 167 | * none. |
| 168 | * |
| 169 | * RETURNS: |
| 170 | * Reference to the loader class. |
| 171 | */ |
| 172 | virtual CBaseLoader<CUSTOMER_ACCOUNT_ROW> *CreateCustomerAccountLoader() = 0; |
| 173 | |
| 174 | /* |
| 175 | * Create loader class for CUSTOMER table. |
| 176 | * Should be defined in a subclass according to the subclass load type. |
| 177 | * |
| 178 | * PARAMETERS: |
| 179 | * none. |
| 180 | * |
| 181 | * RETURNS: |
| 182 | * Reference to the loader class. |
| 183 | */ |
| 184 | virtual CBaseLoader<CUSTOMER_ROW> *CreateCustomerLoader() = 0; |
| 185 | |
| 186 | /* |
| 187 | * Create loader class for CUSTOMER_TAXRATE table. |
| 188 | * Should be defined in a subclass according to the subclass load type. |
| 189 | * |
| 190 | * PARAMETERS: |
| 191 | * none. |
| 192 | * |
| 193 | * RETURNS: |
| 194 | * Reference to the loader class. |
| 195 | */ |
| 196 | virtual CBaseLoader<CUSTOMER_TAXRATE_ROW> *CreateCustomerTaxrateLoader() = 0; |
| 197 | |
| 198 | /* |
| 199 | * Create loader class for DAILY_MARKET table. |
| 200 | * Should be defined in a subclass according to the subclass load type. |
| 201 | * |
| 202 | * PARAMETERS: |
| 203 | * none. |
| 204 | * |
| 205 | * RETURNS: |
| 206 | * Reference to the loader class. |
| 207 | */ |
| 208 | virtual CBaseLoader<DAILY_MARKET_ROW> *CreateDailyMarketLoader() = 0; |
| 209 | |
| 210 | /* |
| 211 | * Create loader class for EXCHANGE table. |
| 212 | * Should be defined in a subclass according to the subclass load type. |
| 213 | * |
| 214 | * PARAMETERS: |
| 215 | * none. |
| 216 | * |
| 217 | * RETURNS: |
| 218 | * Reference to the loader class. |
| 219 | */ |
| 220 | virtual CBaseLoader<EXCHANGE_ROW> *CreateExchangeLoader() = 0; |
| 221 | |
| 222 | /* |
| 223 | * Create loader class for FINANCIAL table. |
| 224 | * Should be defined in a subclass according to the subclass load type. |
| 225 | * |
| 226 | * PARAMETERS: |
| 227 | * none. |
| 228 | * |
| 229 | * RETURNS: |
| 230 | * Reference to the loader class. |
| 231 | */ |
| 232 | virtual CBaseLoader<FINANCIAL_ROW> *CreateFinancialLoader() = 0; |
| 233 | |
| 234 | /* |
| 235 | * Create loader class for HOLDING table. |
| 236 | * Should be defined in a subclass according to the subclass load type. |
| 237 | * |
| 238 | * PARAMETERS: |
| 239 | * none. |
| 240 | * |
| 241 | * RETURNS: |
| 242 | * Reference to the loader class. |
| 243 | */ |
| 244 | virtual CBaseLoader<HOLDING_ROW> *CreateHoldingLoader() = 0; |
| 245 | |
| 246 | /* |
| 247 | * Create loader class for HOLDING_HISTORY table. |
| 248 | * Should be defined in a subclass according to the subclass load type. |
| 249 | * |
| 250 | * PARAMETERS: |
| 251 | * none. |
| 252 | * |
| 253 | * RETURNS: |
| 254 | * Reference to the loader class. |
| 255 | */ |
| 256 | virtual CBaseLoader<HOLDING_HISTORY_ROW> *CreateHoldingHistoryLoader() = 0; |
| 257 | |
| 258 | /* |
| 259 | * Create loader class for HOLDING_SUMMARY table. |
| 260 | * Should be defined in a subclass according to the subclass load type. |
| 261 | * |
| 262 | * PARAMETERS: |
| 263 | * none. |
| 264 | * |
| 265 | * RETURNS: |
| 266 | * Reference to the loader class. |
| 267 | */ |
| 268 | virtual CBaseLoader<HOLDING_SUMMARY_ROW> *CreateHoldingSummaryLoader() = 0; |
| 269 | |
| 270 | /* |
| 271 | * Create loader class for INDUSTRY table. |
| 272 | * Should be defined in a subclass according to the subclass load type. |
| 273 | * |
| 274 | * PARAMETERS: |
| 275 | * none. |
| 276 | * |
| 277 | * RETURNS: |
| 278 | * Reference to the loader class. |
| 279 | */ |
| 280 | virtual CBaseLoader<INDUSTRY_ROW> *CreateIndustryLoader() = 0; |
| 281 | |
| 282 | /* |
| 283 | * Create loader class for LAST_TRADE table. |
| 284 | * Should be defined in a subclass according to the subclass load type. |
| 285 | * |
| 286 | * PARAMETERS: |
| 287 | * none. |
| 288 | * |
| 289 | * RETURNS: |
| 290 | * Reference to the loader class. |
| 291 | */ |
| 292 | virtual CBaseLoader<LAST_TRADE_ROW> *CreateLastTradeLoader() = 0; |
| 293 | |
| 294 | /* |
| 295 | * Create loader class for NEWS_ITEM table. |
| 296 | * Should be defined in a subclass according to the subclass load type. |
| 297 | * |
| 298 | * PARAMETERS: |
| 299 | * none. |
| 300 | * |
| 301 | * RETURNS: |
| 302 | * Reference to the loader class. |
| 303 | */ |
| 304 | virtual CBaseLoader<NEWS_ITEM_ROW> *CreateNewsItemLoader() = 0; |
| 305 | |
| 306 | /* |
| 307 | * Create loader class for NEWS_XREF table. |
| 308 | * Should be defined in a subclass according to the subclass load type. |
| 309 | * |
| 310 | * PARAMETERS: |
| 311 | * none. |
| 312 | * |
| 313 | * RETURNS: |
| 314 | * Reference to the loader class. |
| 315 | */ |
| 316 | virtual CBaseLoader<NEWS_XREF_ROW> *CreateNewsXRefLoader() = 0; |
| 317 | |
| 318 | /* |
| 319 | * Create loader class for SECTOR table. |
| 320 | * Should be defined in a subclass according to the subclass load type. |
| 321 | * |
| 322 | * PARAMETERS: |
| 323 | * none. |
| 324 | * |
| 325 | * RETURNS: |
| 326 | * Reference to the loader class. |
| 327 | */ |
| 328 | virtual CBaseLoader<SECTOR_ROW> *CreateSectorLoader() = 0; |
| 329 | |
| 330 | /* |
| 331 | * Create loader class for SECURITY table. |
| 332 | * Should be defined in a subclass according to the subclass load type. |
| 333 | * |
| 334 | * PARAMETERS: |
| 335 | * none. |
| 336 | * |
| 337 | * RETURNS: |
| 338 | * Reference to the loader class. |
| 339 | */ |
| 340 | virtual CBaseLoader<SECURITY_ROW> *CreateSecurityLoader() = 0; |
| 341 | |
| 342 | /* |
| 343 | * Create loader class for SETTLEMENT table. |
| 344 | * Should be defined in a subclass according to the subclass load type. |
| 345 | * |
| 346 | * PARAMETERS: |
| 347 | * none. |
| 348 | * |
| 349 | * RETURNS: |
| 350 | * Reference to the loader class. |
| 351 | */ |
| 352 | virtual CBaseLoader<SETTLEMENT_ROW> *CreateSettlementLoader() = 0; |
| 353 | |
| 354 | /* |
| 355 | * Create loader class for STATUS_TYPE table. |
| 356 | * Should be defined in a subclass according to the subclass load type. |
| 357 | * |
| 358 | * PARAMETERS: |
| 359 | * none. |
| 360 | * |
| 361 | * RETURNS: |
| 362 | * Reference to the loader class. |
| 363 | */ |
| 364 | virtual CBaseLoader<STATUS_TYPE_ROW> *CreateStatusTypeLoader() = 0; |
| 365 | |
| 366 | /* |
| 367 | * Create loader class for TAXRATE table. |
| 368 | * Should be defined in a subclass according to the subclass load type. |
| 369 | * |
| 370 | * PARAMETERS: |
| 371 | * none. |
| 372 | * |
| 373 | * RETURNS: |
| 374 | * Reference to the loader class. |
| 375 | */ |
| 376 | virtual CBaseLoader<TAX_RATE_ROW> *CreateTaxRateLoader() = 0; |
| 377 | |
| 378 | /* |
| 379 | * Create loader class for TRADE_HISTORY table. |
| 380 | * Should be defined in a subclass according to the subclass load type. |
| 381 | * |
| 382 | * PARAMETERS: |
| 383 | * none. |
| 384 | * |
| 385 | * RETURNS: |
| 386 | * Reference to the loader class. |
| 387 | */ |
| 388 | virtual CBaseLoader<TRADE_HISTORY_ROW> *CreateTradeHistoryLoader() = 0; |
| 389 | |
| 390 | /* |
| 391 | * Create loader class for TRADE table. |
| 392 | * Should be defined in a subclass according to the subclass load type. |
| 393 | * |
| 394 | * PARAMETERS: |
| 395 | * none. |
| 396 | * |
| 397 | * RETURNS: |
| 398 | * Reference to the loader class. |
| 399 | */ |
| 400 | virtual CBaseLoader<TRADE_ROW> *CreateTradeLoader() = 0; |
| 401 | |
| 402 | /* |
| 403 | * Create loader class for TRADE_REQUEST table. |
| 404 | * Should be defined in a subclass according to the subclass load type. |
| 405 | * |
| 406 | * PARAMETERS: |
| 407 | * none. |
| 408 | * |
| 409 | * RETURNS: |
| 410 | * Reference to the loader class. |
| 411 | */ |
| 412 | virtual CBaseLoader<TRADE_REQUEST_ROW> *CreateTradeRequestLoader() = 0; |
| 413 | |
| 414 | /* |
| 415 | * Create loader class for TRADE_TYPE table. |
| 416 | * Should be defined in a subclass according to the subclass load type. |
| 417 | * |
| 418 | * PARAMETERS: |
| 419 | * none. |
| 420 | * |
| 421 | * RETURNS: |
| 422 | * Reference to the loader class. |
| 423 | */ |
| 424 | virtual CBaseLoader<TRADE_TYPE_ROW> *CreateTradeTypeLoader() = 0; |
| 425 | |
| 426 | /* |
| 427 | * Create loader class for WATCH_ITEM table. |
| 428 | * Should be defined in a subclass according to the subclass load type. |
| 429 | * |
| 430 | * PARAMETERS: |
| 431 | * none. |
| 432 | * |
| 433 | * RETURNS: |
| 434 | * Reference to the loader class. |
| 435 | */ |
| 436 | virtual CBaseLoader<WATCH_ITEM_ROW> *CreateWatchItemLoader() = 0; |
| 437 | |
| 438 | /* |
| 439 | * Create loader class for WATCH_LIST table. |
| 440 | * Should be defined in a subclass according to the subclass load type. |
| 441 | * |
| 442 | * PARAMETERS: |
| 443 | * none. |
| 444 | * |
| 445 | * RETURNS: |
| 446 | * Reference to the loader class. |
| 447 | */ |
| 448 | virtual CBaseLoader<WATCH_LIST_ROW> *CreateWatchListLoader() = 0; |
| 449 | |
| 450 | /* |
| 451 | * Create loader class for ZIP_CODE table. |
| 452 | * Should be defined in a subclass according to the subclass load type. |
| 453 | * |
| 454 | * PARAMETERS: |
| 455 | * none. |
| 456 | * |
| 457 | * RETURNS: |
| 458 | * Reference to the loader class. |
| 459 | */ |
| 460 | virtual CBaseLoader<ZIP_CODE_ROW> *CreateZipCodeLoader() = 0; |
| 461 | }; |
| 462 | |
| 463 | } // namespace TPCE |
| 464 | |
| 465 | #endif // #ifndef BASE_LOADER_FACTORY_H |
| 466 | |