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

The following examples show how to use javax.xml.bind.DatatypeConverter#printInt() . 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: CloverIntegerConvertor.java    From CloverETL-Engine with GNU Lesser General Public License v2.1 5 votes vote down vote up
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 File: KyeroUtils.java    From OpenEstate-IO with 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
Source File: ImmobiliareItUtils.java    From OpenEstate-IO with Apache License 2.0 4 votes vote down vote up
public static String printRooms(Integer value) {
    if (!isValidRooms(value))
        throw new IllegalArgumentException("Can't print rooms value!");
    else
        return DatatypeConverter.printInt(value);
}
 
Example 4
Source File: ImmobiliareItUtils.java    From OpenEstate-IO with Apache License 2.0 4 votes vote down vote up
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 File: ValueConverter.java    From java-client-api with Apache License 2.0 4 votes vote down vote up
static public String IntegerPrimitiveToString(int value) {
  return DatatypeConverter.printInt(value);
}
 
Example 6
Source File: XsValueImpl.java    From java-client-api with Apache License 2.0 4 votes vote down vote up
@Override
public String toString() {
    return DatatypeConverter.printInt(value);
}
 
Example 7
Source File: NumberUtil.java    From jpmml-model with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
static
public String printInteger(Integer value){
	return DatatypeConverter.printInt(value);
}