Java Code Examples for javax.xml.bind.DatatypeConverter#parseLong()

The following examples show how to use javax.xml.bind.DatatypeConverter#parseLong() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CloverLongConvertor.java    From CloverETL-Engine with GNU Lesser General Public License v2.1 5 votes vote down vote up
public static Long parseXsdLongToLong(String value) throws DataConversionException {
  	Long result = null;
      
try {
	result = DatatypeConverter.parseLong(value);
} catch (Exception e) {
	logger.fatal("Unable to parse xsd:long to " + Long.class.getName() + ".", e);
	throw new DataConversionException("Unable to parse xsd:long to " + Long.class.getName() + ".", e);
}
      
      return result;
  }
 
Example 2
Source File: ValueConverter.java    From java-client-api with Apache License 2.0 5 votes vote down vote up
static public long StringToLongPrimitive(String value) {
  try {
    return DatatypeConverter.parseLong(value);
  } catch(Exception e) {
    throw new IllegalArgumentException("Could not convert to long: "+value, e);
  }
}
 
Example 3
Source File: Is24XmlUtils.java    From OpenEstate-IO with Apache License 2.0 4 votes vote down vote up
public static Long parseZahl2(String value) {
    value = StringUtils.trimToNull(value);
    return (value != null) ? DatatypeConverter.parseLong(value) : null;
}
 
Example 4
Source File: Is24XmlUtils.java    From OpenEstate-IO with Apache License 2.0 4 votes vote down vote up
public static Long parseZahl3(String value) {
    value = StringUtils.trimToNull(value);
    return (value != null) ? DatatypeConverter.parseLong(value) : null;
}
 
Example 5
Source File: Is24XmlUtils.java    From OpenEstate-IO with Apache License 2.0 4 votes vote down vote up
public static Long parseZahl4(String value) {
    value = StringUtils.trimToNull(value);
    return (value != null) ? DatatypeConverter.parseLong(value) : null;
}
 
Example 6
Source File: Is24XmlUtils.java    From OpenEstate-IO with Apache License 2.0 4 votes vote down vote up
public static Long parseZahl5(String value) {
    value = StringUtils.trimToNull(value);
    return (value != null) ? DatatypeConverter.parseLong(value) : null;
}
 
Example 7
Source File: Is24XmlUtils.java    From OpenEstate-IO with Apache License 2.0 4 votes vote down vote up
public static Long parseZahl8(String value) {
    value = StringUtils.trimToNull(value);
    return (value != null) ? DatatypeConverter.parseLong(value) : null;
}
 
Example 8
Source File: Is24XmlUtils.java    From OpenEstate-IO with Apache License 2.0 4 votes vote down vote up
public static Long parseZahl10(String value) {
    value = StringUtils.trimToNull(value);
    return (value != null) ? DatatypeConverter.parseLong(value) : null;
}
 
Example 9
Source File: KyeroUtils.java    From OpenEstate-IO with Apache License 2.0 4 votes vote down vote up
public static Long parsePriceType(String value) {
    value = StringUtils.trimToNull(value);
    return (value != null && !"x".equalsIgnoreCase(value)) ?
            DatatypeConverter.parseLong(value) : null;
}
 
Example 10
Source File: XsValueImpl.java    From java-client-api with Apache License 2.0 4 votes vote down vote up
public LongValImpl(String value) {
    this(DatatypeConverter.parseLong(value));
}