protected OType deriveFieldType ( ODocument iRecord , String fieldName , OType requestedFieldType ) { // Schema defined types can not be ignored if ( iRecord . getSchemaClass ( ) . existsProperty ( fieldName ) ) { return iRecord . getSchemaClass ( ) . getProperty ( fieldName ) . getType ( ) ; } // New type if ( requestedFieldType != null ) { return requestedFieldType ; } // Existing type (not fixed by the schema) return iRecord . fieldType ( fieldName ) ; }
Derives the type of a field in a document .