class HintCommandExecutorFactory {

    public static HintCommandExecutor newInstance(final HintCommand hintCommand, final BackendConnection backendConnection, final String sql) {
        if (hintCommand instanceof HintSetPrimaryOnlyCommand) {
            return new HintSetPrimaryOnlyExecutor();
        }
        if (hintCommand instanceof HintSetDatabaseShardingValueCommand) {
            return new HintSetDatabaseShardingValueExecutor();
        }
        if (hintCommand instanceof HintAddDatabaseShardingValueCommand) {
            return new HintAddDatabaseShardingValueExecutor();
        }
        if (hintCommand instanceof HintAddTableShardingValueCommand) {
            return new HintAddTableShardingValueExecutor();
        }
        if (hintCommand instanceof HintClearCommand) {
            return new HintClearExecutor();
        }
        if (hintCommand instanceof HintShowStatusCommand) {
            return new HintShowStatusExecutor();
        }
        if (hintCommand instanceof HintShowTableStatusCommand) {
            return new HintShowTableStatusExecutor(backendConnection);
        }
        return new HintErrorParameterExecutor(sql);
    }

}