@Test public void testGetTypeInfoName() { DecimalTypeInfo decimalTypeInfo = TypeInfoFactory.getDecimalTypeInfo(10, 2); Assert.assertEquals("DECIMAL(10,2)", decimalTypeInfo.getTypeName()); decimalTypeInfo = TypeInfoFactory.getDecimalTypeInfo(DecimalTypeInfo.DEFAULT_PRECISION, DecimalTypeInfo.DEFAULT_SCALE); Assert.assertEquals("DECIMAL", decimalTypeInfo.getTypeName()); }
@Override public String getTypeName() { if ((precision == DEFAULT_PRECISION) && (scale == DEFAULT_SCALE)) { return super.getTypeName(); } return String.format("%s(%s,%s)", super.getTypeName(), precision, scale); }
DecimalTypeInfo extends AbstractPrimitiveTypeInfo { @Override public String getTypeName() { if ((precision == DEFAULT_PRECISION) && (scale == DEFAULT_SCALE)) { return super.getTypeName(); } return String.format("%s(%s,%s)", super.getTypeName(), precision, scale); } }
DecimalTypeInfo extends AbstractPrimitiveTypeInfo { @Override public String getTypeName() { if ((precision == DEFAULT_PRECISION) && (scale == DEFAULT_SCALE)) { return super.getTypeName(); } return String.format("%s(%s,%s)", super.getTypeName(), precision, scale); } DecimalTypeInfo();   DecimalTypeInfo(int precision, int scale); }
DecimalTypeInfo extends AbstractPrimitiveTypeInfo { @Override public String getTypeName() { if ((precision == DEFAULT_PRECISION) && (scale == DEFAULT_SCALE)) { return super.getTypeName(); } return String.format("%s(%s,%s)", super.getTypeName(), precision, scale); } DecimalTypeInfo();   DecimalTypeInfo(int precision, int scale); @Override String getTypeName(); int getPrecision(); int getScale(); }
DecimalTypeInfo extends AbstractPrimitiveTypeInfo { @Override public String getTypeName() { if ((precision == DEFAULT_PRECISION) && (scale == DEFAULT_SCALE)) { return super.getTypeName(); } return String.format("%s(%s,%s)", super.getTypeName(), precision, scale); } DecimalTypeInfo();   DecimalTypeInfo(int precision, int scale); @Override String getTypeName(); int getPrecision(); int getScale();  }