List of usage examples for java.lang Long toString
public String toString()
From source file:com.bazzar.base.dao.redis.ItemRepository.java
public boolean isJobValid(Long jobId) { return template.hasKey(jobId.toString()); }
From source file:com.ewcms.content.particular.service.FontArticleMainService.java
@Override public Organ getPublishingSectorByCode(Long organId) { return organDAO.get(Integer.valueOf(organId.toString())); }
From source file:uk.ac.ebi.intact.editor.config.property.LongPropertyConverter.java
@Override public String convertToString(Long obj) { if (obj == null) return null; return obj.toString(); }
From source file:nz.net.orcon.kanban.automation.actions.UniqueIdAction.java
public String getUniqueId(String prefix, String name) throws Exception { Long newId = this.clusterManager.getId(String.format(URI.BOARD_URI, ""), name); return newId.toString(); }
From source file:com.bazzar.base.dao.redis.ItemRepository.java
public Map<Object, Object> getJob(Long jobId) { return template.opsForHash().entries(jobId.toString()); }
From source file:com.gallatinsystems.survey.dao.SurveyUtils.java
/** * Sends a POST request to publish a cascade resource to a server defined by the `flowServices` * property//from w w w . ja v a 2 s . c o m * * @param cascadeResourceId The id of the cascade resource to publish * @return "failed" or "publishing requested", depending on the success. */ public static String publishCascade(Long cascadeResourceId) { String status = "failed"; CascadeResourceDao crDao = new CascadeResourceDao(); CascadeResource cr = crDao.getByKey(cascadeResourceId); if (cr != null) { final String flowServiceURL = PropertyUtil.getProperty("flowServices"); final String uploadUrl = PropertyUtil.getProperty("surveyuploadurl"); if (flowServiceURL == null || "".equals(flowServiceURL)) { log.log(Level.SEVERE, "Error trying to publish cascade. Check `flowServices` property"); return status; } try { final JSONObject payload = new JSONObject(); payload.put("cascadeResourceId", cascadeResourceId.toString()); payload.put("uploadUrl", uploadUrl); cr.setVersion(cr.getVersion() + 1); payload.put("version", cr.getVersion().toString()); log.log(Level.INFO, "Sending cascade publish request for cascade: " + cascadeResourceId); final String postString = payload.toString(); log.log(Level.INFO, "POSTing to: " + flowServiceURL); final String response = new String( HttpUtil.doPost(flowServiceURL + "/publish_cascade", postString, "application/json"), "UTF-8"); log.log(Level.INFO, "Response from server: " + response); status = "publish requested"; cr.setStatus(Status.PUBLISHING); crDao.save(cr); } catch (Exception e) { log.log(Level.SEVERE, "Error publishing cascade: " + e.getMessage(), e); } } return status; }
From source file:com.bazzar.base.dao.redis.ItemRepository.java
public Long sendJob(Long jobId) { return template.convertAndSend("pubsub:queue", jobId.toString()); }
From source file:com.fujitsu.dc.engine.adapter.Require.java
/** * Require.// www.j av a2 s.c om * @param moduleName require?? * @return Require? * @throws DcEngineException DcEngineException */ public Object doRequire(String moduleName) throws DcEngineException { String source = this.sourceManager.getSource(moduleName + ".js"); Date date = new Date(); Long time = date.getTime(); String key = moduleName + time.toString(); source = key + " = function() {};(function(exports) {" + source + "})(" + key + ")"; Object require; this.context.requireJs(source, moduleName); require = this.context.requireJs(key, moduleName); return require; }
From source file:io.personium.engine.adapter.Require.java
/** * Require./* w w w .j a v a 2s. c om*/ * @param moduleName require?? * @return Require? * @throws PersoniumEngineException Exception about Engine */ public Object doRequire(String moduleName) throws PersoniumEngineException { String source = this.sourceManager.getSource(moduleName + ".js"); Date date = new Date(); Long time = date.getTime(); String key = moduleName + time.toString(); source = key + " = function() {};(function(exports) {" + source + "})(" + key + ")"; Object require; this.context.requireJs(source, moduleName); require = this.context.requireJs(key, moduleName); return require; }
From source file:com.miko.demo.mongo.enums.RedisLongSerializer.java
@Override public byte[] serialize(Long aLong) throws SerializationException { if (null != aLong) { return aLong.toString().getBytes(); } else {/*from w w w . j a v a 2 s . c om*/ return new byte[0]; } }