List of usage examples for java.lang Long valueOf
@HotSpotIntrinsicCandidate public static Long valueOf(long l)
From source file:com.nextep.designer.dbgm.ui.DiagramFactory.java
@Override public IAdaptable createElement(IMemento memento) { IElementType type = IElementType.getInstance(memento.getString("TYPE")); if (type != IElementType.getInstance("DIAGRAM")) { log.warn("Unable to restore editor"); return null; }//ww w. j a va2 s . c o m String id = memento.getString("ID"); UID uid = new UID(Long.valueOf(id)); IDiagram d = (IDiagram) CorePlugin.getIdentifiableDao().load(VersionedDiagram.class, uid); return new DiagramEditorInput(d); }
From source file:jp.co.nemuzuka.utils.ConvertUtils.java
/** * Long?.// ww w.ja v a 2s . com * @param source * @return Long */ public static Long toLong(String source) { if (StringUtils.isEmpty(source)) { return null; } return Long.valueOf(source); }
From source file:org.opens.tanaguru.survey.controller.TanaguruSurveyControllerTest.java
public void testDisplayCategoriesDetailedPage() { TanaguruSurveyController tsc = getInitialisedTanaguruSurveyController(); assertEquals(TanaguruSurveyViewKeyStore.CATEGORIES_DETAILED_VIEW_NAME, tsc.displayCategoriesDetailedPage(Long.valueOf(1), new ExtendedModelMap())); }
From source file:cz.muni.fi.editor.test.service.organization.OrganizationServiceGetIdIT.java
@Test @WithEditorUser(3L) public void getValid() { Assert.assertEquals(Long.valueOf(3L), organizationService.getById(3L).getId()); }
From source file:com.hmsinc.epicenter.webapp.remoting.ProviderService.java
@Secured("ROLE_USER") @Transactional(readOnly = true)/*from w ww . j a v a 2s .c o m*/ @RemoteMethod public Collection<Facility> getFacilitiesInGeography(final String geographyID) { Validate.notNull(geographyID, "Geography ID must not be null!"); final Geography geography = geographyRepository.load(Long.valueOf(geographyID), Geography.class); Validate.notNull(geography, "No result for geography ID " + geographyID); return providerRepository.getFacilitiesInGeography(geography); }
From source file:de.uniulm.omi.executionware.entities.internal.Token.java
@JsonIgnore boolean isExpired() { return System.currentTimeMillis() > Long.valueOf(this.expiresAt); }
From source file:ch.silviowangler.dox.web.admin.StatisticsController.java
@RequestMapping(value = "/admin/stats/documentReferences", method = GET) @ResponseStatus(OK)/* w ww .j a v a 2 s.c o m*/ public @ResponseBody List<DocumentReferenceClickStats> showDocumentReferenceStats() { List<DocumentReferenceClickStats> stats = statisticsService.fetchDocumentReferenceClickStats(); Collections.sort(stats, new Comparator<DocumentReferenceClickStats>() { @Override public int compare(DocumentReferenceClickStats o1, DocumentReferenceClickStats o2) { return Long.valueOf(o2.getCount()).compareTo(o1.getCount()); } }); return stats; }
From source file:org.homiefund.test.it.RegistrationServiceIT.java
@Test(expected = FieldException.class) public void registerWithID() throws FieldException { UserDTO user = new UserDTO(); user.setId(Long.valueOf(1L)); registrationService.register(user, Optional.empty()); }
From source file:org.nekorp.workflow.desktop.servicio.bridge.ServicioBridge.java
@Override public void unload(ServicioVB origen, Servicio destino) { if (StringUtils.isEmpty(origen.getId())) { destino.setId(null);/*from w w w .java2s.c om*/ } else { destino.setId(Long.valueOf(origen.getId())); } if (StringUtils.isEmpty(origen.getCliente().getId())) { destino.setIdCliente(null); } else { destino.setIdCliente(Long.valueOf(origen.getCliente().getId())); } if (StringUtils.isEmpty(origen.getAuto().getNumeroSerie())) { destino.setIdAuto(null); } else { destino.setIdAuto(origen.getAuto().getNumeroSerie()); } destino.setDescripcion(origen.getDescripcion()); destino.getMetadata().setStatus(origen.getStatus()); datosAutoBridge.unload(origen.getDatosAuto(), destino.getDatosAuto()); datosCobranzaBridge.unload(origen.getCobranza(), destino.getCobranza()); }
From source file:com.springsource.greenhouse.connect.AccountSignInAdapter.java
public String signIn(String userId, Connection<?> connection, NativeWebRequest request) { Account account = accountRepository.findById(Long.valueOf(userId)); AccountUtils.signin(account);/*w w w . j a v a 2 s.co m*/ return extractOriginalUrl(request); }