Example usage for java.lang Byte Byte

List of usage examples for java.lang Byte Byte

Introduction

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

Prototype

@Deprecated(since = "9")
public Byte(String s) throws NumberFormatException 

Source Link

Document

Constructs a newly allocated Byte object that represents the byte value indicated by the String parameter.

Usage

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskMySql.CFAsteriskMySqlSchema.java

public static Byte getNullableByte(ResultSet reader, int colidx) {
    try {/*from   w ww  .ja v a 2s  .co m*/
        byte val = reader.getByte(colidx);
        if (reader.wasNull()) {
            return (null);
        } else {
            return (new Byte(val));
        }
    } catch (SQLException e) {
        throw CFLib.getDefaultExceptionFactory().newDbException(CFAsteriskMySqlSchema.class, "getNullableByte",
                e);
    }
}

From source file:net.sourceforge.msscodefactory.cffreeswitch.v2_1.CFFswMySql.CFFswMySqlSchema.java

public static Byte getNullableByte(ResultSet reader, int colidx) {
    try {/*from w  w  w. j a  v  a2s .c o  m*/
        byte val = reader.getByte(colidx);
        if (reader.wasNull()) {
            return (null);
        } else {
            return (new Byte(val));
        }
    } catch (SQLException e) {
        throw CFLib.getDefaultExceptionFactory().newDbException(CFFswMySqlSchema.class, "getNullableByte", e);
    }
}

From source file:net.sf.jasperreports.engine.xml.JRXmlConstants.java

/**
 * @deprecated Replaced by {@link OnErrorTypeEnum}.
 *//* w ww. jav  a  2s .co m*/
public static Map getOnErrorTypeMap() {
    if (onErrorTypeMap == null) {
        Map map = new HashMap(8);
        map.put(ON_ERROR_TYPE_ERROR, new Byte(JRImage.ON_ERROR_TYPE_ERROR));
        map.put(ON_ERROR_TYPE_BLANK, new Byte(JRImage.ON_ERROR_TYPE_BLANK));
        map.put(ON_ERROR_TYPE_ICON, new Byte(JRImage.ON_ERROR_TYPE_ICON));
        map.put(new Byte(JRImage.ON_ERROR_TYPE_ERROR), ON_ERROR_TYPE_ERROR);
        map.put(new Byte(JRImage.ON_ERROR_TYPE_BLANK), ON_ERROR_TYPE_BLANK);
        map.put(new Byte(JRImage.ON_ERROR_TYPE_ICON), ON_ERROR_TYPE_ICON);
        onErrorTypeMap = Collections.unmodifiableMap(map);
    }

    return onErrorTypeMap;
}

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstMSSql.CFAstMSSqlSchema.java

public static Byte getNullableByte(ResultSet reader, int colidx) {
    try {/*w w  w. ja  va 2 s .co  m*/
        byte val = reader.getByte(colidx);
        if (reader.wasNull()) {
            return (null);
        } else {
            return (new Byte(val));
        }
    } catch (SQLException e) {
        throw CFLib.getDefaultExceptionFactory().newDbException(CFAstMSSqlSchema.class, "getNullableByte", e);
    }
}

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskOracle.CFAsteriskOracleSchema.java

public static Byte getNullableByte(ResultSet reader, int colidx) {
    try {//from   w ww.ja v a2s  .c o m
        byte val = reader.getByte(colidx);
        if (reader.wasNull()) {
            return (null);
        } else {
            return (new Byte(val));
        }
    } catch (SQLException e) {
        throw CFLib.getDefaultExceptionFactory().newDbException(CFAsteriskOracleSchema.class, "getNullableByte",
                e);
    }
}

From source file:de.juwimm.cms.remote.EditionServiceSpringImpl.java

