List of usage examples for java.lang Long Long
@Deprecated(since = "9") public Long(String s) throws NumberFormatException
From source file:com.oliveira.pedidovenda.converter.CategoriaConverter.java
@Override public Object getAsObject(FacesContext context, UIComponent component, String value) { Categoria retorno = null;/* w w w. j a va 2 s . c om*/ if (value != null) { Long id = new Long(value); retorno = categorias.porId(id); } return retorno; }
From source file:com.redhat.rhn.frontend.dto.ErrataCacheDto.java
/** * Default constructor//from www. ja v a 2s. co m */ public ErrataCacheDto() { serverId = new Long(0); errataId = new Long(0); packageId = new Long(0); }
From source file:com.turn.shapeshifter.transformers.DateTimeTransformerTest.java
@Test public void testSerializeAndParse() { DateTimeTransformer transformer = new DateTimeTransformer(); long tooLongAgo = (Long) transformer.parse(new TextNode("1981-10-17T21:00:00.000-02:00")); Assert.assertEquals("1981-10-17T23:00:00.000Z", transformer.serialize(new Long(tooLongAgo)).asText()); }
From source file:br.ufac.sion.converter.VagaConverter.java
@Override public Object getAsObject(FacesContext context, UIComponent component, String value) { if (StringUtils.isBlank(value)) { return null; }/* ww w . j av a 2s . c om*/ return this.vagaFacade.findById(new Long(value)); }
From source file:br.ufac.sion.converter.GpConverter.java
@Override public Object getAsObject(FacesContext context, UIComponent component, String value) { if (StringUtils.isBlank(value)) { return null; }//from www.j a v a 2 s .com return this.grupoFacade.findById(new Long(value)); }
From source file:net.sf.morph.util.TestClass.java
public static Map getPartialMap() { Map partialMap = new HashMap(); partialMap.put("anObject", new Long(14)); partialMap.put("myInteger", new Integer(4)); partialMap.put("myMap", null); partialMap.put("myLongValue", new Long(13)); partialMap.put("array", null); partialMap.put("numberArray", null); partialMap.put("funkyArray", null); partialMap.put("bigDecimal", null); partialMap.put("string", null); return partialMap; }
From source file:br.ufac.sion.converter.NivelConverter.java
@Override public Object getAsObject(FacesContext context, UIComponent component, String value) { if (StringUtils.isBlank(value)) { return null; }/*from w ww .jav a 2 s . c o m*/ return this.nivelFacade.findById(new Long(value)); }
From source file:br.ufac.sion.converter.SetorConverter.java
@Override public Object getAsObject(FacesContext context, UIComponent component, String value) { if (StringUtils.isBlank(value)) { return null; }/* ww w. jav a 2 s . co m*/ return this.setorFacade.findById(new Long(value)); }
From source file:controllers.user.UserResumeApp.java
/** * Tab??/*from w ww . j av a2 s. co m*/ * * @return */ @Transactional(readOnly = true) public static Result userhead() { DynamicForm requestData = Form.form().bindFromRequest(); Long userId = new Long(requestData.get("userId")); User user = User.findById(userId); if (StringUtils.isBlank(user.avatar)) { String headUrl = Assets.at(Assets.getDefaultAvatar()); return ok(views.html.usercenter.detailUS.userhead.render(userId, headUrl)); } String headUrl = Assets.at(User.getAvatarFileRelativePath(userId, 190)); return ok(views.html.usercenter.detailUS.userhead.render(userId, headUrl)); }
From source file:br.ufac.sion.converter.CidadeConverter.java
@Override public Object getAsObject(FacesContext context, UIComponent component, String value) { if (StringUtils.isBlank(value)) { return null; }//from www .jav a2 s. co m return this.cidadeFacade.findById(new Long(value)); }