public static DataEntry getNumericField ( String name , Float min , Float max ) { DataEntry de = new DataEntry ( ) ; de . setEntryName ( name ) ; DataEntryType det = DataEntryTypeServer . getType ( "type.numeric.name" ) ; de . setDataEntryPropertyList ( getDefaultProperties ( det ) ) ; de . setDataEntryType ( det ) ; for ( DataEntryProperty dep : de . getDataEntryPropertyList ( ) ) { if ( dep . getPropertyName ( ) . equals ( "property.min" ) && min != null ) { //Set minimum dep . setPropertyValue ( min . toString ( ) ) ; } if ( dep . getPropertyName ( ) . equals ( "property.max" ) && max != null ) { //Set minimum dep . setPropertyValue ( max . toString ( ) ) ; } } return de ; }
Create a numeric field .