public static OptionalThing<Classification> findByCode(Class<?> cdefType, Object code) {
        assertArgumentNotNull("cdefType", cdefType);
        assertArgumentNotNull("code", code);

        // #hope switch to nativeFindByCode() in future (can be over DBFlute-1.1.1) by jflute
        final Object result = nativeCodeOf(cdefType, code);
        if (result == null) {
            return OptionalThing.empty();
        }
        if (result instanceof OptionalThing<?>) { // handling for future
            @SuppressWarnings("unchecked")
            final OptionalThing<Classification> cast = (OptionalThing<Classification>) result;
            return cast;
        } else if (result instanceof Optional<?>) {
            @SuppressWarnings("unchecked")
            final Optional<Classification> cast = (Optional<Classification>) result;
            return OptionalThing.ofNullable(cast.orElse(null), () -> {
                throw new IllegalStateException("Not found the classification code: " + cdefType.getName() + "@" + code);
            });
        } else {
            return OptionalThing.of((Classification) result);
        }
    }
public static OptionalThing < Classification > findByCode ( Class < ? > cdefType , Object code ) { assertArgumentNotNull ( "cdefType" , cdefType ) ; assertArgumentNotNull ( "code" , code ) ; final Object result = nativeCodeOf ( cdefType , code ) ; if ( result == null ) { return OptionalThing . empty ( ) ; } if ( result instanceof OptionalThing < ? > ) { @ SuppressWarnings ( "unchecked" ) final OptionalThing < Classification > cast = ( OptionalThing < Classification > ) result ; return cast ; } else if ( result instanceof Optional < ? > ) { @ SuppressWarnings ( "unchecked" ) final Optional < Classification > cast = ( Optional < Classification > ) result ; return OptionalThing . ofNullable ( cast . orElse ( null ) , ( ) -> { throw new IllegalStateException ( "Not found the classification code: " + cdefType . getName ( ) + "@" + code ) ; } ) ; } else { return OptionalThing . of ( ( Classification ) result ) ; } }
============