@@ -33,14 +33,14 @@ public class DecimalField
3333 implements
3434 FormulaDefinitionElement {
3535 private int length ;
36- private int precision ;
36+ private int scale ;
3737 private int indextype ;
3838 private ArrayList <CalculatedFieldTriggerPath > alltriggers ;
3939 private DecimalFormatter decimalformatter ;
4040 private StoredElement plainfield ;
4141
4242 public int getPrecision () {
43- return this .precision ;
43+ return this .scale ;
4444 }
4545
4646 public static int INDEXTYPE_NONE = 0 ;
@@ -56,16 +56,16 @@ public int getPrecision() {
5656 * @param tooltip roll-over tip
5757 * @param length total number of digits of the number (e.g. 533.33 is 5
5858 * digits)
59- * @param precision (digits to the right of decimal point (e.g. 533.33 has
60- * precision on 2)
59+ * @param scale (digits to the right of decimal point (e.g. 533.33 has
60+ * scale on 2)
6161 */
62- public DecimalField (String name , String displayname , String tooltip , int length , int precision , int indextype ) {
62+ public DecimalField (String name , String displayname , String tooltip , int length , int scale , int indextype ) {
6363
6464 super (name , displayname , tooltip );
6565 this .length = length ;
66- this .precision = precision ;
66+ this .scale = scale ;
6767 this .indextype = indextype ;
68- plainfield = new DecimalStoredElement ("" , length , precision );
68+ plainfield = new DecimalStoredElement ("" , length , scale );
6969 if (this .indextype == StringField .INDEXTYPE_RAWINDEX ) {
7070 this .addIndex (new Index ("RAWSEARCH" , plainfield , false ));
7171 }
@@ -81,7 +81,7 @@ public DecimalField(String name, String displayname, String tooltip, int length,
8181 * @param tooltip roll-over tip
8282 * @param length total number of digits of the number (e.g. 533.33 is 5
8383 * digits)
84- * @param precision (digits to the right of decimal point (e.g. 533.33 has
84+ * @param scale (digits to the right of decimal point (e.g. 533.33 has
8585 * precision on 2)
8686 * @param indextype type of index (one of the static int of this class
8787 * @param displaypriority a number strictly between -1000 and 1000
@@ -91,10 +91,10 @@ public DecimalField(
9191 String displayname ,
9292 String tooltip ,
9393 int length ,
94- int precision ,
94+ int scale ,
9595 int indextype ,
9696 int displaypriority ) {
97- this (name , displayname , tooltip , length , precision , indextype );
97+ this (name , displayname , tooltip , length , scale , indextype );
9898 this .setDisplayPriority (displaypriority );
9999 }
100100
@@ -108,8 +108,8 @@ public DecimalField(
108108 * @param tooltip roll-over tip
109109 * @param length total number of digits of the number (e.g. 533.33 is
110110 * 5 digits)
111- * @param precision (digits to the right of decimal point (e.g. 533.33
112- * has precision on 2)
111+ * @param scale (digits to the right of decimal point (e.g. 533.33
112+ * has scale on 2)
113113 * @param indextype type of index (one of the static int of this class
114114 * @param displaypriority a number strictly between -1000 and 1000
115115 * @param decimalformatter
@@ -119,11 +119,11 @@ public DecimalField(
119119 String displayname ,
120120 String tooltip ,
121121 int length ,
122- int precision ,
122+ int scale ,
123123 int indextype ,
124124 int displaypriority ,
125125 DecimalFormatter decimalformatter ) {
126- this (name , displayname , tooltip , length , precision , indextype );
126+ this (name , displayname , tooltip , length , scale , indextype );
127127 this .setDisplayPriority (displaypriority );
128128 this .decimalformatter = decimalformatter ;
129129 }
@@ -137,7 +137,7 @@ public String getDataObjectFieldName() {
137137 @ Override
138138 public String getDataObjectConstructorAttributes () {
139139 return "\" " + this .getName () + "\" ,\" " + this .getDisplayname () + "\" ,\" " + this .getTooltip () + "\" ,"
140- + this .length + "," + this .precision + "," + this .isNoUserEdition () + ",false,false,"
140+ + this .length + "," + this .scale + "," + this .isNoUserEdition () + ",false,false,"
141141 + (decimalformatter != null ? decimalformatter .generateDefinition ()
142142 : "null" + "," + this .getDisplayPriority ());
143143 }
@@ -197,20 +197,21 @@ public StoredElement getMainStoredElementForCompositeIndex() {
197197 @ Override
198198 public Field copy (String newname , String newdisplaylabel ) {
199199 return new DecimalField ((newname != null ? newname : this .getName ()),
200- (newdisplaylabel != null ? newdisplaylabel : this .getDisplayname ()), this .getTooltip (), length ,
201- precision , indextype , this .getDisplayPriority (), this .decimalformatter );
200+ (newdisplaylabel != null ? newdisplaylabel : this .getDisplayname ()), this .getTooltip (), length , scale ,
201+ indextype , this .getDisplayPriority (), this .decimalformatter );
202202 }
203-
203+
204204 @ Override
205205 public String writeCellExtractor () {
206- return "(a,b)->(DecimalDataObjectFieldFlatFileLoaderColumn.getContentFromCell( a," +length +"," +precision +" ,b, 0,null))" ;
206+ return "(a,b)->(DecimalDataObjectFieldFlatFileLoaderColumn.getContentFromCell( a," + scale + "," + length
207+ + " ,b, 0,null))" ;
207208 }
208209
209210 @ Override
210211 public String writeCellFiller () {
211212 return "(a,b)->DecimalDataObjectFieldFlatFileLoaderColumn.putContentInCell(a,b,null)" ;
212213 }
213-
214+
214215 @ Override
215216 public String writePayloadFiller () {
216217 return "Not yet implemented" ;
0 commit comments