| 119 | } |
| 120 | |
| 121 | JNIEXPORT jboolean |
| 122 | NativeDisableTable(JNIEnv* env, jobject jobj, jlong jclient_ptr, jstring jtablename) { |
| 123 | tera::Client* client = reinterpret_cast<tera::Client*>(jclient_ptr); |
| 124 | std::string tablename = reinterpret_cast<const char*>(env->GetStringUTFChars(jtablename, NULL)); |
| 125 | tera::ErrorCode error_code; |
| 126 | std::string msg; |
| 127 | |
| 128 | if (client == NULL) { |
| 129 | msg = "tera client not initialized."; |
| 130 | SendErrorJ(env, jobj, msg); |
| 131 | return JNI_FALSE; |
| 132 | } |
| 133 | if (!client->DisableTable(tablename, &error_code)) { |
| 134 | msg = "failed to disable table, reason: " + error_code.GetReason(); |
| 135 | SendErrorJ(env, jobj, msg); |
| 136 | return JNI_FALSE; |
| 137 | } |
| 138 | return JNI_TRUE; |
| 139 | } |
| 140 | |
| 141 | JNIEXPORT jboolean |
| 142 | NativeIsTableExist(JNIEnv* env, jobject jobj, jlong jclient_ptr, jstring jtablename) { |
nothing calls this directly
no test coverage detected