Example usage for java.lang Long valueOf

List of usage examples for java.lang Long valueOf

Introduction

In this page you can find the example usage for java.lang Long valueOf.

Prototype

@HotSpotIntrinsicCandidate
public static Long valueOf(long l) 

Source Link

Document

Returns a Long instance representing the specified long value.

Usage

From source file:csns.web.editor.RubricPropertyEditor.java

@Override
public void setAsText(String text) throws IllegalArgumentException {
    if (StringUtils.hasText(text))
        setValue(rubricDao.getRubric(Long.valueOf(text)));
}

From source file:com.nebhale.cyclinglibrary.web.json.LinkTest.java

@Test
public void test() {
    Link link = new Link("test-rel", new StubIdentifiable(Long.valueOf(0)), "path-segment", new Stub());

    assertEquals("test-rel", link.getRel());
    assertEquals("http://localhost/0/path-segment/non-identifiable", link.getHref());
    assertEquals("Link [rel=test-rel, href=http://localhost/0/path-segment/non-identifiable]", link.toString());

}

From source file:csns.web.editor.StandingPropertyEditor.java

@Override
public void setAsText(String text) throws IllegalArgumentException {
    if (StringUtils.hasText(text))
        setValue(standingDao.getStanding(Long.valueOf(text)));
}

From source file:de.berlios.jhelpdesk.web.tools.ArticleCategoryEditor.java

@Override
public void setAsText(String text) {
    Long articleCategoryId = Long.valueOf(text);
    ArticleCategory articleCategory = articleCategoryDAO.getById(articleCategoryId);
    setValue(articleCategory);/*from  www  .j  a v a2 s. c  om*/
}

From source file:org.lieuofs.canton.biz.dao.CantonOFSFichierTxtDaoTest.java

@Test
public void lecture() {
    // Fribourg a l'id 10
    ICanton canton = dao.lire(Long.valueOf(10l));
    assertThat(canton.getCodeIso2()).isEqualToIgnoringCase("FR");
}

From source file:com.nebhale.cyclinglibrary.repository.JdbcCollectionRepositoryTest.java

@Test
public void create() {
    this.jdbcTemplate.update("INSERT INTO types(id, name, shortName) VALUES(?, ?, ?)", 0, "test-name",
            "test-short-name");

    Collection collection = this.collectionRepository.create(Long.valueOf(0), "test-name", "test-short-name");

    Map<String, Object> data = this.jdbcTemplate
            .queryForMap("SELECT id, typeId, name, shortName FROM collections");
    assertEquals(Long.valueOf(0), data.get("typeId"));
    assertEquals("test-name", data.get("name"));
    assertEquals("test-short-name", data.get("shortName"));
    assertEquals(data.get("id"), collection.getId());
    assertEquals(data.get("typeId"), collection.getTypeId());
    assertEquals(data.get("name"), collection.getName());
    assertEquals(data.get("shortName"), collection.getShortName());
}

From source file:org.dswarm.graph.json.Node.java

public void setId(final long idArg) {

    id = Long.valueOf(idArg);
}

From source file:com.work.petclinic.config.MessageConfig.java

@Bean
public Converter<String, Message> messageConverter() {
    return new Converter<String, Message>() {
        @Override//from ww w  .ja  va  2s .  c o  m
        public Message convert(String id) {
            return messageRepository().findById(Long.valueOf(id));
        }
    };
}

From source file:com.greenline.guahao.biz.manager.helpcenter.impl.HelpCenterManagerImpl.java

@Override
public List<HelpCenterArticleDO> getArticlesByCategoryId(String cateId) {
    if (StringUtils.isBlank(cateId)) {
        return null;
    }//  w ww .  j a v a2s  .c  om

    return helpCenterDAO.getArticlesByCategoryId(Long.valueOf(cateId));
}

From source file:gov.ca.cwds.cals.service.FasFacilityService.java

@UnitOfWork(FAS)
FacilityInformation findFacilityInfoByLicenseNumber(String facilityId) {
    return facilityInformationDao.find(Long.valueOf(facilityId));
}