List of usage examples for java.lang Long Long
@Deprecated(since = "9") public Long(String s) throws NumberFormatException
From source file:com.healthcit.cacure.model.FormLibraryModuleTest.java
@Test @DataSet/*from ww w . j a va2 s.c o m*/ public void testRead() { FormLibraryModule qlModule = em.find(FormLibraryModule.class, 2L); assertNotNull(qlModule); assertEquals("Form Library", qlModule.getDescription()); assertEquals(date("2011-05-20 16:55:08.171"), qlModule.getUpdateDate()); assertEquals(ModuleStatus.FORM_LIBRARY, qlModule.getStatus()); assertEquals("Form Library Comments", qlModule.getComments()); assertEquals(new Long(1), qlModule.getAuthor().getId()); assertTrue(qlModule.isLibrary()); assertNotNull(qlModule.getForms()); assertEquals(1, qlModule.getForms().size()); assertEquals(new Long(1111), qlModule.getForms().get(0).getId()); }
From source file:com.tesora.dve.distribution.ColumnDatum.java
public static Comparable<?> getValueForComparison(IColumnDatum col, Object value) { Comparable<?> valueForCompare = (Comparable<?>) value; if (MysqlNativeType.MysqlType.DATETIME.toString().equals(col.getNativeType())) { if (value instanceof String) { valueForCompare = (Comparable<?>) Singletons.require(DBNative.class).getValueConverter().convert( (String) value, BasicType.getDateTimeType(Singletons.require(DBNative.class).getTypeCatalog())); }//from ww w . ja va 2 s. co m } else { if (value instanceof Integer) valueForCompare = new Long(Long.valueOf(((Integer) value).longValue())); else if (value instanceof Short) valueForCompare = new Long(Long.valueOf(((Short) value).longValue())); else if (value instanceof Byte) valueForCompare = new Long(Long.valueOf(((Byte) value).longValue())); } return valueForCompare; }
From source file:org.lamop.riche.webservices.WorkAuthorRESTWs.java
@DELETE @Path("{id}") @Produces(MediaType.APPLICATION_JSON)/* www.j a va 2 s. c o m*/ @RequestMapping(method = RequestMethod.DELETE) public void remove(@PathParam("id") int id) { workAuthorService.removeEntity(new Long(id)); }
From source file:gov.nih.nci.cabio.portal.portlet.canned.AbsoluteRangeQueryAction.java
@Override public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res) throws Exception { try {//from www. ja v a 2s. c o m AbsoluteRangeQueryForm f = (AbsoluteRangeQueryForm) form; AbsoluteRangeQuery q = new AbsoluteRangeQuery(); q.setChromosomeId(f.getChromosomeId()); q.setAssembly(f.getAssembly()); q.setStart(new Long(f.getStart())); q.setEnd(new Long(f.getEnd())); Class targetClass = RangeQuery.class; if (!"".equals(f.getClassFilter())) { targetClass = Class.forName(f.getClassFilter()); } log.info("assembly: " + q.getAssembly()); log.info("chromosomeId: " + q.getChromosomeId()); log.info("start: " + q.getStart()); log.info("end: " + q.getEnd()); log.info("page: " + f.getPage()); log.info("targetClass: " + targetClass.getName()); List results = as.search(targetClass, q); log.info("result size: " + results.size()); req.setAttribute("results", new Results(results, f.getPageNumber())); return mapping.findForward("cabioportlet.absoluteRangeQuery.results"); } catch (Exception e) { log.error("Action error", e); req.setAttribute("errorMessage", e.getMessage()); return mapping.findForward("cabioportlet.error"); } }
From source file:bancvirt.Recurso.java
public Recurso() { balance = new Long(0); }
From source file:android.apn.androidpn.server.service.impl.UserServiceImpl.java
public User getUser(String userId) { return userDao.getUser(new Long(userId)); }
From source file:org.openregistry.core.web.CampusConverter.java
@Override protected Object toObject(final String string, final Class targetClass) throws Exception { return getReferenceRepository().getCampusById(new Long(string)); }
From source file:com.healthcit.cacure.model.QuestionsLibraryModuleTest.java
@Test @DataSet//from w ww.j a va2s. c o m public void testRead() { QuestionsLibraryModule qlModule = em.find(QuestionsLibraryModule.class, 1L); assertNotNull(qlModule); assertEquals("Question Library", qlModule.getDescription()); assertEquals(date("2011-05-20 16:55:08.171"), qlModule.getUpdateDate()); assertEquals(ModuleStatus.QUESTION_LIBRARY, qlModule.getStatus()); assertEquals("Question Library Comments", qlModule.getComments()); assertEquals(new Long(1), qlModule.getAuthor().getId()); assertTrue(qlModule.isLibrary()); assertNotNull(qlModule.getForms()); assertEquals(1, qlModule.getForms().size()); assertEquals(new Long(1), qlModule.getForms().get(0).getId()); }
From source file:org.hil.dao.ChildrenDaoTestCase.java
public void testGenearteCode() { Children child = new Children(); Village village = villageDao.get(new Long(26)); child.setVillage(village);//w ww . ja v a 2s .c om child.setId(new Long(52)); SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); try { Date bdate = format.parse("2010-11-10"); child.setDateOfBirth(bdate); } catch (ParseException e) { e.printStackTrace(); } childrenDaoExt.generateChildCode(child); }
From source file:org.openregistry.core.web.CountryConverter.java
@Override protected Object toObject(final String string, final Class targetClass) throws Exception { return getReferenceRepository().getCountryById(new Long(string)); }