List of usage examples for java.lang Long Long
@Deprecated(since = "9") public Long(String s) throws NumberFormatException
From source file:br.ufac.sion.converter.OrgaoExpedidorConverter.java
@Override public Object getAsObject(FacesContext context, UIComponent component, String value) { if (StringUtils.isBlank(value)) { return null; }/* w ww . j a v a 2 s.c o m*/ return this.orgaoExpedidorFacade.findById(new Long(value)); }
From source file:com.googlecode.psiprobe.controllers.apps.AllAppStatsController.java
protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { return super.handleRequestInternal(request, response).addObject("collectionPeriod", new Long(getCollectionPeriod())); }
From source file:org.openmrs.module.sync.SyncUtilTest.java
@Test public void getSetterMethod_shouldReturnMethodForPrimitiveLong() { Method m = SyncUtil.getSetterMethod(new Xform().getClass(), "longField", new Long(1).getClass()); Assert.notNull(m);//w w w .ja v a 2 s . c o m }
From source file:org.workin.http.httpclient.v4.handler.response.LongResponseHandler.java
@Override public Long handleResponse(HttpResponse response) throws ClientProtocolException, IOException { String result = super.doResponse(response); if (result != null) return new Long(result); String defaultValue = super.getDefaultValue(); return StringUtils.isNotBlank(defaultValue) ? new Long(defaultValue) : null; }
From source file:com.redhat.rhn.manager.kickstart.IpAddressRange.java
/** * Default Construtor/* w ww . ja va 2 s . c o m*/ * */ public IpAddressRange() { this.min = new IpAddress(); this.max = new IpAddress(); this.ksid = new Long(0); }
From source file:com.expressflow.test.controller.DirectInvokeTestController.java
@SuppressWarnings("unchecked") @ModelAttribute("directinvoke") @RequestMapping(value = "/", method = RequestMethod.GET) public DirectInvoke directInvokeTestCase() throws Exception { log.info("GET /test/directinvoke/ Test start"); DirectInvoke activity = new DirectInvoke(); activity.set_header("HTTP 1.1"); activity.set_method("GET"); activity.set_outputvariable(new Long("123")); activity.set_requestBody("Test Body"); activity.set_responseCode("404"); activity.set_responseHeader("HTTP 1.1"); activity.set_timeout(0);/*from w ww.j a va 2s . com*/ Variable endpoint = new Variable(); endpoint.setName("endpoint"); endpoint.setValue("http://expressflow.com"); activity.setEndpoint(endpoint); activity.persist(); log.info("DirectInvoke activity " + activity.getName() + " persisted."); return activity; }
From source file:jp.co.acroquest.endosnipe.report.converter.util.calc.LongCalculator.java
public Object div(Object obj1, Object obj2) { Long longData1 = (Long) obj1; Long longData2 = (Long) obj2; return (Object) (new Long((long) (longData1.longValue() / longData2.longValue()))); }
From source file:cz.zcu.kiv.eegdatabase.wui.components.utils.ChartUtils.java
public static BufferedImage gererateChartForTopDownloadHistory(ChoiceHistory choiceHistory, boolean generateEmptyGraph, List<DownloadStatistic> topDownloadedFilesList, long countOfFilesHistory) { long countFile = 0; DefaultPieDataset dataset = new DefaultPieDataset(); if (!generateEmptyGraph && topDownloadedFilesList != null) { for (int i = 0; i < topDownloadedFilesList.size(); i++) { dataset.setValue(topDownloadedFilesList.get(i).getFileName(), new Long(topDownloadedFilesList.get(i).getCount())); countFile = countFile + topDownloadedFilesList.get(i).getCount(); }//from w ww . ja va2s . c o m if (countOfFilesHistory > countFile) { dataset.setValue("Other", countOfFilesHistory - countFile); } } String chartTitle = ResourceUtils.getString("title.dailyStatistic"); if (choiceHistory == ChoiceHistory.WEEKLY) { chartTitle = ResourceUtils.getString("title.weeklyStatistic"); } else if (choiceHistory == ChoiceHistory.MONTHLY) { chartTitle = ResourceUtils.getString("title.monthlyStatistic"); } JFreeChart chart = ChartFactory.createPieChart3D(chartTitle, // chart // title dataset, // data true, // include legend true, false); PiePlot3D plot = (PiePlot3D) chart.getPlot(); plot.setStartAngle(290); plot.setDirection(Rotation.CLOCKWISE); plot.setForegroundAlpha(0.5f); plot.setNoDataMessage(ResourceUtils.getString("label.noDataMessage")); return chart.createBufferedImage(600, 400); }
From source file:su90.mybatisdemo.dao.JobsMapperTest.java
@Test(groups = { "find" }) public void testFindById() { Job result = jobsMapper.findById("SA_MAN"); assertNotNull(result);/* w w w. j a va 2 s . c o m*/ assertEquals(result.getTitle(), "Sales Manager"); assertEquals(result.getMax_sal(), new Long(20080L)); assertEquals(result.getMin_sal(), new Long(10000L)); }
From source file:br.ufac.sion.converter.LocalidadeConverter.java
@Override public Object getAsObject(FacesContext context, UIComponent component, String value) { Localidade retorno = null;// w w w .ja va 2s . c o m if (StringUtils.isNotBlank(value)) { retorno = this.localidadeFacade.findById(new Long(value)); if (retorno == null) { String descricaoErro = "A Localidade no existe."; FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, descricaoErro, descricaoErro); throw new ConverterException(message); } } return retorno; }