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

The following examples show how to use javax.xml.bind.DatatypeConverter#parseLong() . These examples are extracted from open source projects. 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
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 Project: java-client-api   File: ValueConverter.java    License: 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 Project: OpenEstate-IO   File: Is24XmlUtils.java    License: 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 Project: OpenEstate-IO   File: Is24XmlUtils.java    License: 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 Project: OpenEstate-IO   File: Is24XmlUtils.java    License: 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 Project: OpenEstate-IO   File: Is24XmlUtils.java    License: 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 Project: OpenEstate-IO   File: Is24XmlUtils.java    License: 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 Project: OpenEstate-IO   File: Is24XmlUtils.java    License: 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 Project: OpenEstate-IO   File: KyeroUtils.java    License: 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 Project: java-client-api   File: XsValueImpl.java    License: Apache License 2.0 4 votes vote down vote up
public LongValImpl(String value) {
    this(DatatypeConverter.parseLong(value));
}