private int getFixedDataFieldSize ( FieldType type ) { int result = 0 ; DataType dataType = type . getDataType ( ) ; if ( dataType != null ) { switch ( dataType ) { case DATE : case INTEGER : case DURATION : { result = 4 ; break ; } case TIME_UNITS : case CONSTRAINT : case PRIORITY : case PERCENTAGE : case TASK_TYPE : case ACCRUE : case SHORT : case BOOLEAN : case DELAY : case WORKGROUP : case RATE_UNITS : case EARNED_VALUE_METHOD : case RESOURCE_REQUEST_TYPE : { result = 2 ; break ; } case CURRENCY : case UNITS : case RATE : case WORK : { result = 8 ; break ; } case WORK_UNITS : { result = 1 ; break ; } case GUID : { result = 16 ; break ; } default : { result = 0 ; break ; } } } return result ; }
Determine the size of a field in a fixed data block .