private PersonHbm createPersonHbm(UnitHbm unit, Element ael, boolean useNewIds,
        Hashtable<Integer, Long> mappingPersons2, Hashtable<Integer, Long> mappingAddresses2,
        Hashtable<Integer, Long> mappingTalktime2) throws Exception {
    PersonHbm person = PersonHbm.Factory.newInstance();
    try {/*  w  ww  .j  av  a  2  s.c o  m*/
        person.setImageId(Integer.decode(ael.getAttribute("imageid")));
    } catch (Exception exe) {
    }
    try {
        person.setBirthDay(getNVal(ael, "birthDay"));
    } catch (Exception exe) {
    }
    try {
        person.setCountryJob(getNVal(ael, "countryJob"));
        person.setFirstname(getNVal(ael, "firstname"));
        person.setJob(getNVal(ael, "job"));
        person.setJobTitle(getNVal(ael, "jobTitle"));
        person.setLastname(getNVal(ael, "lastname"));
        person.setLinkMedicalAssociation(getNVal(ael, "linkMedicalAssociation"));
        person.setMedicalAssociation(getNVal(ael, "medicalAssociation"));
        person.setPosition(new Byte(getNVal(ael, "position")).byteValue());
        person.setSalutation(getNVal(ael, "salutation"));
        person.setSex(new Byte(getNVal(ael, "sex")).byteValue());
        person.setTitle(getNVal(ael, "title"));
        if (!useNewIds) {
            person.setPersonId(new Integer(ael.getAttribute("id")).longValue());
        }
        person.getUnits().add(unit);
        person = getPersonHbmDao().create(person);
    } catch (Exception exe) {
        log.warn("Error setting values: ", exe);
    }
    try {
        if (log.isDebugEnabled())
            log.debug("looking for addresses to import for person " + person.getPersonId()); //$NON-NLS-1$
        Iterator itAdr = XercesHelper.findNodes(ael, "./address"); //$NON-NLS-1$
        while (itAdr.hasNext()) {
            Element adrEl = (Element) itAdr.next();
            if (log.isDebugEnabled())
                log.debug("found address to import"); //$NON-NLS-1$
            AddressHbm local = createAddressHbm(adrEl, useNewIds, mappingAddresses);
            person.addAddress(local);
        }
    } catch (Exception exe) {
        log.warn("Error importing addresses: ", exe); //$NON-NLS-1$
        throw new CreateException(exe.getMessage());
    }
    try {
        if (log.isDebugEnabled())
            log.debug("looking for talktimes to import for person " + person.getPersonId()); //$NON-NLS-1$
        Iterator itTTimes = XercesHelper.findNodes(ael, "./talktime"); //$NON-NLS-1$
        while (itTTimes.hasNext()) {
            Element elm = (Element) itTTimes.next();
            if (log.isDebugEnabled())
                log.debug("found talktime to import"); //$NON-NLS-1$
            TalktimeHbm local = createTalktimeHbm(elm, useNewIds, mappingTalktime);
            person.addTalktime(local);
        }
    } catch (Exception exe) {
        log.warn("Error importing talktimes: ", exe); //$NON-NLS-1$
        throw new Exception(exe.getMessage());
    }
    return person;
}

From source file:net.sf.jasperreports.engine.xml.JRXmlConstants.java

/**
 * @deprecated Replaced by {@link StretchTypeEnum}.
 *///from  ww w.j  ava 2s.c  o  m
public static Map getStretchTypeMap() {
    if (stretchTypeMap == null) {
        Map map = new HashMap(8);
        map.put(STRETCH_TYPE_NO_STRETCH, new Byte(JRElement.STRETCH_TYPE_NO_STRETCH));
        map.put(STRETCH_TYPE_RELATIVE_TO_TALLEST_OBJECT,
                new Byte(JRElement.STRETCH_TYPE_RELATIVE_TO_TALLEST_OBJECT));
        map.put(STRETCH_TYPE_RELATIVE_TO_BAND_HEIGHT, new Byte(JRElement.STRETCH_TYPE_RELATIVE_TO_BAND_HEIGHT));
        map.put(new Byte(JRElement.STRETCH_TYPE_NO_STRETCH), STRETCH_TYPE_NO_STRETCH);
        map.put(new Byte(JRElement.STRETCH_TYPE_RELATIVE_TO_TALLEST_OBJECT),
                STRETCH_TYPE_RELATIVE_TO_TALLEST_OBJECT);
        map.put(new Byte(JRElement.STRETCH_TYPE_RELATIVE_TO_BAND_HEIGHT), STRETCH_TYPE_RELATIVE_TO_BAND_HEIGHT);
        stretchTypeMap = Collections.unmodifiableMap(map);
    }

    return stretchTypeMap;
}

From source file:net.sourceforge.msscodefactory.cffreeswitch.v2_1.CFFswOracle.CFFswOracleSchema.java

public static Byte getNullableByte(ResultSet reader, int colidx) {
    try {// w ww  .j  a v a2 s . com
        byte val = reader.getByte(colidx);
        if (reader.wasNull()) {
            return (null);
        } else {
            return (new Byte(val));
        }
    } catch (SQLException e) {
        throw CFLib.getDefaultExceptionFactory().newDbException(CFFswOracleSchema.class, "getNullableByte", e);
    }
}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccPgSql.CFAccPgSqlSchema.java

public static Byte getNullableByte(ResultSet reader, int colidx) {
    try {/*from  ww  w.  ja v a2  s  . c o m*/
        byte val = reader.getByte(colidx);
        if (reader.wasNull()) {
            return (null);
        } else {
            return (new Byte(val));
        }
    } catch (SQLException e) {
        throw CFLib.getDefaultExceptionFactory().newDbException(CFAccPgSqlSchema.class, "getNullableByte", e);
    }
}

From source file:net.sourceforge.msscodefactory.cfcrm.v2_1.CFCrmMSSql.CFCrmMSSqlSchema.java

public static Byte getNullableByte(ResultSet reader, int colidx) {
    try {//w  ww . ja  v a 2 s. c o  m
        byte val = reader.getByte(colidx);
        if (reader.wasNull()) {
            return (null);
        } else {
            return (new Byte(val));
        }
    } catch (SQLException e) {
        throw CFLib.getDefaultExceptionFactory().newDbException(CFCrmMSSqlSchema.class, "getNullableByte", e);
    }
}