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

The following examples show how to use javax.xml.bind.DatatypeConverter#printInt() . 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 String printIntegerToXsdInt(Integer value) throws DataConversionException {
      String result = null;
      
      try {
	result = DatatypeConverter.printInt(value);
} catch (Exception e) {
	logger.fatal("Unable to print " + Integer.class.getName() + " to xsd:int.", e);
	throw new DataConversionException("Unable to print " + Integer.class.getName() + " to xsd:int.", e);
      }
      
      return result;
  }
 
Example 2
Source Project: OpenEstate-IO   File: KyeroUtils.java    License: Apache License 2.0 4 votes vote down vote up
public static String printImageAttributeType(Integer value) {
    if (!isValidImageAttributeType(value))
        throw new IllegalArgumentException("Can't print image-attribute value!");
    else
        return DatatypeConverter.printInt(value);
}
 
Example 3
public static String printRooms(Integer value) {
    if (!isValidRooms(value))
        throw new IllegalArgumentException("Can't print rooms value!");
    else
        return DatatypeConverter.printInt(value);
}
 
Example 4
public static String printYear(Integer value) {
    if (!isValidYear(value))
        throw new IllegalArgumentException("Can't print year value!");
    else
        return DatatypeConverter.printInt(value);
}
 
Example 5
Source Project: java-client-api   File: ValueConverter.java    License: Apache License 2.0 4 votes vote down vote up
static public String IntegerPrimitiveToString(int value) {
  return DatatypeConverter.printInt(value);
}
 
Example 6
Source Project: java-client-api   File: XsValueImpl.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public String toString() {
    return DatatypeConverter.printInt(value);
}
 
Example 7
static
public String printInteger(Integer value){
	return DatatypeConverter.printInt(value);
}