Example usage for java.lang Long toString

List of usage examples for java.lang Long toString

Introduction

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

Prototype

public String toString() 

Source Link

Document

Returns a String object representing this Long 's value.

Usage

From source file:br.ufac.sion.converter.GpConverter.java

@Override
public String getAsString(FacesContext context, UIComponent component, Object value) {
    if (value != null) {
        Long codigo = ((Grupo) value).getId();
        String retorno = (codigo == null ? null : codigo.toString());

        return retorno;

    }/*from   ww  w .  ja va  2  s .  c o m*/
    return "";
}

From source file:com.clustercontrol.winevent.dialog.WinEventDialog.java

private static String keywordLongToString(List<Long> keywordList) {
    ArrayList<String> list = new ArrayList<String>();
    for (Long keyword : keywordList) {
        String keywordStr = WinEventUtil.getKeywordString(keyword);

        // Keyword?long??String????????????
        if (keywordStr != null) {
            list.add(keywordStr);/*w  w  w  . j av  a  2  s . c om*/
        }
        // Keyword?long??String???????long??????????
        else {
            list.add(keyword.toString());
        }
    }
    return listToCommaSeparatedString(list);
}

From source file:br.ufac.sion.converter.ConcursoConverter.java

@Override
public String getAsString(FacesContext context, UIComponent component, Object value) {
    if (value != null) {
        Long codigo = ((Concurso) value).getId();
        String retorno = (codigo == null ? null : codigo.toString());

        return retorno;
    }/* ww  w . j a  va  2s .  co m*/
    return null;
}

From source file:br.ufac.sion.converter.InscricaoConverter.java

@Override
public String getAsString(FacesContext context, UIComponent component, Object value) {
    if (value != null) {
        Long codigo = ((Inscricao) value).getId();
        String retorno = (codigo == null ? null : codigo.toString());

        return retorno;
    }/*from ww w . j  a  va  2 s .  co m*/
    return "";
}

From source file:br.ufac.sion.inscricao.converter.CandidatoConverter.java

@Override
public String getAsString(FacesContext context, UIComponent component, Object value) {
    if (value != null) {
        Long codigo = ((Candidato) value).getId();
        String retorno = (codigo == null ? null : codigo.toString());

        return retorno;
    }/*  w  w w  . j a  v  a2  s . c  o  m*/
    return "";
}

From source file:br.ufac.sion.converter.FuncionarioConverter.java

@Override
public String getAsString(FacesContext context, UIComponent component, Object value) {
    if (value != null) {
        Long codigo = ((Funcionario) value).getId();
        String retorno = (codigo == null ? null : codigo.toString());

        return retorno;
    }/*from  ww  w  . ja  va2 s. c  o  m*/
    return "";
}

From source file:br.ufac.sion.converter.ContaConverter.java

@Override
public String getAsString(FacesContext context, UIComponent component, Object value) {
    if (value != null) {
        Long codigo = ((ContaBancaria) value).getId();
        String retorno = (codigo == null ? null : codigo.toString());

        return retorno;
    }/*from ww w  . j  av a  2s  .c om*/
    return "";
}

From source file:br.ufac.sion.converter.OrgaoExpedidorConverter.java

@Override
public String getAsString(FacesContext context, UIComponent component, Object value) {
    if (value != null) {
        Long codigo = ((OrgaoExpedidor) value).getId();
        String retorno = (codigo == null ? null : codigo.toString());

        return retorno;
    }//from w w w .j  a  va  2 s .  c  o  m
    return "";
}

From source file:com.hmsinc.epicenter.surveillance.jobs.SurveillanceJob.java

/**
 * @param taskId/*from ww  w . j  av  a2  s  .  co m*/
 */
private void cancelJob(final Long taskId) {
    try {
        scheduler.deleteJob(JOB_PREFIX + taskId.toString(), Scheduler.DEFAULT_GROUP);
    } catch (SchedulerException e) {
        logger.error("Could not cancel surveillance job: " + JOB_PREFIX + taskId, e);
    }
}

From source file:com.vmware.vfabric.hyperic.plugin.vfws.VfwsCollector.java

private void setStartTime(String key, String value) {
    // StartTime is in micro seconds since epoch
    // there isn't a unit for that
    Long startTime = Long.valueOf(value) / 1000;
    setValue(key, (startTime.toString()));
}