List of usage examples for java.lang Integer valueOf
@HotSpotIntrinsicCandidate public static Integer valueOf(int i)
From source file:converters.StringToGenderConverter.java
@Override public Gender convert(String text) { Gender result;//from w w w. j ava2 s .c om int id; try { if (StringUtils.isEmpty(text)) result = null; else { id = Integer.valueOf(text); result = genderRepository.findOne(id); } } catch (Throwable oops) { throw new IllegalArgumentException(oops); } return result; }
From source file:converters.StringToInternConverter.java
@Override public Intern convert(String text) { Intern result;/*from ww w .j av a 2 s . com*/ int id; try { if (StringUtils.isEmpty(text)) result = null; else { id = Integer.valueOf(text); result = internRepository.findOne(id); } } catch (Throwable oops) { throw new IllegalArgumentException(oops); } return result; }
From source file:converters.StringToParamsConverter.java
@Override public Params convert(String text) { Params result;// ww w . java 2s . c o m int id; try { if (StringUtils.isEmpty(text)) result = null; else { id = Integer.valueOf(text); result = paramsRepository.findOne(id); } } catch (Throwable oops) { throw new IllegalArgumentException(oops); } return result; }
From source file:converters.StringToQuiverConverter.java
@Override public Quiver convert(String text) { Quiver result;/* w w w. j a v a 2s . co m*/ int id; try { if (StringUtils.isEmpty(text)) result = null; else { id = Integer.valueOf(text); result = quiverRepository.findOne(id); } } catch (Throwable oops) { throw new IllegalArgumentException(oops); } return result; }
From source file:converters.StringToRatingConverter.java
@Override public Rating convert(String text) { Rating result;/*from w w w .ja v a2 s.c o m*/ int id; try { if (StringUtils.isEmpty(text)) result = null; else { id = Integer.valueOf(text); result = ratingRepository.findOne(id); } } catch (Throwable oops) { throw new IllegalArgumentException(oops); } return result; }
From source file:converters.StringToValuedConverter.java
@Override public Valued convert(String text) { Valued result;/*from w w w. ja va 2 s. c om*/ int id; try { if (StringUtils.isEmpty(text)) result = null; else { id = Integer.valueOf(text); result = valuedRepository.findOne(id); } } catch (Throwable oops) { throw new IllegalArgumentException(oops); } return result; }
From source file:org.xinta.eazycode.common.test.selenium.SeleniumTestCase.java
/** * ?selenium client./*from ww w . jav a2 s . c o m*/ * application.test.properties?selenium?,??. */ @BeforeClass public static void setUp() throws Exception { Properties p = PropertiesLoaderUtils.loadAllProperties(PROPERTY_FILE); String browser = p.getProperty(PROPERTY_BROWSER_NAME, DEFAULT_BROWSER); String url = p.getProperty(PROPERTY_URL_NAME, DEFAULT_URL); String host = p.getProperty(PROPERTY_SELENIUM_HOST_NAME, DEFAULT_SELENIUM_HOST); int port = Integer.valueOf(p.getProperty(PROPERTY_SELENIUM_PORT_NAME, DEFAULT_SELENIUM_PORT)); selenium = new DefaultSelenium(host, port, browser, url); selenium.start(); selenium.windowFocus(); selenium.windowMaximize(); }