Here is my method where im convertng a string to enum for a case statement...
public int AnalyseRow(String UserName, String SymbolName, Date TransDate, double OpenPrice, double HighPrice, double LowPriceee, double ClosePrice, int Volume, String Splits)
{
System.out.println("analyse row detected ........................... X");
String SLPoint = "";
String SLType = "";
String TLDPoint = "";
String TLUPoint = "";
double STPoint;
double LTPoint;
double MAPoint;
boolean bTLUIsHorizontal = false;
double dPointDef;
double dHorizontalPoints;
boolean TLDHorizontalIsSet = false;
boolean TLUHorizontalIsSet = false;
double dEntryPrice = 0;
double dStopLossPrice = 0;
List objOpenLTOrders = null;
int intOpenLTOrdersCount = 0 ;
List objLiveLTOrders = null;
int intLiveLTOrdersCount=0;
List objOpenSTOrders=null;
int intOpenSTOrdersCount=0;
List objLiveSTOrders=null;
int intLiveSTOrdersCount=0;
List objContractSettings=null;
double dVolume = 0;
double dGrossProfit=0;
double dNetProfit=0;
double dBrokerageCharge=0;
double dSpreadCharge=0;
for(int i=0; i<count;i++)
{
// 'MsgBox(objSettingsServiceDataRow.SettingName & " - " & objSettingsServiceDataRow.SettingValue)
String caseOf = (settingsBusinessService.readRow(1).getSETTINGNAME());
// Select Case objSettingsServiceDataRow.SettingName
EnumRule enum1 = EnumRule.valueOf("caseOf");
switch(enum1)
{
case caseOf:
{
if( (settingsBusinessService.GetAllSettings(UserName, settings)).size() != 0)
{
//if (TransDate > tradingBusinessService.GetMaxStockDataTransDate(UserName, SymbolName).AddDays(Double.valueOf((objSettingsServiceDataRow.SettingValue))))
{
SaveLog(UserName, "WARNING DateTime Difference : Difference exceeded specified amount on trans " + SymbolName + " " + TransDate, Now(), 2);
return 1;
//break;
}
}
}
}
My enum class:
package com.ib.client.mts.backend.BusinessService;
public enum EnumRule {
caseOf, EUR
}
what will be the bean id for this class ? im trying property type but its facing error that i need a constructer where as i never used it ? Is there any speacific bean id type for enum class?