private static boolean isValidId ( Object idValue , DataType identifierType ) { boolean validId = false ; if ( idValue != null ) { switch ( identifierType ) { case LONG : case LONG_OBJECT : validId = ( long ) idValue != 0 ; break ; case STRING : validId = ( ( String ) idValue ) . trim ( ) . length ( ) > 0 ; break ; default : // we should never get here break ; } } return validId ; }
Checks to see if the given value is a valid identifier for the given ID type .