List of usage examples for java.lang Short toString
public static String toString(short s)
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxMssCF.CFEnSyntaxMssCFBindISOTimezoneISOTimezoneId.java
public String expandBody(MssCFGenContext genContext) { final String S_ProcName = "CFEnSyntaxMssCFBindISOTimezoneISOTimezoneId.expandBody() "; if (genContext == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext"); }//w ww . j av a 2 s . c o m ICFLibAnyObj genDef = genContext.getGenDef(); if (genDef == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext.getGenDef()"); } String ret; if (genDef instanceof ICFEnSyntaxISOTimezoneObj) { short iSOTimezoneId = ((ICFEnSyntaxISOTimezoneObj) genDef).getRequiredISOTimezoneId(); ret = Short.toString(iSOTimezoneId); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody", "genContext.getGenDef()", genDef, "ICFEnSyntaxISOTimezoneObj"); } return (ret); }
From source file:com.clustercontrol.plugin.factory.ModifyDbmsScheduler.java
private void setEntityInfo(DbmsSchedulerEntity entity, JobDetail jobDetail, Trigger trigger) throws InvalidClassException { entity.setMisfireInstr(trigger.getMisfireInstruction()); entity.setDurable(jobDetail.isDurable()); entity.setJobClassName(jobDetail.getJobDataMap().getString(ReflectionInvokerJob.KEY_CLASS_NAME)); entity.setJobMethodName(jobDetail.getJobDataMap().getString(ReflectionInvokerJob.KEY_METHOD_NAME)); if (trigger instanceof CronTrigger) { entity.setTriggerType(SchedulerPlugin.TriggerType.CRON.name()); entity.setCronExpression(((CronTrigger) trigger).getCronExpression()); } else if (trigger instanceof SimpleTrigger) { entity.setTriggerType(SchedulerPlugin.TriggerType.SIMPLE.name()); entity.setRepeatInterval(((SimpleTrigger) trigger).getPeriod()); }//ww w. j a v a 2 s . c om entity.setTriggerState(TriggerState.VIRGIN.name()); entity.setStartTime(trigger.getStartTime()); entity.setEndTime(trigger.getEndTime()); entity.setNextFireTime(trigger.getNextFireTime()); entity.setPrevFireTime(trigger.getPreviousFireTime()); @SuppressWarnings("unchecked") Class<? extends Serializable>[] argsType = (Class<? extends Serializable>[]) jobDetail.getJobDataMap() .get(ReflectionInvokerJob.KEY_ARGS_TYPE); Object[] args = (Object[]) jobDetail.getJobDataMap().get(ReflectionInvokerJob.KEY_ARGS); entity.setJobArgNum(args.length); for (int i = 0; i < args.length; i++) { String arg = ""; if (m_log.isDebugEnabled()) m_log.debug("arg[" + i + "]:" + args[i]); if (argsType[i] == String.class) { arg = (String) args[i]; } else if (argsType[i] == Boolean.class) { arg = Boolean.toString((Boolean) args[i]); } else if (argsType[i] == Integer.class) { arg = Integer.toString((Integer) args[i]); } else if (argsType[i] == Long.class) { arg = Long.toString((Long) args[i]); } else if (argsType[i] == Short.class) { arg = Short.toString((Short) args[i]); } else if (argsType[i] == Float.class) { arg = Float.toString((Float) args[i]); } else if (argsType[i] == Double.class) { arg = Double.toString((Double) args[i]); } else { m_log.error("not support class"); throw new InvalidClassException(argsType[i].getName()); } String typeArg = argsType[i].getSimpleName() + ":" + arg; if (arg == null) { typeArg = "nullString"; } if (m_log.isDebugEnabled()) m_log.debug("typeArg[" + i + "]:" + typeArg); switch (i) { case 0: entity.setJobArg00(typeArg); break; case 1: entity.setJobArg01(typeArg); break; case 2: entity.setJobArg02(typeArg); break; case 3: entity.setJobArg03(typeArg); break; case 4: entity.setJobArg04(typeArg); break; case 5: entity.setJobArg05(typeArg); break; case 6: entity.setJobArg06(typeArg); break; case 7: entity.setJobArg07(typeArg); break; case 8: entity.setJobArg08(typeArg); break; case 9: entity.setJobArg09(typeArg); break; case 10: entity.setJobArg10(typeArg); break; case 11: entity.setJobArg11(typeArg); break; case 12: entity.setJobArg12(typeArg); break; case 13: entity.setJobArg13(typeArg); break; case 14: entity.setJobArg14(typeArg); break; default: m_log.error("arg count ng."); } } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstMssCF.CFAstMssCFBindISOTimezoneTZMinOffset.java
public String expandBody(MssCFGenContext genContext) { final String S_ProcName = "CFAstMssCFBindISOTimezoneTZMinOffset.expandBody() "; if (genContext == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext"); }//from w w w . j a v a2s . c om ICFLibAnyObj genDef = genContext.getGenDef(); if (genDef == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext.getGenDef()"); } String ret; if (genDef instanceof ICFAstISOTimezoneObj) { short tZMinOffset = ((ICFAstISOTimezoneObj) genDef).getRequiredTZMinOffset(); ret = Short.toString(tZMinOffset); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody", "genContext.getGenDef()", genDef, "ICFAstISOTimezoneObj"); } return (ret); }
From source file:net.sourceforge.msscodefactory.cffreeswitch.v2_1.CFFswMssCF.CFFswMssCFBindISOCountryCurrencyISOCountryId.java
public String expandBody(MssCFGenContext genContext) { final String S_ProcName = "CFFswMssCFBindISOCountryCurrencyISOCountryId.expandBody() "; if (genContext == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext"); }// ww w . j a va 2s .co m ICFLibAnyObj genDef = genContext.getGenDef(); if (genDef == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext.getGenDef()"); } String ret; if (genDef instanceof ICFFswISOCountryCurrencyObj) { short iSOCountryId = ((ICFFswISOCountryCurrencyObj) genDef).getRequiredISOCountryId(); ret = Short.toString(iSOCountryId); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody", "genContext.getGenDef()", genDef, "ICFFswISOCountryCurrencyObj"); } return (ret); }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccMssCF.CFAccMssCFBindISOTimezoneTZMinOffset.java
public String expandBody(MssCFGenContext genContext) { final String S_ProcName = "CFAccMssCFBindISOTimezoneTZMinOffset.expandBody() "; if (genContext == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext"); }/* w w w .j ava2s . c om*/ ICFLibAnyObj genDef = genContext.getGenDef(); if (genDef == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext.getGenDef()"); } String ret; if (genDef instanceof ICFAccISOTimezoneObj) { short tZMinOffset = ((ICFAccISOTimezoneObj) genDef).getRequiredTZMinOffset(); ret = Short.toString(tZMinOffset); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody", "genContext.getGenDef()", genDef, "ICFAccISOTimezoneObj"); } return (ret); }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstMssCF.CFAstMssCFBindISOTimezoneTZHourOffset.java
public String expandBody(MssCFGenContext genContext) { final String S_ProcName = "CFAstMssCFBindISOTimezoneTZHourOffset.expandBody() "; if (genContext == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext"); }/*from ww w .j a va 2s .com*/ ICFLibAnyObj genDef = genContext.getGenDef(); if (genDef == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext.getGenDef()"); } String ret; if (genDef instanceof ICFAstISOTimezoneObj) { short tZHourOffset = ((ICFAstISOTimezoneObj) genDef).getRequiredTZHourOffset(); ret = Short.toString(tZHourOffset); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody", "genContext.getGenDef()", genDef, "ICFAstISOTimezoneObj"); } return (ret); }
From source file:net.sourceforge.msscodefactory.cffreeswitch.v2_1.CFFswMssCF.CFFswMssCFBindISOCountryCurrencyISOCurrencyId.java
public String expandBody(MssCFGenContext genContext) { final String S_ProcName = "CFFswMssCFBindISOCountryCurrencyISOCurrencyId.expandBody() "; if (genContext == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext"); }//from w w w. j a v a2s .com ICFLibAnyObj genDef = genContext.getGenDef(); if (genDef == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext.getGenDef()"); } String ret; if (genDef instanceof ICFFswISOCountryCurrencyObj) { short iSOCurrencyId = ((ICFFswISOCountryCurrencyObj) genDef).getRequiredISOCurrencyId(); ret = Short.toString(iSOCurrencyId); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody", "genContext.getGenDef()", genDef, "ICFFswISOCountryCurrencyObj"); } return (ret); }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccMssCF.CFAccMssCFBindISOTimezoneTZHourOffset.java
public String expandBody(MssCFGenContext genContext) { final String S_ProcName = "CFAccMssCFBindISOTimezoneTZHourOffset.expandBody() "; if (genContext == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext"); }// w w w .j ava 2 s . c o m ICFLibAnyObj genDef = genContext.getGenDef(); if (genDef == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext.getGenDef()"); } String ret; if (genDef instanceof ICFAccISOTimezoneObj) { short tZHourOffset = ((ICFAccISOTimezoneObj) genDef).getRequiredTZHourOffset(); ret = Short.toString(tZHourOffset); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody", "genContext.getGenDef()", genDef, "ICFAccISOTimezoneObj"); } return (ret); }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstMssCF.CFAstMssCFBindAuditActionAuditActionId.java
public String expandBody(MssCFGenContext genContext) { final String S_ProcName = "CFAstMssCFBindAuditActionAuditActionId.expandBody() "; if (genContext == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext"); }/* w w w. j ava2 s . c o m*/ ICFLibAnyObj genDef = genContext.getGenDef(); if (genDef == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext.getGenDef()"); } String ret; if (genDef instanceof ICFAstAuditActionObj) { short auditActionId = ((ICFAstAuditActionObj) genDef).getRequiredAuditActionId(); ret = Short.toString(auditActionId); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody", "genContext.getGenDef()", genDef, "ICFAstAuditActionObj"); } return (ret); }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstMssCF.CFAstMssCFBindISOTimezoneISOTimezoneId.java
public String expandBody(MssCFGenContext genContext) { final String S_ProcName = "CFAstMssCFBindISOTimezoneISOTimezoneId.expandBody() "; if (genContext == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext"); }//from w w w . j a v a2s . com ICFLibAnyObj genDef = genContext.getGenDef(); if (genDef == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext.getGenDef()"); } String ret; if (genDef instanceof ICFAstISOTimezoneObj) { short iSOTimezoneId = ((ICFAstISOTimezoneObj) genDef).getRequiredISOTimezoneId(); ret = Short.toString(iSOTimezoneId); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody", "genContext.getGenDef()", genDef, "ICFAstISOTimezoneObj"); } return (ret); }