List of usage examples for java.lang Long valueOf
@HotSpotIntrinsicCandidate public static Long valueOf(long l)
From source file:com.sybase365.mobiliser.custom.project.businesslogic.impl.BlacklistTypeLogicImpl.java
@Override public void createBlacklistType(final BlacklistType blacklistType, final long callerId) { LOG.trace("#createBlacklistType({},{})", blacklistType, Long.toString(callerId)); this.daoFactory.getBlacklistTypeDao().save(blacklistType, Long.valueOf(callerId)); }
From source file:com.test.sharksharding.use.resource.RedisResourceTest.java
public @Test void testInsert() { while (true) { System.out.println("input-->"); Scanner scan = new Scanner(System.in); final String uid = scan.nextLine(); JdbcTemplate jdbcTemlate = GetJdbcTemplate.getJdbcTemplate(); Map<String, Object> params = new HashMap<String, Object>(); params.put("uid", Long.valueOf(uid)); params.put("userName", "gaoxianglong"); final String sql = sqlTemplate.getSql("setUserInfo", params); jdbcTemlate.update(sql);// w w w . j av a 2 s. c o m } }
From source file:de.forsthaus.backend.dao.impl.ArticleDAOImpl.java
@Override public Article getArticleById(long id) { return get(Article.class, Long.valueOf(id)); }
From source file:org.hibernate.ogm.datastore.couchdb.dialect.backend.json.impl.SequenceDocument.java
@JsonIgnore public long getValue() { return Long.valueOf((String) properties.get(valueProperty)); }
From source file:it.av.es.web.data.GroupDetachableModel.java
/** * @see java.lang.Object#hashCode() */ @Override public final int hashCode() { return Long.valueOf(id).hashCode(); }
From source file:org.lieuofs.commune.biz.GestionCommuneTest.java
@Test public void lecture() { ICommuneSuisse commune = gestionnaire.lire(12060l); assertEquals("N OFS de Givisiez", 2197, commune.getNumeroOFS()); assertEquals("Nom Givisiez", "Givisiez", commune.getNom()); assertEquals("N OFS de la Sarine", 1004, commune.getDistrict().getNumeroOFS()); assertEquals("Canton de Fribourg", "FR", commune.getCanton().getCodeIso2()); commune = gestionnaire.lire(Long.valueOf(-3456l)); assertNull("Lecture avec identifiant ngatif", commune); }
From source file:org.openwms.common.location.LocationGroupServiceImpl.java
/** * {@inheritDoc}//from w w w . j a v a 2s. c o m */ @Override public void changeGroupState(String id, LocationGroupState stateIn, LocationGroupState stateOut) { LocationGroup locationGroup = locationGroupRepository.findOne(Long.valueOf(id)); locationGroup.changeState(stateIn, stateOut); }
From source file:com.google.code.stackexchange.client.examples.UsersApiExample.java
/** * Process command line./*from w ww . j av a2 s. c o m*/ * * @param line the line * @param options the options */ private static void processCommandLine(CommandLine line, Options options) { if (line.hasOption(HELP_OPTION)) { printHelp(options); } else if (line.hasOption(APPLICATION_KEY_OPTION)) { final String keyValue = line.getOptionValue(APPLICATION_KEY_OPTION); final StackExchangeApiClientFactory factory = StackExchangeApiClientFactory.newInstance(keyValue); final StackExchangeApiClient client = factory.createStackExchangeApiClient(); if (line.hasOption(ID_OPTION)) { String idValue = line.getOptionValue(ID_OPTION); List<User> users = client.getUsers(Long.valueOf(idValue)); printResult(users.get(0)); } else { List<User> users = client.getUsers(); for (User user : users) { printResult(user); } } } else { printHelp(options); } }
From source file:com.yn.keygen.DefaultKeyGenerator.java
public static void initWorkerId() { String workerId = System.getProperty(WORKER_ID_PROPERTY_KEY); if (StringUtils.isNotBlank(workerId)) { setWorkerId(Long.valueOf(workerId)); return;/*from w ww . j av a 2 s . co m*/ } workerId = System.getenv(WORKER_ID_ENV_KEY); if (StringUtils.isBlank(workerId)) { return; } setWorkerId(Long.valueOf(workerId)); }
From source file:test.com.azaptree.services.command.http.WebCommandContextTest.java
@Test public void testWebCommandContext() { final MockHttpServletRequest request = new MockHttpServletRequest(); final MockHttpServletResponse response = new MockHttpServletResponse(); WebCommandContext<String, Long> stringLongCtx = new WebCommandContext<>(request, response); Assert.assertNotNull(stringLongCtx.getHttpServletRequest()); Assert.assertNotNull(stringLongCtx.getHttpServletResponse()); stringLongCtx = new WebCommandContext<>(request, response, "REQUEST_MSG"); Assert.assertNotNull(stringLongCtx.getHttpServletRequest()); Assert.assertNotNull(stringLongCtx.getHttpServletResponse()); Assert.assertEquals(stringLongCtx.getRequestMessage(), "REQUEST_MSG"); stringLongCtx.setResponseMessage(5l); Assert.assertEquals(stringLongCtx.getResponseMessage(), Long.valueOf(5l)); }