001// Automatically generated by the Thrifty compiler; do not edit! 002// Generated on: 2021-05-17T06:20:27.443Z 003// Source: J:\facedb\facedb-service\FaceDb.thrift at 150:1 004package net.gdface.facedb.thrift.client; 005 006import com.microsoft.thrifty.TType; 007import com.microsoft.thrifty.ThriftException; 008import com.microsoft.thrifty.protocol.FieldMetadata; 009import com.microsoft.thrifty.protocol.ListMetadata; 010import com.microsoft.thrifty.protocol.MapMetadata; 011import com.microsoft.thrifty.protocol.MessageMetadata; 012import com.microsoft.thrifty.protocol.Protocol; 013import com.microsoft.thrifty.service.AsyncClientBase; 014import com.microsoft.thrifty.service.MethodCall; 015import com.microsoft.thrifty.service.ServiceMethodCallback; 016import com.microsoft.thrifty.service.TMessageType; 017import com.microsoft.thrifty.util.ProtocolUtil; 018import java.io.IOException; 019import java.util.ArrayList; 020import java.util.HashMap; 021import java.util.List; 022import java.util.Map; 023import javax.annotation.Generated; 024import okio.ByteString; 025 026@Generated( 027 value = "com.microsoft.thrifty.gen.ThriftyCodeGenerator", 028 comments = "https://github.com/microsoft/thrifty" 029) 030public class FaceDbClient extends AsyncClientBase implements FaceDb { 031 public FaceDbClient(Protocol protocol, AsyncClientBase.Listener listener) { 032 super(protocol, listener); 033 } 034 035 @Override 036 public void addFeature(ByteString feature, Map<ByteString, CodeInfo> faces, 037 ServiceMethodCallback<FeatureBean> callback) { 038 this.enqueue(new AddFeatureCall(feature, faces, callback)); 039 } 040 041 @Override 042 public void addImage(ByteString imgData, List<CodeInfo> features, 043 ServiceMethodCallback<ImageBean> callback) { 044 this.enqueue(new AddImageCall(imgData, features, callback)); 045 } 046 047 @Override 048 public void addImageIfAbsent(ByteString imgData, CodeInfo code, Double similarty, 049 ServiceMethodCallback<ImageBean> callback) { 050 this.enqueue(new AddImageIfAbsentCall(imgData, code, similarty, callback)); 051 } 052 053 @Override 054 public void compareFaces(String featureId, ByteString imgData, List<CodeInfo> facePos, 055 ServiceMethodCallback<List<Double>> callback) { 056 this.enqueue(new CompareFacesCall(featureId, imgData, facePos, callback)); 057 } 058 059 @Override 060 public void compareFeature(String featureId, ByteString feature, 061 ServiceMethodCallback<Double> callback) { 062 this.enqueue(new CompareFeatureCall(featureId, feature, callback)); 063 } 064 065 @Override 066 public void compareFeatureId(String featureId1, String featureId2, 067 ServiceMethodCallback<Double> callback) { 068 this.enqueue(new CompareFeatureIdCall(featureId1, featureId2, callback)); 069 } 070 071 @Override 072 public void compareFeatures(String featureId, List<CodeInfo> features, 073 ServiceMethodCallback<List<Double>> callback) { 074 this.enqueue(new CompareFeaturesCall(featureId, features, callback)); 075 } 076 077 @Override 078 public void dbCapacity(ServiceMethodCallback<Map<String, String>> callback) { 079 this.enqueue(new DbCapacityCall(callback)); 080 } 081 082 @Override 083 public void deleteFeature(String featureId, Boolean cascade, 084 ServiceMethodCallback<Boolean> callback) { 085 this.enqueue(new DeleteFeatureCall(featureId, cascade, callback)); 086 } 087 088 @Override 089 public void deleteFeatures(List<String> featureIdList, Boolean cascade, 090 ServiceMethodCallback<Integer> callback) { 091 this.enqueue(new DeleteFeaturesCall(featureIdList, cascade, callback)); 092 } 093 094 @Override 095 public void deleteImage(String imgMd5, Boolean cascade, ServiceMethodCallback<Boolean> callback) { 096 this.enqueue(new DeleteImageCall(imgMd5, cascade, callback)); 097 } 098 099 @Override 100 public void deleteImages(List<String> imgMd5List, Boolean cascade, 101 ServiceMethodCallback<Integer> callback) { 102 this.enqueue(new DeleteImagesCall(imgMd5List, cascade, callback)); 103 } 104 105 @Override 106 public void detectAndAddFeatures(ByteString imgData, Integer faceNum, 107 ServiceMethodCallback<ImageBean> callback) { 108 this.enqueue(new DetectAndAddFeaturesCall(imgData, faceNum, callback)); 109 } 110 111 @Override 112 public void detectAndCompareFaces(String featureId, ByteString imgData, Integer faceNum, 113 ServiceMethodCallback<CompareResult> callback) { 114 this.enqueue(new DetectAndCompareFacesCall(featureId, imgData, faceNum, callback)); 115 } 116 117 @Override 118 public void detectAndGetCodeInfo(ByteString imgData, 119 ServiceMethodCallback<List<CodeInfo>> callback) { 120 this.enqueue(new DetectAndGetCodeInfoCall(imgData, callback)); 121 } 122 123 @Override 124 public void detectAndGetCodeInfoMat(MatType matType, ByteString matData, Integer width, 125 Integer height, ServiceMethodCallback<List<CodeInfo>> callback) { 126 this.enqueue(new DetectAndGetCodeInfoMatCall(matType, matData, width, height, callback)); 127 } 128 129 @Override 130 public void detectAndSearchFaces(ByteString imgData, Double similarty, Integer rows, String where, 131 ServiceMethodCallback<List<SearchResult>> callback) { 132 this.enqueue(new DetectAndSearchFacesCall(imgData, similarty, rows, where, callback)); 133 } 134 135 @Override 136 public void getCodeInfo(Integer faceId, ServiceMethodCallback<CodeInfo> callback) { 137 this.enqueue(new GetCodeInfoCall(faceId, callback)); 138 } 139 140 @Override 141 public void getCodeInfoByFeatureId(String featureId, ServiceMethodCallback<CodeInfo> callback) { 142 this.enqueue(new GetCodeInfoByFeatureIdCall(featureId, callback)); 143 } 144 145 @Override 146 public void getCodeInfoByImageMd5(String imageMd5, ServiceMethodCallback<CodeInfo> callback) { 147 this.enqueue(new GetCodeInfoByImageMd5Call(imageMd5, callback)); 148 } 149 150 @Override 151 public void getCodeInfosByFeatureId(String featureId, 152 ServiceMethodCallback<List<CodeInfo>> callback) { 153 this.enqueue(new GetCodeInfosByFeatureIdCall(featureId, callback)); 154 } 155 156 @Override 157 public void getCodeInfosByImageMd5(String imageMd5, 158 ServiceMethodCallback<List<CodeInfo>> callback) { 159 this.enqueue(new GetCodeInfosByImageMd5Call(imageMd5, callback)); 160 } 161 162 @Override 163 public void getFace(Integer faceId, ServiceMethodCallback<FaceBean> callback) { 164 this.enqueue(new GetFaceCall(faceId, callback)); 165 } 166 167 @Override 168 public void getFaceByFeatureId(String featureId, ServiceMethodCallback<FaceBean> callback) { 169 this.enqueue(new GetFaceByFeatureIdCall(featureId, callback)); 170 } 171 172 @Override 173 public void getFaceByImageMd5(String imageMd5, ServiceMethodCallback<FaceBean> callback) { 174 this.enqueue(new GetFaceByImageMd5Call(imageMd5, callback)); 175 } 176 177 @Override 178 public void getFaceCount(String where, ServiceMethodCallback<Integer> callback) { 179 this.enqueue(new GetFaceCountCall(where, callback)); 180 } 181 182 @Override 183 public void getFacesByFeatureId(String featureId, 184 ServiceMethodCallback<List<FaceBean>> callback) { 185 this.enqueue(new GetFacesByFeatureIdCall(featureId, callback)); 186 } 187 188 @Override 189 public void getFacesByImageMd5(String imageMd5, ServiceMethodCallback<List<FaceBean>> callback) { 190 this.enqueue(new GetFacesByImageMd5Call(imageMd5, callback)); 191 } 192 193 @Override 194 public void getFeature(String featureId, ServiceMethodCallback<FeatureBean> callback) { 195 this.enqueue(new GetFeatureCall(featureId, callback)); 196 } 197 198 @Override 199 public void getFeatureByFaceId(Integer faceId, ServiceMethodCallback<FeatureBean> callback) { 200 this.enqueue(new GetFeatureByFaceIdCall(faceId, callback)); 201 } 202 203 @Override 204 public void getFeatureByImageMd5(String imageMd5, ServiceMethodCallback<FeatureBean> callback) { 205 this.enqueue(new GetFeatureByImageMd5Call(imageMd5, callback)); 206 } 207 208 @Override 209 public void getFeatureCount(ServiceMethodCallback<Integer> callback) { 210 this.enqueue(new GetFeatureCountCall(callback)); 211 } 212 213 @Override 214 public void getFeaturesByImageMd5(String imageMd5, 215 ServiceMethodCallback<List<FeatureBean>> callback) { 216 this.enqueue(new GetFeaturesByImageMd5Call(imageMd5, callback)); 217 } 218 219 @Override 220 public void getImage(String imageMd5, ServiceMethodCallback<ImageBean> callback) { 221 this.enqueue(new GetImageCall(imageMd5, callback)); 222 } 223 224 @Override 225 public void getImageByFaceId(Integer faceId, ServiceMethodCallback<ImageBean> callback) { 226 this.enqueue(new GetImageByFaceIdCall(faceId, callback)); 227 } 228 229 @Override 230 public void getImageByFeatureId(String featureId, ServiceMethodCallback<ImageBean> callback) { 231 this.enqueue(new GetImageByFeatureIdCall(featureId, callback)); 232 } 233 234 @Override 235 public void getImageBytes(String imageMd5, ServiceMethodCallback<ByteString> callback) { 236 this.enqueue(new GetImageBytesCall(imageMd5, callback)); 237 } 238 239 @Override 240 public void getImageBytesRef(String primaryKey, String refType, 241 ServiceMethodCallback<ByteString> callback) { 242 this.enqueue(new GetImageBytesRefCall(primaryKey, refType, callback)); 243 } 244 245 @Override 246 public void getImageCount(String where, ServiceMethodCallback<Integer> callback) { 247 this.enqueue(new GetImageCountCall(where, callback)); 248 } 249 250 @Override 251 public void getImageRef(String primaryKey, String refType, 252 ServiceMethodCallback<ImageBean> callback) { 253 this.enqueue(new GetImageRefCall(primaryKey, refType, callback)); 254 } 255 256 @Override 257 public void getImagesByFeatureId(String featureId, 258 ServiceMethodCallback<List<ImageBean>> callback) { 259 this.enqueue(new GetImagesByFeatureIdCall(featureId, callback)); 260 } 261 262 @Override 263 public void hasFeature(ByteString feature, ServiceMethodCallback<Boolean> callback) { 264 this.enqueue(new HasFeatureCall(feature, callback)); 265 } 266 267 @Override 268 public void hasFeatureByMD5(String featureId, ServiceMethodCallback<Boolean> callback) { 269 this.enqueue(new HasFeatureByMD5Call(featureId, callback)); 270 } 271 272 @Override 273 public void hasImage(String imageMd5, ServiceMethodCallback<Boolean> callback) { 274 this.enqueue(new HasImageCall(imageMd5, callback)); 275 } 276 277 @Override 278 public void isLocal(ServiceMethodCallback<Boolean> callback) { 279 this.enqueue(new IsLocalCall(callback)); 280 } 281 282 @Override 283 public void loadFeaturesMd5ByCreateTime(Long timestamp, 284 ServiceMethodCallback<List<String>> callback) { 285 this.enqueue(new LoadFeaturesMd5ByCreateTimeCall(timestamp, callback)); 286 } 287 288 @Override 289 public void loadFeaturesMd5ByCreateTimeTimeStr(String timestamp, 290 ServiceMethodCallback<List<String>> callback) { 291 this.enqueue(new LoadFeaturesMd5ByCreateTimeTimeStrCall(timestamp, callback)); 292 } 293 294 @Override 295 public void loadFeaturesMd5ByWhere(String where, ServiceMethodCallback<List<String>> callback) { 296 this.enqueue(new LoadFeaturesMd5ByWhereCall(where, callback)); 297 } 298 299 @Override 300 public void loadImagesByWhere(String where, Integer startRow, Integer numRows, 301 ServiceMethodCallback<List<ImageBean>> callback) { 302 this.enqueue(new LoadImagesByWhereCall(where, startRow, numRows, callback)); 303 } 304 305 @Override 306 public void loadImagesMd5ByCreateTime(Long timestamp, 307 ServiceMethodCallback<List<String>> callback) { 308 this.enqueue(new LoadImagesMd5ByCreateTimeCall(timestamp, callback)); 309 } 310 311 @Override 312 public void loadImagesMd5ByCreateTimeTimeStr(String timestamp, 313 ServiceMethodCallback<List<String>> callback) { 314 this.enqueue(new LoadImagesMd5ByCreateTimeTimeStrCall(timestamp, callback)); 315 } 316 317 @Override 318 public void loadImagesMd5ByWhere(String where, ServiceMethodCallback<List<String>> callback) { 319 this.enqueue(new LoadImagesMd5ByWhereCall(where, callback)); 320 } 321 322 @Override 323 public void searchFaces(ByteString imgData, CodeInfo facePos, Double similarty, Integer rows, 324 String where, ServiceMethodCallback<List<SearchResult>> callback) { 325 this.enqueue(new SearchFacesCall(imgData, facePos, similarty, rows, where, callback)); 326 } 327 328 @Override 329 public void searchFacesMat(MatType matType, ByteString matData, Integer width, Integer height, 330 CodeInfo facePos, Double similarty, Integer rows, String where, 331 ServiceMethodCallback<List<SearchResult>> callback) { 332 this.enqueue(new SearchFacesMatCall(matType, matData, width, height, facePos, similarty, rows, where, callback)); 333 } 334 335 @Override 336 public void searchFeatures(ByteString feature, Double similarty, Integer rows, String where, 337 ServiceMethodCallback<List<SearchResult>> callback) { 338 this.enqueue(new SearchFeaturesCall(feature, similarty, rows, where, callback)); 339 } 340 341 private static final class AddFeatureCall extends MethodCall<FeatureBean> { 342 private final ByteString feature; 343 344 private final Map<ByteString, CodeInfo> faces; 345 346 AddFeatureCall(ByteString feature, Map<ByteString, CodeInfo> faces, 347 ServiceMethodCallback<FeatureBean> callback) { 348 super("addFeature", TMessageType.CALL, callback); 349 this.feature = feature; 350 this.faces = faces; 351 } 352 353 @Override 354 protected void send(Protocol protocol) throws IOException { 355 protocol.writeStructBegin("args"); 356 if (this.feature != null) { 357 protocol.writeFieldBegin("feature", 1, TType.STRING); 358 protocol.writeBinary(this.feature); 359 protocol.writeFieldEnd(); 360 } 361 if (this.faces != null) { 362 protocol.writeFieldBegin("faces", 2, TType.MAP); 363 protocol.writeMapBegin(TType.STRING, TType.STRUCT, this.faces.size()); 364 for (Map.Entry<ByteString, CodeInfo> entry0 : this.faces.entrySet()) { 365 ByteString key0 = entry0.getKey(); 366 CodeInfo value0 = entry0.getValue(); 367 protocol.writeBinary(key0); 368 net.gdface.facedb.thrift.client.CodeInfo.ADAPTER.write(protocol, value0); 369 } 370 protocol.writeMapEnd(); 371 protocol.writeFieldEnd(); 372 } 373 protocol.writeFieldStop(); 374 protocol.writeStructEnd(); 375 } 376 377 @Override 378 protected FeatureBean receive(Protocol protocol, MessageMetadata metadata) throws Exception { 379 FeatureBean result = null; 380 DuplicateRecordException ex1 = null; 381 ServiceRuntimeException ex2 = null; 382 protocol.readStructBegin(); 383 while (true) { 384 FieldMetadata field = protocol.readFieldBegin(); 385 if (field.typeId == TType.STOP) { 386 break; 387 } 388 switch (field.fieldId) { 389 case 0: { 390 if (field.typeId == TType.STRUCT) { 391 net.gdface.facedb.thrift.client.FeatureBean value = net.gdface.facedb.thrift.client.FeatureBean.ADAPTER.read(protocol); 392 result = value; 393 } else { 394 ProtocolUtil.skip(protocol, field.typeId); 395 } 396 } 397 break; 398 case 1: { 399 if (field.typeId == TType.STRUCT) { 400 net.gdface.facedb.thrift.client.DuplicateRecordException value = net.gdface.facedb.thrift.client.DuplicateRecordException.ADAPTER.read(protocol); 401 ex1 = value; 402 } else { 403 ProtocolUtil.skip(protocol, field.typeId); 404 } 405 } 406 break; 407 case 2: { 408 if (field.typeId == TType.STRUCT) { 409 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 410 ex2 = value; 411 } else { 412 ProtocolUtil.skip(protocol, field.typeId); 413 } 414 } 415 break; 416 default: ProtocolUtil.skip(protocol, field.typeId); break; 417 } 418 protocol.readFieldEnd(); 419 } 420 protocol.readStructEnd(); 421 if (result != null) { 422 return result; 423 } else if (ex1 != null) { 424 throw ex1; 425 } else if (ex2 != null) { 426 throw ex2; 427 } else { 428 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 429 } 430 } 431 } 432 433 private static final class AddImageCall extends MethodCall<ImageBean> { 434 private final ByteString imgData; 435 436 private final List<CodeInfo> features; 437 438 AddImageCall(ByteString imgData, List<CodeInfo> features, 439 ServiceMethodCallback<ImageBean> callback) { 440 super("addImage", TMessageType.CALL, callback); 441 this.imgData = imgData; 442 this.features = features; 443 } 444 445 @Override 446 protected void send(Protocol protocol) throws IOException { 447 protocol.writeStructBegin("args"); 448 if (this.imgData != null) { 449 protocol.writeFieldBegin("imgData", 1, TType.STRING); 450 protocol.writeBinary(this.imgData); 451 protocol.writeFieldEnd(); 452 } 453 if (this.features != null) { 454 protocol.writeFieldBegin("features", 2, TType.LIST); 455 protocol.writeListBegin(TType.STRUCT, this.features.size()); 456 for (CodeInfo item0 : this.features) { 457 net.gdface.facedb.thrift.client.CodeInfo.ADAPTER.write(protocol, item0); 458 } 459 protocol.writeListEnd(); 460 protocol.writeFieldEnd(); 461 } 462 protocol.writeFieldStop(); 463 protocol.writeStructEnd(); 464 } 465 466 @Override 467 protected ImageBean receive(Protocol protocol, MessageMetadata metadata) throws Exception { 468 ImageBean result = null; 469 DuplicateRecordException ex1 = null; 470 ServiceRuntimeException ex2 = null; 471 protocol.readStructBegin(); 472 while (true) { 473 FieldMetadata field = protocol.readFieldBegin(); 474 if (field.typeId == TType.STOP) { 475 break; 476 } 477 switch (field.fieldId) { 478 case 0: { 479 if (field.typeId == TType.STRUCT) { 480 net.gdface.facedb.thrift.client.ImageBean value = net.gdface.facedb.thrift.client.ImageBean.ADAPTER.read(protocol); 481 result = value; 482 } else { 483 ProtocolUtil.skip(protocol, field.typeId); 484 } 485 } 486 break; 487 case 1: { 488 if (field.typeId == TType.STRUCT) { 489 net.gdface.facedb.thrift.client.DuplicateRecordException value = net.gdface.facedb.thrift.client.DuplicateRecordException.ADAPTER.read(protocol); 490 ex1 = value; 491 } else { 492 ProtocolUtil.skip(protocol, field.typeId); 493 } 494 } 495 break; 496 case 2: { 497 if (field.typeId == TType.STRUCT) { 498 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 499 ex2 = value; 500 } else { 501 ProtocolUtil.skip(protocol, field.typeId); 502 } 503 } 504 break; 505 default: ProtocolUtil.skip(protocol, field.typeId); break; 506 } 507 protocol.readFieldEnd(); 508 } 509 protocol.readStructEnd(); 510 if (result != null) { 511 return result; 512 } else if (ex1 != null) { 513 throw ex1; 514 } else if (ex2 != null) { 515 throw ex2; 516 } else { 517 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 518 } 519 } 520 } 521 522 private static final class AddImageIfAbsentCall extends MethodCall<ImageBean> { 523 private final ByteString imgData; 524 525 private final CodeInfo code; 526 527 private final Double similarty; 528 529 AddImageIfAbsentCall(ByteString imgData, CodeInfo code, Double similarty, 530 ServiceMethodCallback<ImageBean> callback) { 531 super("addImageIfAbsent", TMessageType.CALL, callback); 532 this.imgData = imgData; 533 this.code = code; 534 if (similarty == null) throw new NullPointerException("similarty"); 535 this.similarty = similarty; 536 } 537 538 @Override 539 protected void send(Protocol protocol) throws IOException { 540 protocol.writeStructBegin("args"); 541 if (this.imgData != null) { 542 protocol.writeFieldBegin("imgData", 1, TType.STRING); 543 protocol.writeBinary(this.imgData); 544 protocol.writeFieldEnd(); 545 } 546 if (this.code != null) { 547 protocol.writeFieldBegin("code", 2, TType.STRUCT); 548 net.gdface.facedb.thrift.client.CodeInfo.ADAPTER.write(protocol, this.code); 549 protocol.writeFieldEnd(); 550 } 551 protocol.writeFieldBegin("similarty", 3, TType.DOUBLE); 552 protocol.writeDouble(this.similarty); 553 protocol.writeFieldEnd(); 554 protocol.writeFieldStop(); 555 protocol.writeStructEnd(); 556 } 557 558 @Override 559 protected ImageBean receive(Protocol protocol, MessageMetadata metadata) throws Exception { 560 ImageBean result = null; 561 ImageErrorException ex1 = null; 562 NotFaceDetectedException ex2 = null; 563 ServiceRuntimeException ex3 = null; 564 protocol.readStructBegin(); 565 while (true) { 566 FieldMetadata field = protocol.readFieldBegin(); 567 if (field.typeId == TType.STOP) { 568 break; 569 } 570 switch (field.fieldId) { 571 case 0: { 572 if (field.typeId == TType.STRUCT) { 573 net.gdface.facedb.thrift.client.ImageBean value = net.gdface.facedb.thrift.client.ImageBean.ADAPTER.read(protocol); 574 result = value; 575 } else { 576 ProtocolUtil.skip(protocol, field.typeId); 577 } 578 } 579 break; 580 case 1: { 581 if (field.typeId == TType.STRUCT) { 582 net.gdface.facedb.thrift.client.ImageErrorException value = net.gdface.facedb.thrift.client.ImageErrorException.ADAPTER.read(protocol); 583 ex1 = value; 584 } else { 585 ProtocolUtil.skip(protocol, field.typeId); 586 } 587 } 588 break; 589 case 2: { 590 if (field.typeId == TType.STRUCT) { 591 net.gdface.facedb.thrift.client.NotFaceDetectedException value = net.gdface.facedb.thrift.client.NotFaceDetectedException.ADAPTER.read(protocol); 592 ex2 = value; 593 } else { 594 ProtocolUtil.skip(protocol, field.typeId); 595 } 596 } 597 break; 598 case 3: { 599 if (field.typeId == TType.STRUCT) { 600 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 601 ex3 = value; 602 } else { 603 ProtocolUtil.skip(protocol, field.typeId); 604 } 605 } 606 break; 607 default: ProtocolUtil.skip(protocol, field.typeId); break; 608 } 609 protocol.readFieldEnd(); 610 } 611 protocol.readStructEnd(); 612 if (result != null) { 613 return result; 614 } else if (ex1 != null) { 615 throw ex1; 616 } else if (ex2 != null) { 617 throw ex2; 618 } else if (ex3 != null) { 619 throw ex3; 620 } else { 621 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 622 } 623 } 624 } 625 626 private static final class CompareFacesCall extends MethodCall<List<Double>> { 627 private final String featureId; 628 629 private final ByteString imgData; 630 631 private final List<CodeInfo> facePos; 632 633 CompareFacesCall(String featureId, ByteString imgData, List<CodeInfo> facePos, 634 ServiceMethodCallback<List<Double>> callback) { 635 super("compareFaces", TMessageType.CALL, callback); 636 this.featureId = featureId; 637 this.imgData = imgData; 638 this.facePos = facePos; 639 } 640 641 @Override 642 protected void send(Protocol protocol) throws IOException { 643 protocol.writeStructBegin("args"); 644 if (this.featureId != null) { 645 protocol.writeFieldBegin("featureId", 1, TType.STRING); 646 protocol.writeString(this.featureId); 647 protocol.writeFieldEnd(); 648 } 649 if (this.imgData != null) { 650 protocol.writeFieldBegin("imgData", 2, TType.STRING); 651 protocol.writeBinary(this.imgData); 652 protocol.writeFieldEnd(); 653 } 654 if (this.facePos != null) { 655 protocol.writeFieldBegin("facePos", 3, TType.LIST); 656 protocol.writeListBegin(TType.STRUCT, this.facePos.size()); 657 for (CodeInfo item0 : this.facePos) { 658 net.gdface.facedb.thrift.client.CodeInfo.ADAPTER.write(protocol, item0); 659 } 660 protocol.writeListEnd(); 661 protocol.writeFieldEnd(); 662 } 663 protocol.writeFieldStop(); 664 protocol.writeStructEnd(); 665 } 666 667 @Override 668 protected List<Double> receive(Protocol protocol, MessageMetadata metadata) throws Exception { 669 List<Double> result = null; 670 NotFoundBeanException ex1 = null; 671 NotFaceDetectedException ex2 = null; 672 ServiceRuntimeException ex3 = null; 673 protocol.readStructBegin(); 674 while (true) { 675 FieldMetadata field = protocol.readFieldBegin(); 676 if (field.typeId == TType.STOP) { 677 break; 678 } 679 switch (field.fieldId) { 680 case 0: { 681 if (field.typeId == TType.LIST) { 682 ListMetadata listMetadata0 = protocol.readListBegin(); 683 List<Double> value = new ArrayList<Double>(listMetadata0.size); 684 for (int i0 = 0; i0 < listMetadata0.size; ++i0) { 685 double item0 = protocol.readDouble(); 686 value.add(item0); 687 } 688 protocol.readListEnd(); 689 result = value; 690 } else { 691 ProtocolUtil.skip(protocol, field.typeId); 692 } 693 } 694 break; 695 case 1: { 696 if (field.typeId == TType.STRUCT) { 697 net.gdface.facedb.thrift.client.NotFoundBeanException value = net.gdface.facedb.thrift.client.NotFoundBeanException.ADAPTER.read(protocol); 698 ex1 = value; 699 } else { 700 ProtocolUtil.skip(protocol, field.typeId); 701 } 702 } 703 break; 704 case 2: { 705 if (field.typeId == TType.STRUCT) { 706 net.gdface.facedb.thrift.client.NotFaceDetectedException value = net.gdface.facedb.thrift.client.NotFaceDetectedException.ADAPTER.read(protocol); 707 ex2 = value; 708 } else { 709 ProtocolUtil.skip(protocol, field.typeId); 710 } 711 } 712 break; 713 case 3: { 714 if (field.typeId == TType.STRUCT) { 715 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 716 ex3 = value; 717 } else { 718 ProtocolUtil.skip(protocol, field.typeId); 719 } 720 } 721 break; 722 default: ProtocolUtil.skip(protocol, field.typeId); break; 723 } 724 protocol.readFieldEnd(); 725 } 726 protocol.readStructEnd(); 727 if (result != null) { 728 return result; 729 } else if (ex1 != null) { 730 throw ex1; 731 } else if (ex2 != null) { 732 throw ex2; 733 } else if (ex3 != null) { 734 throw ex3; 735 } else { 736 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 737 } 738 } 739 } 740 741 private static final class CompareFeatureCall extends MethodCall<Double> { 742 private final String featureId; 743 744 private final ByteString feature; 745 746 CompareFeatureCall(String featureId, ByteString feature, 747 ServiceMethodCallback<Double> callback) { 748 super("compareFeature", TMessageType.CALL, callback); 749 this.featureId = featureId; 750 this.feature = feature; 751 } 752 753 @Override 754 protected void send(Protocol protocol) throws IOException { 755 protocol.writeStructBegin("args"); 756 if (this.featureId != null) { 757 protocol.writeFieldBegin("featureId", 1, TType.STRING); 758 protocol.writeString(this.featureId); 759 protocol.writeFieldEnd(); 760 } 761 if (this.feature != null) { 762 protocol.writeFieldBegin("feature", 2, TType.STRING); 763 protocol.writeBinary(this.feature); 764 protocol.writeFieldEnd(); 765 } 766 protocol.writeFieldStop(); 767 protocol.writeStructEnd(); 768 } 769 770 @Override 771 protected Double receive(Protocol protocol, MessageMetadata metadata) throws Exception { 772 Double result = null; 773 NotFoundBeanException ex1 = null; 774 ServiceRuntimeException ex2 = null; 775 protocol.readStructBegin(); 776 while (true) { 777 FieldMetadata field = protocol.readFieldBegin(); 778 if (field.typeId == TType.STOP) { 779 break; 780 } 781 switch (field.fieldId) { 782 case 0: { 783 if (field.typeId == TType.DOUBLE) { 784 double value = protocol.readDouble(); 785 result = value; 786 } else { 787 ProtocolUtil.skip(protocol, field.typeId); 788 } 789 } 790 break; 791 case 1: { 792 if (field.typeId == TType.STRUCT) { 793 net.gdface.facedb.thrift.client.NotFoundBeanException value = net.gdface.facedb.thrift.client.NotFoundBeanException.ADAPTER.read(protocol); 794 ex1 = value; 795 } else { 796 ProtocolUtil.skip(protocol, field.typeId); 797 } 798 } 799 break; 800 case 2: { 801 if (field.typeId == TType.STRUCT) { 802 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 803 ex2 = value; 804 } else { 805 ProtocolUtil.skip(protocol, field.typeId); 806 } 807 } 808 break; 809 default: ProtocolUtil.skip(protocol, field.typeId); break; 810 } 811 protocol.readFieldEnd(); 812 } 813 protocol.readStructEnd(); 814 if (result != null) { 815 return result; 816 } else if (ex1 != null) { 817 throw ex1; 818 } else if (ex2 != null) { 819 throw ex2; 820 } else { 821 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 822 } 823 } 824 } 825 826 private static final class CompareFeatureIdCall extends MethodCall<Double> { 827 private final String featureId1; 828 829 private final String featureId2; 830 831 CompareFeatureIdCall(String featureId1, String featureId2, 832 ServiceMethodCallback<Double> callback) { 833 super("compareFeatureId", TMessageType.CALL, callback); 834 this.featureId1 = featureId1; 835 this.featureId2 = featureId2; 836 } 837 838 @Override 839 protected void send(Protocol protocol) throws IOException { 840 protocol.writeStructBegin("args"); 841 if (this.featureId1 != null) { 842 protocol.writeFieldBegin("featureId1", 1, TType.STRING); 843 protocol.writeString(this.featureId1); 844 protocol.writeFieldEnd(); 845 } 846 if (this.featureId2 != null) { 847 protocol.writeFieldBegin("featureId2", 2, TType.STRING); 848 protocol.writeString(this.featureId2); 849 protocol.writeFieldEnd(); 850 } 851 protocol.writeFieldStop(); 852 protocol.writeStructEnd(); 853 } 854 855 @Override 856 protected Double receive(Protocol protocol, MessageMetadata metadata) throws Exception { 857 Double result = null; 858 NotFoundBeanException ex1 = null; 859 ServiceRuntimeException ex2 = null; 860 protocol.readStructBegin(); 861 while (true) { 862 FieldMetadata field = protocol.readFieldBegin(); 863 if (field.typeId == TType.STOP) { 864 break; 865 } 866 switch (field.fieldId) { 867 case 0: { 868 if (field.typeId == TType.DOUBLE) { 869 double value = protocol.readDouble(); 870 result = value; 871 } else { 872 ProtocolUtil.skip(protocol, field.typeId); 873 } 874 } 875 break; 876 case 1: { 877 if (field.typeId == TType.STRUCT) { 878 net.gdface.facedb.thrift.client.NotFoundBeanException value = net.gdface.facedb.thrift.client.NotFoundBeanException.ADAPTER.read(protocol); 879 ex1 = value; 880 } else { 881 ProtocolUtil.skip(protocol, field.typeId); 882 } 883 } 884 break; 885 case 2: { 886 if (field.typeId == TType.STRUCT) { 887 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 888 ex2 = value; 889 } else { 890 ProtocolUtil.skip(protocol, field.typeId); 891 } 892 } 893 break; 894 default: ProtocolUtil.skip(protocol, field.typeId); break; 895 } 896 protocol.readFieldEnd(); 897 } 898 protocol.readStructEnd(); 899 if (result != null) { 900 return result; 901 } else if (ex1 != null) { 902 throw ex1; 903 } else if (ex2 != null) { 904 throw ex2; 905 } else { 906 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 907 } 908 } 909 } 910 911 private static final class CompareFeaturesCall extends MethodCall<List<Double>> { 912 private final String featureId; 913 914 private final List<CodeInfo> features; 915 916 CompareFeaturesCall(String featureId, List<CodeInfo> features, 917 ServiceMethodCallback<List<Double>> callback) { 918 super("compareFeatures", TMessageType.CALL, callback); 919 this.featureId = featureId; 920 this.features = features; 921 } 922 923 @Override 924 protected void send(Protocol protocol) throws IOException { 925 protocol.writeStructBegin("args"); 926 if (this.featureId != null) { 927 protocol.writeFieldBegin("featureId", 1, TType.STRING); 928 protocol.writeString(this.featureId); 929 protocol.writeFieldEnd(); 930 } 931 if (this.features != null) { 932 protocol.writeFieldBegin("features", 2, TType.LIST); 933 protocol.writeListBegin(TType.STRUCT, this.features.size()); 934 for (CodeInfo item0 : this.features) { 935 net.gdface.facedb.thrift.client.CodeInfo.ADAPTER.write(protocol, item0); 936 } 937 protocol.writeListEnd(); 938 protocol.writeFieldEnd(); 939 } 940 protocol.writeFieldStop(); 941 protocol.writeStructEnd(); 942 } 943 944 @Override 945 protected List<Double> receive(Protocol protocol, MessageMetadata metadata) throws Exception { 946 List<Double> result = null; 947 NotFoundBeanException ex1 = null; 948 ServiceRuntimeException ex2 = null; 949 protocol.readStructBegin(); 950 while (true) { 951 FieldMetadata field = protocol.readFieldBegin(); 952 if (field.typeId == TType.STOP) { 953 break; 954 } 955 switch (field.fieldId) { 956 case 0: { 957 if (field.typeId == TType.LIST) { 958 ListMetadata listMetadata0 = protocol.readListBegin(); 959 List<Double> value = new ArrayList<Double>(listMetadata0.size); 960 for (int i0 = 0; i0 < listMetadata0.size; ++i0) { 961 double item0 = protocol.readDouble(); 962 value.add(item0); 963 } 964 protocol.readListEnd(); 965 result = value; 966 } else { 967 ProtocolUtil.skip(protocol, field.typeId); 968 } 969 } 970 break; 971 case 1: { 972 if (field.typeId == TType.STRUCT) { 973 net.gdface.facedb.thrift.client.NotFoundBeanException value = net.gdface.facedb.thrift.client.NotFoundBeanException.ADAPTER.read(protocol); 974 ex1 = value; 975 } else { 976 ProtocolUtil.skip(protocol, field.typeId); 977 } 978 } 979 break; 980 case 2: { 981 if (field.typeId == TType.STRUCT) { 982 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 983 ex2 = value; 984 } else { 985 ProtocolUtil.skip(protocol, field.typeId); 986 } 987 } 988 break; 989 default: ProtocolUtil.skip(protocol, field.typeId); break; 990 } 991 protocol.readFieldEnd(); 992 } 993 protocol.readStructEnd(); 994 if (result != null) { 995 return result; 996 } else if (ex1 != null) { 997 throw ex1; 998 } else if (ex2 != null) { 999 throw ex2; 1000 } else { 1001 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 1002 } 1003 } 1004 } 1005 1006 private static final class DbCapacityCall extends MethodCall<Map<String, String>> { 1007 DbCapacityCall(ServiceMethodCallback<Map<String, String>> callback) { 1008 super("dbCapacity", TMessageType.CALL, callback); 1009 } 1010 1011 @Override 1012 protected void send(Protocol protocol) throws IOException { 1013 protocol.writeStructBegin("args"); 1014 protocol.writeFieldStop(); 1015 protocol.writeStructEnd(); 1016 } 1017 1018 @Override 1019 protected Map<String, String> receive(Protocol protocol, MessageMetadata metadata) throws 1020 Exception { 1021 Map<String, String> result = null; 1022 ServiceRuntimeException ex1 = null; 1023 protocol.readStructBegin(); 1024 while (true) { 1025 FieldMetadata field = protocol.readFieldBegin(); 1026 if (field.typeId == TType.STOP) { 1027 break; 1028 } 1029 switch (field.fieldId) { 1030 case 0: { 1031 if (field.typeId == TType.MAP) { 1032 MapMetadata mapMetadata0 = protocol.readMapBegin(); 1033 Map<String, String> value = new HashMap<String, String>(mapMetadata0.size); 1034 for (int i0 = 0; i0 < mapMetadata0.size; ++i0) { 1035 String key0 = protocol.readString(); 1036 String value0 = protocol.readString(); 1037 value.put(key0, value0); 1038 } 1039 protocol.readMapEnd(); 1040 result = value; 1041 } else { 1042 ProtocolUtil.skip(protocol, field.typeId); 1043 } 1044 } 1045 break; 1046 case 1: { 1047 if (field.typeId == TType.STRUCT) { 1048 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 1049 ex1 = value; 1050 } else { 1051 ProtocolUtil.skip(protocol, field.typeId); 1052 } 1053 } 1054 break; 1055 default: ProtocolUtil.skip(protocol, field.typeId); break; 1056 } 1057 protocol.readFieldEnd(); 1058 } 1059 protocol.readStructEnd(); 1060 if (result != null) { 1061 return result; 1062 } else if (ex1 != null) { 1063 throw ex1; 1064 } else { 1065 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 1066 } 1067 } 1068 } 1069 1070 private static final class DeleteFeatureCall extends MethodCall<Boolean> { 1071 private final String featureId; 1072 1073 private final Boolean cascade; 1074 1075 DeleteFeatureCall(String featureId, Boolean cascade, ServiceMethodCallback<Boolean> callback) { 1076 super("deleteFeature", TMessageType.CALL, callback); 1077 this.featureId = featureId; 1078 if (cascade == null) throw new NullPointerException("cascade"); 1079 this.cascade = cascade; 1080 } 1081 1082 @Override 1083 protected void send(Protocol protocol) throws IOException { 1084 protocol.writeStructBegin("args"); 1085 if (this.featureId != null) { 1086 protocol.writeFieldBegin("featureId", 1, TType.STRING); 1087 protocol.writeString(this.featureId); 1088 protocol.writeFieldEnd(); 1089 } 1090 protocol.writeFieldBegin("cascade", 2, TType.BOOL); 1091 protocol.writeBool(this.cascade); 1092 protocol.writeFieldEnd(); 1093 protocol.writeFieldStop(); 1094 protocol.writeStructEnd(); 1095 } 1096 1097 @Override 1098 protected Boolean receive(Protocol protocol, MessageMetadata metadata) throws Exception { 1099 Boolean result = null; 1100 ServiceRuntimeException ex1 = null; 1101 protocol.readStructBegin(); 1102 while (true) { 1103 FieldMetadata field = protocol.readFieldBegin(); 1104 if (field.typeId == TType.STOP) { 1105 break; 1106 } 1107 switch (field.fieldId) { 1108 case 0: { 1109 if (field.typeId == TType.BOOL) { 1110 boolean value = protocol.readBool(); 1111 result = value; 1112 } else { 1113 ProtocolUtil.skip(protocol, field.typeId); 1114 } 1115 } 1116 break; 1117 case 1: { 1118 if (field.typeId == TType.STRUCT) { 1119 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 1120 ex1 = value; 1121 } else { 1122 ProtocolUtil.skip(protocol, field.typeId); 1123 } 1124 } 1125 break; 1126 default: ProtocolUtil.skip(protocol, field.typeId); break; 1127 } 1128 protocol.readFieldEnd(); 1129 } 1130 protocol.readStructEnd(); 1131 if (result != null) { 1132 return result; 1133 } else if (ex1 != null) { 1134 throw ex1; 1135 } else { 1136 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 1137 } 1138 } 1139 } 1140 1141 private static final class DeleteFeaturesCall extends MethodCall<Integer> { 1142 private final List<String> featureIdList; 1143 1144 private final Boolean cascade; 1145 1146 DeleteFeaturesCall(List<String> featureIdList, Boolean cascade, 1147 ServiceMethodCallback<Integer> callback) { 1148 super("deleteFeatures", TMessageType.CALL, callback); 1149 this.featureIdList = featureIdList; 1150 if (cascade == null) throw new NullPointerException("cascade"); 1151 this.cascade = cascade; 1152 } 1153 1154 @Override 1155 protected void send(Protocol protocol) throws IOException { 1156 protocol.writeStructBegin("args"); 1157 if (this.featureIdList != null) { 1158 protocol.writeFieldBegin("featureIdList", 1, TType.LIST); 1159 protocol.writeListBegin(TType.STRING, this.featureIdList.size()); 1160 for (String item0 : this.featureIdList) { 1161 protocol.writeString(item0); 1162 } 1163 protocol.writeListEnd(); 1164 protocol.writeFieldEnd(); 1165 } 1166 protocol.writeFieldBegin("cascade", 2, TType.BOOL); 1167 protocol.writeBool(this.cascade); 1168 protocol.writeFieldEnd(); 1169 protocol.writeFieldStop(); 1170 protocol.writeStructEnd(); 1171 } 1172 1173 @Override 1174 protected Integer receive(Protocol protocol, MessageMetadata metadata) throws Exception { 1175 Integer result = null; 1176 ServiceRuntimeException ex1 = null; 1177 protocol.readStructBegin(); 1178 while (true) { 1179 FieldMetadata field = protocol.readFieldBegin(); 1180 if (field.typeId == TType.STOP) { 1181 break; 1182 } 1183 switch (field.fieldId) { 1184 case 0: { 1185 if (field.typeId == TType.I32) { 1186 int value = protocol.readI32(); 1187 result = value; 1188 } else { 1189 ProtocolUtil.skip(protocol, field.typeId); 1190 } 1191 } 1192 break; 1193 case 1: { 1194 if (field.typeId == TType.STRUCT) { 1195 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 1196 ex1 = value; 1197 } else { 1198 ProtocolUtil.skip(protocol, field.typeId); 1199 } 1200 } 1201 break; 1202 default: ProtocolUtil.skip(protocol, field.typeId); break; 1203 } 1204 protocol.readFieldEnd(); 1205 } 1206 protocol.readStructEnd(); 1207 if (result != null) { 1208 return result; 1209 } else if (ex1 != null) { 1210 throw ex1; 1211 } else { 1212 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 1213 } 1214 } 1215 } 1216 1217 private static final class DeleteImageCall extends MethodCall<Boolean> { 1218 private final String imgMd5; 1219 1220 private final Boolean cascade; 1221 1222 DeleteImageCall(String imgMd5, Boolean cascade, ServiceMethodCallback<Boolean> callback) { 1223 super("deleteImage", TMessageType.CALL, callback); 1224 this.imgMd5 = imgMd5; 1225 if (cascade == null) throw new NullPointerException("cascade"); 1226 this.cascade = cascade; 1227 } 1228 1229 @Override 1230 protected void send(Protocol protocol) throws IOException { 1231 protocol.writeStructBegin("args"); 1232 if (this.imgMd5 != null) { 1233 protocol.writeFieldBegin("imgMd5", 1, TType.STRING); 1234 protocol.writeString(this.imgMd5); 1235 protocol.writeFieldEnd(); 1236 } 1237 protocol.writeFieldBegin("cascade", 2, TType.BOOL); 1238 protocol.writeBool(this.cascade); 1239 protocol.writeFieldEnd(); 1240 protocol.writeFieldStop(); 1241 protocol.writeStructEnd(); 1242 } 1243 1244 @Override 1245 protected Boolean receive(Protocol protocol, MessageMetadata metadata) throws Exception { 1246 Boolean result = null; 1247 ServiceRuntimeException ex1 = null; 1248 protocol.readStructBegin(); 1249 while (true) { 1250 FieldMetadata field = protocol.readFieldBegin(); 1251 if (field.typeId == TType.STOP) { 1252 break; 1253 } 1254 switch (field.fieldId) { 1255 case 0: { 1256 if (field.typeId == TType.BOOL) { 1257 boolean value = protocol.readBool(); 1258 result = value; 1259 } else { 1260 ProtocolUtil.skip(protocol, field.typeId); 1261 } 1262 } 1263 break; 1264 case 1: { 1265 if (field.typeId == TType.STRUCT) { 1266 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 1267 ex1 = value; 1268 } else { 1269 ProtocolUtil.skip(protocol, field.typeId); 1270 } 1271 } 1272 break; 1273 default: ProtocolUtil.skip(protocol, field.typeId); break; 1274 } 1275 protocol.readFieldEnd(); 1276 } 1277 protocol.readStructEnd(); 1278 if (result != null) { 1279 return result; 1280 } else if (ex1 != null) { 1281 throw ex1; 1282 } else { 1283 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 1284 } 1285 } 1286 } 1287 1288 private static final class DeleteImagesCall extends MethodCall<Integer> { 1289 private final List<String> imgMd5List; 1290 1291 private final Boolean cascade; 1292 1293 DeleteImagesCall(List<String> imgMd5List, Boolean cascade, 1294 ServiceMethodCallback<Integer> callback) { 1295 super("deleteImages", TMessageType.CALL, callback); 1296 this.imgMd5List = imgMd5List; 1297 if (cascade == null) throw new NullPointerException("cascade"); 1298 this.cascade = cascade; 1299 } 1300 1301 @Override 1302 protected void send(Protocol protocol) throws IOException { 1303 protocol.writeStructBegin("args"); 1304 if (this.imgMd5List != null) { 1305 protocol.writeFieldBegin("imgMd5List", 1, TType.LIST); 1306 protocol.writeListBegin(TType.STRING, this.imgMd5List.size()); 1307 for (String item0 : this.imgMd5List) { 1308 protocol.writeString(item0); 1309 } 1310 protocol.writeListEnd(); 1311 protocol.writeFieldEnd(); 1312 } 1313 protocol.writeFieldBegin("cascade", 2, TType.BOOL); 1314 protocol.writeBool(this.cascade); 1315 protocol.writeFieldEnd(); 1316 protocol.writeFieldStop(); 1317 protocol.writeStructEnd(); 1318 } 1319 1320 @Override 1321 protected Integer receive(Protocol protocol, MessageMetadata metadata) throws Exception { 1322 Integer result = null; 1323 ServiceRuntimeException ex1 = null; 1324 protocol.readStructBegin(); 1325 while (true) { 1326 FieldMetadata field = protocol.readFieldBegin(); 1327 if (field.typeId == TType.STOP) { 1328 break; 1329 } 1330 switch (field.fieldId) { 1331 case 0: { 1332 if (field.typeId == TType.I32) { 1333 int value = protocol.readI32(); 1334 result = value; 1335 } else { 1336 ProtocolUtil.skip(protocol, field.typeId); 1337 } 1338 } 1339 break; 1340 case 1: { 1341 if (field.typeId == TType.STRUCT) { 1342 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 1343 ex1 = value; 1344 } else { 1345 ProtocolUtil.skip(protocol, field.typeId); 1346 } 1347 } 1348 break; 1349 default: ProtocolUtil.skip(protocol, field.typeId); break; 1350 } 1351 protocol.readFieldEnd(); 1352 } 1353 protocol.readStructEnd(); 1354 if (result != null) { 1355 return result; 1356 } else if (ex1 != null) { 1357 throw ex1; 1358 } else { 1359 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 1360 } 1361 } 1362 } 1363 1364 private static final class DetectAndAddFeaturesCall extends MethodCall<ImageBean> { 1365 private final ByteString imgData; 1366 1367 private final Integer faceNum; 1368 1369 DetectAndAddFeaturesCall(ByteString imgData, Integer faceNum, 1370 ServiceMethodCallback<ImageBean> callback) { 1371 super("detectAndAddFeatures", TMessageType.CALL, callback); 1372 this.imgData = imgData; 1373 if (faceNum == null) throw new NullPointerException("faceNum"); 1374 this.faceNum = faceNum; 1375 } 1376 1377 @Override 1378 protected void send(Protocol protocol) throws IOException { 1379 protocol.writeStructBegin("args"); 1380 if (this.imgData != null) { 1381 protocol.writeFieldBegin("imgData", 1, TType.STRING); 1382 protocol.writeBinary(this.imgData); 1383 protocol.writeFieldEnd(); 1384 } 1385 protocol.writeFieldBegin("faceNum", 2, TType.I32); 1386 protocol.writeI32(this.faceNum); 1387 protocol.writeFieldEnd(); 1388 protocol.writeFieldStop(); 1389 protocol.writeStructEnd(); 1390 } 1391 1392 @Override 1393 protected ImageBean receive(Protocol protocol, MessageMetadata metadata) throws Exception { 1394 ImageBean result = null; 1395 DuplicateRecordException ex1 = null; 1396 ImageErrorException ex2 = null; 1397 NotFaceDetectedException ex3 = null; 1398 ServiceRuntimeException ex4 = null; 1399 protocol.readStructBegin(); 1400 while (true) { 1401 FieldMetadata field = protocol.readFieldBegin(); 1402 if (field.typeId == TType.STOP) { 1403 break; 1404 } 1405 switch (field.fieldId) { 1406 case 0: { 1407 if (field.typeId == TType.STRUCT) { 1408 net.gdface.facedb.thrift.client.ImageBean value = net.gdface.facedb.thrift.client.ImageBean.ADAPTER.read(protocol); 1409 result = value; 1410 } else { 1411 ProtocolUtil.skip(protocol, field.typeId); 1412 } 1413 } 1414 break; 1415 case 1: { 1416 if (field.typeId == TType.STRUCT) { 1417 net.gdface.facedb.thrift.client.DuplicateRecordException value = net.gdface.facedb.thrift.client.DuplicateRecordException.ADAPTER.read(protocol); 1418 ex1 = value; 1419 } else { 1420 ProtocolUtil.skip(protocol, field.typeId); 1421 } 1422 } 1423 break; 1424 case 2: { 1425 if (field.typeId == TType.STRUCT) { 1426 net.gdface.facedb.thrift.client.ImageErrorException value = net.gdface.facedb.thrift.client.ImageErrorException.ADAPTER.read(protocol); 1427 ex2 = value; 1428 } else { 1429 ProtocolUtil.skip(protocol, field.typeId); 1430 } 1431 } 1432 break; 1433 case 3: { 1434 if (field.typeId == TType.STRUCT) { 1435 net.gdface.facedb.thrift.client.NotFaceDetectedException value = net.gdface.facedb.thrift.client.NotFaceDetectedException.ADAPTER.read(protocol); 1436 ex3 = value; 1437 } else { 1438 ProtocolUtil.skip(protocol, field.typeId); 1439 } 1440 } 1441 break; 1442 case 4: { 1443 if (field.typeId == TType.STRUCT) { 1444 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 1445 ex4 = value; 1446 } else { 1447 ProtocolUtil.skip(protocol, field.typeId); 1448 } 1449 } 1450 break; 1451 default: ProtocolUtil.skip(protocol, field.typeId); break; 1452 } 1453 protocol.readFieldEnd(); 1454 } 1455 protocol.readStructEnd(); 1456 if (result != null) { 1457 return result; 1458 } else if (ex1 != null) { 1459 throw ex1; 1460 } else if (ex2 != null) { 1461 throw ex2; 1462 } else if (ex3 != null) { 1463 throw ex3; 1464 } else if (ex4 != null) { 1465 throw ex4; 1466 } else { 1467 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 1468 } 1469 } 1470 } 1471 1472 private static final class DetectAndCompareFacesCall extends MethodCall<CompareResult> { 1473 private final String featureId; 1474 1475 private final ByteString imgData; 1476 1477 private final Integer faceNum; 1478 1479 DetectAndCompareFacesCall(String featureId, ByteString imgData, Integer faceNum, 1480 ServiceMethodCallback<CompareResult> callback) { 1481 super("detectAndCompareFaces", TMessageType.CALL, callback); 1482 this.featureId = featureId; 1483 this.imgData = imgData; 1484 if (faceNum == null) throw new NullPointerException("faceNum"); 1485 this.faceNum = faceNum; 1486 } 1487 1488 @Override 1489 protected void send(Protocol protocol) throws IOException { 1490 protocol.writeStructBegin("args"); 1491 if (this.featureId != null) { 1492 protocol.writeFieldBegin("featureId", 1, TType.STRING); 1493 protocol.writeString(this.featureId); 1494 protocol.writeFieldEnd(); 1495 } 1496 if (this.imgData != null) { 1497 protocol.writeFieldBegin("imgData", 2, TType.STRING); 1498 protocol.writeBinary(this.imgData); 1499 protocol.writeFieldEnd(); 1500 } 1501 protocol.writeFieldBegin("faceNum", 3, TType.I32); 1502 protocol.writeI32(this.faceNum); 1503 protocol.writeFieldEnd(); 1504 protocol.writeFieldStop(); 1505 protocol.writeStructEnd(); 1506 } 1507 1508 @Override 1509 protected CompareResult receive(Protocol protocol, MessageMetadata metadata) throws Exception { 1510 CompareResult result = null; 1511 NotFoundBeanException ex1 = null; 1512 ImageErrorException ex2 = null; 1513 NotFaceDetectedException ex3 = null; 1514 ServiceRuntimeException ex4 = null; 1515 protocol.readStructBegin(); 1516 while (true) { 1517 FieldMetadata field = protocol.readFieldBegin(); 1518 if (field.typeId == TType.STOP) { 1519 break; 1520 } 1521 switch (field.fieldId) { 1522 case 0: { 1523 if (field.typeId == TType.STRUCT) { 1524 net.gdface.facedb.thrift.client.CompareResult value = net.gdface.facedb.thrift.client.CompareResult.ADAPTER.read(protocol); 1525 result = value; 1526 } else { 1527 ProtocolUtil.skip(protocol, field.typeId); 1528 } 1529 } 1530 break; 1531 case 1: { 1532 if (field.typeId == TType.STRUCT) { 1533 net.gdface.facedb.thrift.client.NotFoundBeanException value = net.gdface.facedb.thrift.client.NotFoundBeanException.ADAPTER.read(protocol); 1534 ex1 = value; 1535 } else { 1536 ProtocolUtil.skip(protocol, field.typeId); 1537 } 1538 } 1539 break; 1540 case 2: { 1541 if (field.typeId == TType.STRUCT) { 1542 net.gdface.facedb.thrift.client.ImageErrorException value = net.gdface.facedb.thrift.client.ImageErrorException.ADAPTER.read(protocol); 1543 ex2 = value; 1544 } else { 1545 ProtocolUtil.skip(protocol, field.typeId); 1546 } 1547 } 1548 break; 1549 case 3: { 1550 if (field.typeId == TType.STRUCT) { 1551 net.gdface.facedb.thrift.client.NotFaceDetectedException value = net.gdface.facedb.thrift.client.NotFaceDetectedException.ADAPTER.read(protocol); 1552 ex3 = value; 1553 } else { 1554 ProtocolUtil.skip(protocol, field.typeId); 1555 } 1556 } 1557 break; 1558 case 4: { 1559 if (field.typeId == TType.STRUCT) { 1560 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 1561 ex4 = value; 1562 } else { 1563 ProtocolUtil.skip(protocol, field.typeId); 1564 } 1565 } 1566 break; 1567 default: ProtocolUtil.skip(protocol, field.typeId); break; 1568 } 1569 protocol.readFieldEnd(); 1570 } 1571 protocol.readStructEnd(); 1572 if (result != null) { 1573 return result; 1574 } else if (ex1 != null) { 1575 throw ex1; 1576 } else if (ex2 != null) { 1577 throw ex2; 1578 } else if (ex3 != null) { 1579 throw ex3; 1580 } else if (ex4 != null) { 1581 throw ex4; 1582 } else { 1583 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 1584 } 1585 } 1586 } 1587 1588 private static final class DetectAndGetCodeInfoCall extends MethodCall<List<CodeInfo>> { 1589 private final ByteString imgData; 1590 1591 DetectAndGetCodeInfoCall(ByteString imgData, ServiceMethodCallback<List<CodeInfo>> callback) { 1592 super("detectAndGetCodeInfo", TMessageType.CALL, callback); 1593 this.imgData = imgData; 1594 } 1595 1596 @Override 1597 protected void send(Protocol protocol) throws IOException { 1598 protocol.writeStructBegin("args"); 1599 if (this.imgData != null) { 1600 protocol.writeFieldBegin("imgData", 1, TType.STRING); 1601 protocol.writeBinary(this.imgData); 1602 protocol.writeFieldEnd(); 1603 } 1604 protocol.writeFieldStop(); 1605 protocol.writeStructEnd(); 1606 } 1607 1608 @Override 1609 protected List<CodeInfo> receive(Protocol protocol, MessageMetadata metadata) throws Exception { 1610 List<CodeInfo> result = null; 1611 ImageErrorException ex1 = null; 1612 ServiceRuntimeException ex2 = null; 1613 protocol.readStructBegin(); 1614 while (true) { 1615 FieldMetadata field = protocol.readFieldBegin(); 1616 if (field.typeId == TType.STOP) { 1617 break; 1618 } 1619 switch (field.fieldId) { 1620 case 0: { 1621 if (field.typeId == TType.LIST) { 1622 ListMetadata listMetadata0 = protocol.readListBegin(); 1623 List<CodeInfo> value = new ArrayList<CodeInfo>(listMetadata0.size); 1624 for (int i0 = 0; i0 < listMetadata0.size; ++i0) { 1625 net.gdface.facedb.thrift.client.CodeInfo item0 = net.gdface.facedb.thrift.client.CodeInfo.ADAPTER.read(protocol); 1626 value.add(item0); 1627 } 1628 protocol.readListEnd(); 1629 result = value; 1630 } else { 1631 ProtocolUtil.skip(protocol, field.typeId); 1632 } 1633 } 1634 break; 1635 case 1: { 1636 if (field.typeId == TType.STRUCT) { 1637 net.gdface.facedb.thrift.client.ImageErrorException value = net.gdface.facedb.thrift.client.ImageErrorException.ADAPTER.read(protocol); 1638 ex1 = value; 1639 } else { 1640 ProtocolUtil.skip(protocol, field.typeId); 1641 } 1642 } 1643 break; 1644 case 2: { 1645 if (field.typeId == TType.STRUCT) { 1646 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 1647 ex2 = value; 1648 } else { 1649 ProtocolUtil.skip(protocol, field.typeId); 1650 } 1651 } 1652 break; 1653 default: ProtocolUtil.skip(protocol, field.typeId); break; 1654 } 1655 protocol.readFieldEnd(); 1656 } 1657 protocol.readStructEnd(); 1658 if (result != null) { 1659 return result; 1660 } else if (ex1 != null) { 1661 throw ex1; 1662 } else if (ex2 != null) { 1663 throw ex2; 1664 } else { 1665 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 1666 } 1667 } 1668 } 1669 1670 private static final class DetectAndGetCodeInfoMatCall extends MethodCall<List<CodeInfo>> { 1671 private final MatType matType; 1672 1673 private final ByteString matData; 1674 1675 private final Integer width; 1676 1677 private final Integer height; 1678 1679 DetectAndGetCodeInfoMatCall(MatType matType, ByteString matData, Integer width, Integer height, 1680 ServiceMethodCallback<List<CodeInfo>> callback) { 1681 super("detectAndGetCodeInfoMat", TMessageType.CALL, callback); 1682 this.matType = matType; 1683 this.matData = matData; 1684 if (width == null) throw new NullPointerException("width"); 1685 this.width = width; 1686 if (height == null) throw new NullPointerException("height"); 1687 this.height = height; 1688 } 1689 1690 @Override 1691 protected void send(Protocol protocol) throws IOException { 1692 protocol.writeStructBegin("args"); 1693 if (this.matType != null) { 1694 protocol.writeFieldBegin("matType", 1, TType.I32); 1695 protocol.writeI32(this.matType.value); 1696 protocol.writeFieldEnd(); 1697 } 1698 if (this.matData != null) { 1699 protocol.writeFieldBegin("matData", 2, TType.STRING); 1700 protocol.writeBinary(this.matData); 1701 protocol.writeFieldEnd(); 1702 } 1703 protocol.writeFieldBegin("width", 3, TType.I32); 1704 protocol.writeI32(this.width); 1705 protocol.writeFieldEnd(); 1706 protocol.writeFieldBegin("height", 4, TType.I32); 1707 protocol.writeI32(this.height); 1708 protocol.writeFieldEnd(); 1709 protocol.writeFieldStop(); 1710 protocol.writeStructEnd(); 1711 } 1712 1713 @Override 1714 protected List<CodeInfo> receive(Protocol protocol, MessageMetadata metadata) throws Exception { 1715 List<CodeInfo> result = null; 1716 ImageErrorException ex1 = null; 1717 ServiceRuntimeException ex2 = null; 1718 protocol.readStructBegin(); 1719 while (true) { 1720 FieldMetadata field = protocol.readFieldBegin(); 1721 if (field.typeId == TType.STOP) { 1722 break; 1723 } 1724 switch (field.fieldId) { 1725 case 0: { 1726 if (field.typeId == TType.LIST) { 1727 ListMetadata listMetadata0 = protocol.readListBegin(); 1728 List<CodeInfo> value = new ArrayList<CodeInfo>(listMetadata0.size); 1729 for (int i0 = 0; i0 < listMetadata0.size; ++i0) { 1730 net.gdface.facedb.thrift.client.CodeInfo item0 = net.gdface.facedb.thrift.client.CodeInfo.ADAPTER.read(protocol); 1731 value.add(item0); 1732 } 1733 protocol.readListEnd(); 1734 result = value; 1735 } else { 1736 ProtocolUtil.skip(protocol, field.typeId); 1737 } 1738 } 1739 break; 1740 case 1: { 1741 if (field.typeId == TType.STRUCT) { 1742 net.gdface.facedb.thrift.client.ImageErrorException value = net.gdface.facedb.thrift.client.ImageErrorException.ADAPTER.read(protocol); 1743 ex1 = value; 1744 } else { 1745 ProtocolUtil.skip(protocol, field.typeId); 1746 } 1747 } 1748 break; 1749 case 2: { 1750 if (field.typeId == TType.STRUCT) { 1751 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 1752 ex2 = value; 1753 } else { 1754 ProtocolUtil.skip(protocol, field.typeId); 1755 } 1756 } 1757 break; 1758 default: ProtocolUtil.skip(protocol, field.typeId); break; 1759 } 1760 protocol.readFieldEnd(); 1761 } 1762 protocol.readStructEnd(); 1763 if (result != null) { 1764 return result; 1765 } else if (ex1 != null) { 1766 throw ex1; 1767 } else if (ex2 != null) { 1768 throw ex2; 1769 } else { 1770 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 1771 } 1772 } 1773 } 1774 1775 private static final class DetectAndSearchFacesCall extends MethodCall<List<SearchResult>> { 1776 private final ByteString imgData; 1777 1778 private final Double similarty; 1779 1780 private final Integer rows; 1781 1782 private final String where; 1783 1784 DetectAndSearchFacesCall(ByteString imgData, Double similarty, Integer rows, String where, 1785 ServiceMethodCallback<List<SearchResult>> callback) { 1786 super("detectAndSearchFaces", TMessageType.CALL, callback); 1787 this.imgData = imgData; 1788 if (similarty == null) throw new NullPointerException("similarty"); 1789 this.similarty = similarty; 1790 if (rows == null) throw new NullPointerException("rows"); 1791 this.rows = rows; 1792 this.where = where; 1793 } 1794 1795 @Override 1796 protected void send(Protocol protocol) throws IOException { 1797 protocol.writeStructBegin("args"); 1798 if (this.imgData != null) { 1799 protocol.writeFieldBegin("imgData", 1, TType.STRING); 1800 protocol.writeBinary(this.imgData); 1801 protocol.writeFieldEnd(); 1802 } 1803 protocol.writeFieldBegin("similarty", 2, TType.DOUBLE); 1804 protocol.writeDouble(this.similarty); 1805 protocol.writeFieldEnd(); 1806 protocol.writeFieldBegin("rows", 3, TType.I32); 1807 protocol.writeI32(this.rows); 1808 protocol.writeFieldEnd(); 1809 if (this.where != null) { 1810 protocol.writeFieldBegin("where", 4, TType.STRING); 1811 protocol.writeString(this.where); 1812 protocol.writeFieldEnd(); 1813 } 1814 protocol.writeFieldStop(); 1815 protocol.writeStructEnd(); 1816 } 1817 1818 @Override 1819 protected List<SearchResult> receive(Protocol protocol, MessageMetadata metadata) throws 1820 Exception { 1821 List<SearchResult> result = null; 1822 ImageErrorException ex1 = null; 1823 NotFaceDetectedException ex2 = null; 1824 ServiceRuntimeException ex3 = null; 1825 protocol.readStructBegin(); 1826 while (true) { 1827 FieldMetadata field = protocol.readFieldBegin(); 1828 if (field.typeId == TType.STOP) { 1829 break; 1830 } 1831 switch (field.fieldId) { 1832 case 0: { 1833 if (field.typeId == TType.LIST) { 1834 ListMetadata listMetadata0 = protocol.readListBegin(); 1835 List<SearchResult> value = new ArrayList<SearchResult>(listMetadata0.size); 1836 for (int i0 = 0; i0 < listMetadata0.size; ++i0) { 1837 net.gdface.facedb.thrift.client.SearchResult item0 = net.gdface.facedb.thrift.client.SearchResult.ADAPTER.read(protocol); 1838 value.add(item0); 1839 } 1840 protocol.readListEnd(); 1841 result = value; 1842 } else { 1843 ProtocolUtil.skip(protocol, field.typeId); 1844 } 1845 } 1846 break; 1847 case 1: { 1848 if (field.typeId == TType.STRUCT) { 1849 net.gdface.facedb.thrift.client.ImageErrorException value = net.gdface.facedb.thrift.client.ImageErrorException.ADAPTER.read(protocol); 1850 ex1 = value; 1851 } else { 1852 ProtocolUtil.skip(protocol, field.typeId); 1853 } 1854 } 1855 break; 1856 case 2: { 1857 if (field.typeId == TType.STRUCT) { 1858 net.gdface.facedb.thrift.client.NotFaceDetectedException value = net.gdface.facedb.thrift.client.NotFaceDetectedException.ADAPTER.read(protocol); 1859 ex2 = value; 1860 } else { 1861 ProtocolUtil.skip(protocol, field.typeId); 1862 } 1863 } 1864 break; 1865 case 3: { 1866 if (field.typeId == TType.STRUCT) { 1867 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 1868 ex3 = value; 1869 } else { 1870 ProtocolUtil.skip(protocol, field.typeId); 1871 } 1872 } 1873 break; 1874 default: ProtocolUtil.skip(protocol, field.typeId); break; 1875 } 1876 protocol.readFieldEnd(); 1877 } 1878 protocol.readStructEnd(); 1879 if (result != null) { 1880 return result; 1881 } else if (ex1 != null) { 1882 throw ex1; 1883 } else if (ex2 != null) { 1884 throw ex2; 1885 } else if (ex3 != null) { 1886 throw ex3; 1887 } else { 1888 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 1889 } 1890 } 1891 } 1892 1893 private static final class GetCodeInfoCall extends MethodCall<CodeInfo> { 1894 private final Integer faceId; 1895 1896 GetCodeInfoCall(Integer faceId, ServiceMethodCallback<CodeInfo> callback) { 1897 super("getCodeInfo", TMessageType.CALL, callback); 1898 if (faceId == null) throw new NullPointerException("faceId"); 1899 this.faceId = faceId; 1900 } 1901 1902 @Override 1903 protected void send(Protocol protocol) throws IOException { 1904 protocol.writeStructBegin("args"); 1905 protocol.writeFieldBegin("faceId", 1, TType.I32); 1906 protocol.writeI32(this.faceId); 1907 protocol.writeFieldEnd(); 1908 protocol.writeFieldStop(); 1909 protocol.writeStructEnd(); 1910 } 1911 1912 @Override 1913 protected CodeInfo receive(Protocol protocol, MessageMetadata metadata) throws Exception { 1914 CodeInfo result = null; 1915 ServiceRuntimeException ex1 = null; 1916 protocol.readStructBegin(); 1917 while (true) { 1918 FieldMetadata field = protocol.readFieldBegin(); 1919 if (field.typeId == TType.STOP) { 1920 break; 1921 } 1922 switch (field.fieldId) { 1923 case 0: { 1924 if (field.typeId == TType.STRUCT) { 1925 net.gdface.facedb.thrift.client.CodeInfo value = net.gdface.facedb.thrift.client.CodeInfo.ADAPTER.read(protocol); 1926 result = value; 1927 } else { 1928 ProtocolUtil.skip(protocol, field.typeId); 1929 } 1930 } 1931 break; 1932 case 1: { 1933 if (field.typeId == TType.STRUCT) { 1934 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 1935 ex1 = value; 1936 } else { 1937 ProtocolUtil.skip(protocol, field.typeId); 1938 } 1939 } 1940 break; 1941 default: ProtocolUtil.skip(protocol, field.typeId); break; 1942 } 1943 protocol.readFieldEnd(); 1944 } 1945 protocol.readStructEnd(); 1946 if (result != null) { 1947 return result; 1948 } else if (ex1 != null) { 1949 throw ex1; 1950 } else { 1951 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 1952 } 1953 } 1954 } 1955 1956 private static final class GetCodeInfoByFeatureIdCall extends MethodCall<CodeInfo> { 1957 private final String featureId; 1958 1959 GetCodeInfoByFeatureIdCall(String featureId, ServiceMethodCallback<CodeInfo> callback) { 1960 super("getCodeInfoByFeatureId", TMessageType.CALL, callback); 1961 this.featureId = featureId; 1962 } 1963 1964 @Override 1965 protected void send(Protocol protocol) throws IOException { 1966 protocol.writeStructBegin("args"); 1967 if (this.featureId != null) { 1968 protocol.writeFieldBegin("featureId", 1, TType.STRING); 1969 protocol.writeString(this.featureId); 1970 protocol.writeFieldEnd(); 1971 } 1972 protocol.writeFieldStop(); 1973 protocol.writeStructEnd(); 1974 } 1975 1976 @Override 1977 protected CodeInfo receive(Protocol protocol, MessageMetadata metadata) throws Exception { 1978 CodeInfo result = null; 1979 ServiceRuntimeException ex1 = null; 1980 protocol.readStructBegin(); 1981 while (true) { 1982 FieldMetadata field = protocol.readFieldBegin(); 1983 if (field.typeId == TType.STOP) { 1984 break; 1985 } 1986 switch (field.fieldId) { 1987 case 0: { 1988 if (field.typeId == TType.STRUCT) { 1989 net.gdface.facedb.thrift.client.CodeInfo value = net.gdface.facedb.thrift.client.CodeInfo.ADAPTER.read(protocol); 1990 result = value; 1991 } else { 1992 ProtocolUtil.skip(protocol, field.typeId); 1993 } 1994 } 1995 break; 1996 case 1: { 1997 if (field.typeId == TType.STRUCT) { 1998 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 1999 ex1 = value; 2000 } else { 2001 ProtocolUtil.skip(protocol, field.typeId); 2002 } 2003 } 2004 break; 2005 default: ProtocolUtil.skip(protocol, field.typeId); break; 2006 } 2007 protocol.readFieldEnd(); 2008 } 2009 protocol.readStructEnd(); 2010 if (result != null) { 2011 return result; 2012 } else if (ex1 != null) { 2013 throw ex1; 2014 } else { 2015 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 2016 } 2017 } 2018 } 2019 2020 private static final class GetCodeInfoByImageMd5Call extends MethodCall<CodeInfo> { 2021 private final String imageMd5; 2022 2023 GetCodeInfoByImageMd5Call(String imageMd5, ServiceMethodCallback<CodeInfo> callback) { 2024 super("getCodeInfoByImageMd5", TMessageType.CALL, callback); 2025 this.imageMd5 = imageMd5; 2026 } 2027 2028 @Override 2029 protected void send(Protocol protocol) throws IOException { 2030 protocol.writeStructBegin("args"); 2031 if (this.imageMd5 != null) { 2032 protocol.writeFieldBegin("imageMd5", 1, TType.STRING); 2033 protocol.writeString(this.imageMd5); 2034 protocol.writeFieldEnd(); 2035 } 2036 protocol.writeFieldStop(); 2037 protocol.writeStructEnd(); 2038 } 2039 2040 @Override 2041 protected CodeInfo receive(Protocol protocol, MessageMetadata metadata) throws Exception { 2042 CodeInfo result = null; 2043 ServiceRuntimeException ex1 = null; 2044 protocol.readStructBegin(); 2045 while (true) { 2046 FieldMetadata field = protocol.readFieldBegin(); 2047 if (field.typeId == TType.STOP) { 2048 break; 2049 } 2050 switch (field.fieldId) { 2051 case 0: { 2052 if (field.typeId == TType.STRUCT) { 2053 net.gdface.facedb.thrift.client.CodeInfo value = net.gdface.facedb.thrift.client.CodeInfo.ADAPTER.read(protocol); 2054 result = value; 2055 } else { 2056 ProtocolUtil.skip(protocol, field.typeId); 2057 } 2058 } 2059 break; 2060 case 1: { 2061 if (field.typeId == TType.STRUCT) { 2062 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 2063 ex1 = value; 2064 } else { 2065 ProtocolUtil.skip(protocol, field.typeId); 2066 } 2067 } 2068 break; 2069 default: ProtocolUtil.skip(protocol, field.typeId); break; 2070 } 2071 protocol.readFieldEnd(); 2072 } 2073 protocol.readStructEnd(); 2074 if (result != null) { 2075 return result; 2076 } else if (ex1 != null) { 2077 throw ex1; 2078 } else { 2079 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 2080 } 2081 } 2082 } 2083 2084 private static final class GetCodeInfosByFeatureIdCall extends MethodCall<List<CodeInfo>> { 2085 private final String featureId; 2086 2087 GetCodeInfosByFeatureIdCall(String featureId, ServiceMethodCallback<List<CodeInfo>> callback) { 2088 super("getCodeInfosByFeatureId", TMessageType.CALL, callback); 2089 this.featureId = featureId; 2090 } 2091 2092 @Override 2093 protected void send(Protocol protocol) throws IOException { 2094 protocol.writeStructBegin("args"); 2095 if (this.featureId != null) { 2096 protocol.writeFieldBegin("featureId", 1, TType.STRING); 2097 protocol.writeString(this.featureId); 2098 protocol.writeFieldEnd(); 2099 } 2100 protocol.writeFieldStop(); 2101 protocol.writeStructEnd(); 2102 } 2103 2104 @Override 2105 protected List<CodeInfo> receive(Protocol protocol, MessageMetadata metadata) throws Exception { 2106 List<CodeInfo> result = null; 2107 ServiceRuntimeException ex1 = null; 2108 protocol.readStructBegin(); 2109 while (true) { 2110 FieldMetadata field = protocol.readFieldBegin(); 2111 if (field.typeId == TType.STOP) { 2112 break; 2113 } 2114 switch (field.fieldId) { 2115 case 0: { 2116 if (field.typeId == TType.LIST) { 2117 ListMetadata listMetadata0 = protocol.readListBegin(); 2118 List<CodeInfo> value = new ArrayList<CodeInfo>(listMetadata0.size); 2119 for (int i0 = 0; i0 < listMetadata0.size; ++i0) { 2120 net.gdface.facedb.thrift.client.CodeInfo item0 = net.gdface.facedb.thrift.client.CodeInfo.ADAPTER.read(protocol); 2121 value.add(item0); 2122 } 2123 protocol.readListEnd(); 2124 result = value; 2125 } else { 2126 ProtocolUtil.skip(protocol, field.typeId); 2127 } 2128 } 2129 break; 2130 case 1: { 2131 if (field.typeId == TType.STRUCT) { 2132 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 2133 ex1 = value; 2134 } else { 2135 ProtocolUtil.skip(protocol, field.typeId); 2136 } 2137 } 2138 break; 2139 default: ProtocolUtil.skip(protocol, field.typeId); break; 2140 } 2141 protocol.readFieldEnd(); 2142 } 2143 protocol.readStructEnd(); 2144 if (result != null) { 2145 return result; 2146 } else if (ex1 != null) { 2147 throw ex1; 2148 } else { 2149 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 2150 } 2151 } 2152 } 2153 2154 private static final class GetCodeInfosByImageMd5Call extends MethodCall<List<CodeInfo>> { 2155 private final String imageMd5; 2156 2157 GetCodeInfosByImageMd5Call(String imageMd5, ServiceMethodCallback<List<CodeInfo>> callback) { 2158 super("getCodeInfosByImageMd5", TMessageType.CALL, callback); 2159 this.imageMd5 = imageMd5; 2160 } 2161 2162 @Override 2163 protected void send(Protocol protocol) throws IOException { 2164 protocol.writeStructBegin("args"); 2165 if (this.imageMd5 != null) { 2166 protocol.writeFieldBegin("imageMd5", 1, TType.STRING); 2167 protocol.writeString(this.imageMd5); 2168 protocol.writeFieldEnd(); 2169 } 2170 protocol.writeFieldStop(); 2171 protocol.writeStructEnd(); 2172 } 2173 2174 @Override 2175 protected List<CodeInfo> receive(Protocol protocol, MessageMetadata metadata) throws Exception { 2176 List<CodeInfo> result = null; 2177 ServiceRuntimeException ex1 = null; 2178 protocol.readStructBegin(); 2179 while (true) { 2180 FieldMetadata field = protocol.readFieldBegin(); 2181 if (field.typeId == TType.STOP) { 2182 break; 2183 } 2184 switch (field.fieldId) { 2185 case 0: { 2186 if (field.typeId == TType.LIST) { 2187 ListMetadata listMetadata0 = protocol.readListBegin(); 2188 List<CodeInfo> value = new ArrayList<CodeInfo>(listMetadata0.size); 2189 for (int i0 = 0; i0 < listMetadata0.size; ++i0) { 2190 net.gdface.facedb.thrift.client.CodeInfo item0 = net.gdface.facedb.thrift.client.CodeInfo.ADAPTER.read(protocol); 2191 value.add(item0); 2192 } 2193 protocol.readListEnd(); 2194 result = value; 2195 } else { 2196 ProtocolUtil.skip(protocol, field.typeId); 2197 } 2198 } 2199 break; 2200 case 1: { 2201 if (field.typeId == TType.STRUCT) { 2202 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 2203 ex1 = value; 2204 } else { 2205 ProtocolUtil.skip(protocol, field.typeId); 2206 } 2207 } 2208 break; 2209 default: ProtocolUtil.skip(protocol, field.typeId); break; 2210 } 2211 protocol.readFieldEnd(); 2212 } 2213 protocol.readStructEnd(); 2214 if (result != null) { 2215 return result; 2216 } else if (ex1 != null) { 2217 throw ex1; 2218 } else { 2219 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 2220 } 2221 } 2222 } 2223 2224 private static final class GetFaceCall extends MethodCall<FaceBean> { 2225 private final Integer faceId; 2226 2227 GetFaceCall(Integer faceId, ServiceMethodCallback<FaceBean> callback) { 2228 super("getFace", TMessageType.CALL, callback); 2229 if (faceId == null) throw new NullPointerException("faceId"); 2230 this.faceId = faceId; 2231 } 2232 2233 @Override 2234 protected void send(Protocol protocol) throws IOException { 2235 protocol.writeStructBegin("args"); 2236 protocol.writeFieldBegin("faceId", 1, TType.I32); 2237 protocol.writeI32(this.faceId); 2238 protocol.writeFieldEnd(); 2239 protocol.writeFieldStop(); 2240 protocol.writeStructEnd(); 2241 } 2242 2243 @Override 2244 protected FaceBean receive(Protocol protocol, MessageMetadata metadata) throws Exception { 2245 FaceBean result = null; 2246 ServiceRuntimeException ex1 = null; 2247 protocol.readStructBegin(); 2248 while (true) { 2249 FieldMetadata field = protocol.readFieldBegin(); 2250 if (field.typeId == TType.STOP) { 2251 break; 2252 } 2253 switch (field.fieldId) { 2254 case 0: { 2255 if (field.typeId == TType.STRUCT) { 2256 net.gdface.facedb.thrift.client.FaceBean value = net.gdface.facedb.thrift.client.FaceBean.ADAPTER.read(protocol); 2257 result = value; 2258 } else { 2259 ProtocolUtil.skip(protocol, field.typeId); 2260 } 2261 } 2262 break; 2263 case 1: { 2264 if (field.typeId == TType.STRUCT) { 2265 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 2266 ex1 = value; 2267 } else { 2268 ProtocolUtil.skip(protocol, field.typeId); 2269 } 2270 } 2271 break; 2272 default: ProtocolUtil.skip(protocol, field.typeId); break; 2273 } 2274 protocol.readFieldEnd(); 2275 } 2276 protocol.readStructEnd(); 2277 if (result != null) { 2278 return result; 2279 } else if (ex1 != null) { 2280 throw ex1; 2281 } else { 2282 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 2283 } 2284 } 2285 } 2286 2287 private static final class GetFaceByFeatureIdCall extends MethodCall<FaceBean> { 2288 private final String featureId; 2289 2290 GetFaceByFeatureIdCall(String featureId, ServiceMethodCallback<FaceBean> callback) { 2291 super("getFaceByFeatureId", TMessageType.CALL, callback); 2292 this.featureId = featureId; 2293 } 2294 2295 @Override 2296 protected void send(Protocol protocol) throws IOException { 2297 protocol.writeStructBegin("args"); 2298 if (this.featureId != null) { 2299 protocol.writeFieldBegin("featureId", 1, TType.STRING); 2300 protocol.writeString(this.featureId); 2301 protocol.writeFieldEnd(); 2302 } 2303 protocol.writeFieldStop(); 2304 protocol.writeStructEnd(); 2305 } 2306 2307 @Override 2308 protected FaceBean receive(Protocol protocol, MessageMetadata metadata) throws Exception { 2309 FaceBean result = null; 2310 ServiceRuntimeException ex1 = null; 2311 protocol.readStructBegin(); 2312 while (true) { 2313 FieldMetadata field = protocol.readFieldBegin(); 2314 if (field.typeId == TType.STOP) { 2315 break; 2316 } 2317 switch (field.fieldId) { 2318 case 0: { 2319 if (field.typeId == TType.STRUCT) { 2320 net.gdface.facedb.thrift.client.FaceBean value = net.gdface.facedb.thrift.client.FaceBean.ADAPTER.read(protocol); 2321 result = value; 2322 } else { 2323 ProtocolUtil.skip(protocol, field.typeId); 2324 } 2325 } 2326 break; 2327 case 1: { 2328 if (field.typeId == TType.STRUCT) { 2329 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 2330 ex1 = value; 2331 } else { 2332 ProtocolUtil.skip(protocol, field.typeId); 2333 } 2334 } 2335 break; 2336 default: ProtocolUtil.skip(protocol, field.typeId); break; 2337 } 2338 protocol.readFieldEnd(); 2339 } 2340 protocol.readStructEnd(); 2341 if (result != null) { 2342 return result; 2343 } else if (ex1 != null) { 2344 throw ex1; 2345 } else { 2346 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 2347 } 2348 } 2349 } 2350 2351 private static final class GetFaceByImageMd5Call extends MethodCall<FaceBean> { 2352 private final String imageMd5; 2353 2354 GetFaceByImageMd5Call(String imageMd5, ServiceMethodCallback<FaceBean> callback) { 2355 super("getFaceByImageMd5", TMessageType.CALL, callback); 2356 this.imageMd5 = imageMd5; 2357 } 2358 2359 @Override 2360 protected void send(Protocol protocol) throws IOException { 2361 protocol.writeStructBegin("args"); 2362 if (this.imageMd5 != null) { 2363 protocol.writeFieldBegin("imageMd5", 1, TType.STRING); 2364 protocol.writeString(this.imageMd5); 2365 protocol.writeFieldEnd(); 2366 } 2367 protocol.writeFieldStop(); 2368 protocol.writeStructEnd(); 2369 } 2370 2371 @Override 2372 protected FaceBean receive(Protocol protocol, MessageMetadata metadata) throws Exception { 2373 FaceBean result = null; 2374 ServiceRuntimeException ex1 = null; 2375 protocol.readStructBegin(); 2376 while (true) { 2377 FieldMetadata field = protocol.readFieldBegin(); 2378 if (field.typeId == TType.STOP) { 2379 break; 2380 } 2381 switch (field.fieldId) { 2382 case 0: { 2383 if (field.typeId == TType.STRUCT) { 2384 net.gdface.facedb.thrift.client.FaceBean value = net.gdface.facedb.thrift.client.FaceBean.ADAPTER.read(protocol); 2385 result = value; 2386 } else { 2387 ProtocolUtil.skip(protocol, field.typeId); 2388 } 2389 } 2390 break; 2391 case 1: { 2392 if (field.typeId == TType.STRUCT) { 2393 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 2394 ex1 = value; 2395 } else { 2396 ProtocolUtil.skip(protocol, field.typeId); 2397 } 2398 } 2399 break; 2400 default: ProtocolUtil.skip(protocol, field.typeId); break; 2401 } 2402 protocol.readFieldEnd(); 2403 } 2404 protocol.readStructEnd(); 2405 if (result != null) { 2406 return result; 2407 } else if (ex1 != null) { 2408 throw ex1; 2409 } else { 2410 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 2411 } 2412 } 2413 } 2414 2415 private static final class GetFaceCountCall extends MethodCall<Integer> { 2416 private final String where; 2417 2418 GetFaceCountCall(String where, ServiceMethodCallback<Integer> callback) { 2419 super("getFaceCount", TMessageType.CALL, callback); 2420 this.where = where; 2421 } 2422 2423 @Override 2424 protected void send(Protocol protocol) throws IOException { 2425 protocol.writeStructBegin("args"); 2426 if (this.where != null) { 2427 protocol.writeFieldBegin("where", 1, TType.STRING); 2428 protocol.writeString(this.where); 2429 protocol.writeFieldEnd(); 2430 } 2431 protocol.writeFieldStop(); 2432 protocol.writeStructEnd(); 2433 } 2434 2435 @Override 2436 protected Integer receive(Protocol protocol, MessageMetadata metadata) throws Exception { 2437 Integer result = null; 2438 ServiceRuntimeException ex1 = null; 2439 protocol.readStructBegin(); 2440 while (true) { 2441 FieldMetadata field = protocol.readFieldBegin(); 2442 if (field.typeId == TType.STOP) { 2443 break; 2444 } 2445 switch (field.fieldId) { 2446 case 0: { 2447 if (field.typeId == TType.I32) { 2448 int value = protocol.readI32(); 2449 result = value; 2450 } else { 2451 ProtocolUtil.skip(protocol, field.typeId); 2452 } 2453 } 2454 break; 2455 case 1: { 2456 if (field.typeId == TType.STRUCT) { 2457 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 2458 ex1 = value; 2459 } else { 2460 ProtocolUtil.skip(protocol, field.typeId); 2461 } 2462 } 2463 break; 2464 default: ProtocolUtil.skip(protocol, field.typeId); break; 2465 } 2466 protocol.readFieldEnd(); 2467 } 2468 protocol.readStructEnd(); 2469 if (result != null) { 2470 return result; 2471 } else if (ex1 != null) { 2472 throw ex1; 2473 } else { 2474 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 2475 } 2476 } 2477 } 2478 2479 private static final class GetFacesByFeatureIdCall extends MethodCall<List<FaceBean>> { 2480 private final String featureId; 2481 2482 GetFacesByFeatureIdCall(String featureId, ServiceMethodCallback<List<FaceBean>> callback) { 2483 super("getFacesByFeatureId", TMessageType.CALL, callback); 2484 this.featureId = featureId; 2485 } 2486 2487 @Override 2488 protected void send(Protocol protocol) throws IOException { 2489 protocol.writeStructBegin("args"); 2490 if (this.featureId != null) { 2491 protocol.writeFieldBegin("featureId", 1, TType.STRING); 2492 protocol.writeString(this.featureId); 2493 protocol.writeFieldEnd(); 2494 } 2495 protocol.writeFieldStop(); 2496 protocol.writeStructEnd(); 2497 } 2498 2499 @Override 2500 protected List<FaceBean> receive(Protocol protocol, MessageMetadata metadata) throws Exception { 2501 List<FaceBean> result = null; 2502 ServiceRuntimeException ex1 = null; 2503 protocol.readStructBegin(); 2504 while (true) { 2505 FieldMetadata field = protocol.readFieldBegin(); 2506 if (field.typeId == TType.STOP) { 2507 break; 2508 } 2509 switch (field.fieldId) { 2510 case 0: { 2511 if (field.typeId == TType.LIST) { 2512 ListMetadata listMetadata0 = protocol.readListBegin(); 2513 List<FaceBean> value = new ArrayList<FaceBean>(listMetadata0.size); 2514 for (int i0 = 0; i0 < listMetadata0.size; ++i0) { 2515 net.gdface.facedb.thrift.client.FaceBean item0 = net.gdface.facedb.thrift.client.FaceBean.ADAPTER.read(protocol); 2516 value.add(item0); 2517 } 2518 protocol.readListEnd(); 2519 result = value; 2520 } else { 2521 ProtocolUtil.skip(protocol, field.typeId); 2522 } 2523 } 2524 break; 2525 case 1: { 2526 if (field.typeId == TType.STRUCT) { 2527 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 2528 ex1 = value; 2529 } else { 2530 ProtocolUtil.skip(protocol, field.typeId); 2531 } 2532 } 2533 break; 2534 default: ProtocolUtil.skip(protocol, field.typeId); break; 2535 } 2536 protocol.readFieldEnd(); 2537 } 2538 protocol.readStructEnd(); 2539 if (result != null) { 2540 return result; 2541 } else if (ex1 != null) { 2542 throw ex1; 2543 } else { 2544 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 2545 } 2546 } 2547 } 2548 2549 private static final class GetFacesByImageMd5Call extends MethodCall<List<FaceBean>> { 2550 private final String imageMd5; 2551 2552 GetFacesByImageMd5Call(String imageMd5, ServiceMethodCallback<List<FaceBean>> callback) { 2553 super("getFacesByImageMd5", TMessageType.CALL, callback); 2554 this.imageMd5 = imageMd5; 2555 } 2556 2557 @Override 2558 protected void send(Protocol protocol) throws IOException { 2559 protocol.writeStructBegin("args"); 2560 if (this.imageMd5 != null) { 2561 protocol.writeFieldBegin("imageMd5", 1, TType.STRING); 2562 protocol.writeString(this.imageMd5); 2563 protocol.writeFieldEnd(); 2564 } 2565 protocol.writeFieldStop(); 2566 protocol.writeStructEnd(); 2567 } 2568 2569 @Override 2570 protected List<FaceBean> receive(Protocol protocol, MessageMetadata metadata) throws Exception { 2571 List<FaceBean> result = null; 2572 ServiceRuntimeException ex1 = null; 2573 protocol.readStructBegin(); 2574 while (true) { 2575 FieldMetadata field = protocol.readFieldBegin(); 2576 if (field.typeId == TType.STOP) { 2577 break; 2578 } 2579 switch (field.fieldId) { 2580 case 0: { 2581 if (field.typeId == TType.LIST) { 2582 ListMetadata listMetadata0 = protocol.readListBegin(); 2583 List<FaceBean> value = new ArrayList<FaceBean>(listMetadata0.size); 2584 for (int i0 = 0; i0 < listMetadata0.size; ++i0) { 2585 net.gdface.facedb.thrift.client.FaceBean item0 = net.gdface.facedb.thrift.client.FaceBean.ADAPTER.read(protocol); 2586 value.add(item0); 2587 } 2588 protocol.readListEnd(); 2589 result = value; 2590 } else { 2591 ProtocolUtil.skip(protocol, field.typeId); 2592 } 2593 } 2594 break; 2595 case 1: { 2596 if (field.typeId == TType.STRUCT) { 2597 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 2598 ex1 = value; 2599 } else { 2600 ProtocolUtil.skip(protocol, field.typeId); 2601 } 2602 } 2603 break; 2604 default: ProtocolUtil.skip(protocol, field.typeId); break; 2605 } 2606 protocol.readFieldEnd(); 2607 } 2608 protocol.readStructEnd(); 2609 if (result != null) { 2610 return result; 2611 } else if (ex1 != null) { 2612 throw ex1; 2613 } else { 2614 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 2615 } 2616 } 2617 } 2618 2619 private static final class GetFeatureCall extends MethodCall<FeatureBean> { 2620 private final String featureId; 2621 2622 GetFeatureCall(String featureId, ServiceMethodCallback<FeatureBean> callback) { 2623 super("getFeature", TMessageType.CALL, callback); 2624 this.featureId = featureId; 2625 } 2626 2627 @Override 2628 protected void send(Protocol protocol) throws IOException { 2629 protocol.writeStructBegin("args"); 2630 if (this.featureId != null) { 2631 protocol.writeFieldBegin("featureId", 1, TType.STRING); 2632 protocol.writeString(this.featureId); 2633 protocol.writeFieldEnd(); 2634 } 2635 protocol.writeFieldStop(); 2636 protocol.writeStructEnd(); 2637 } 2638 2639 @Override 2640 protected FeatureBean receive(Protocol protocol, MessageMetadata metadata) throws Exception { 2641 FeatureBean result = null; 2642 ServiceRuntimeException ex1 = null; 2643 protocol.readStructBegin(); 2644 while (true) { 2645 FieldMetadata field = protocol.readFieldBegin(); 2646 if (field.typeId == TType.STOP) { 2647 break; 2648 } 2649 switch (field.fieldId) { 2650 case 0: { 2651 if (field.typeId == TType.STRUCT) { 2652 net.gdface.facedb.thrift.client.FeatureBean value = net.gdface.facedb.thrift.client.FeatureBean.ADAPTER.read(protocol); 2653 result = value; 2654 } else { 2655 ProtocolUtil.skip(protocol, field.typeId); 2656 } 2657 } 2658 break; 2659 case 1: { 2660 if (field.typeId == TType.STRUCT) { 2661 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 2662 ex1 = value; 2663 } else { 2664 ProtocolUtil.skip(protocol, field.typeId); 2665 } 2666 } 2667 break; 2668 default: ProtocolUtil.skip(protocol, field.typeId); break; 2669 } 2670 protocol.readFieldEnd(); 2671 } 2672 protocol.readStructEnd(); 2673 if (result != null) { 2674 return result; 2675 } else if (ex1 != null) { 2676 throw ex1; 2677 } else { 2678 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 2679 } 2680 } 2681 } 2682 2683 private static final class GetFeatureByFaceIdCall extends MethodCall<FeatureBean> { 2684 private final Integer faceId; 2685 2686 GetFeatureByFaceIdCall(Integer faceId, ServiceMethodCallback<FeatureBean> callback) { 2687 super("getFeatureByFaceId", TMessageType.CALL, callback); 2688 if (faceId == null) throw new NullPointerException("faceId"); 2689 this.faceId = faceId; 2690 } 2691 2692 @Override 2693 protected void send(Protocol protocol) throws IOException { 2694 protocol.writeStructBegin("args"); 2695 protocol.writeFieldBegin("faceId", 1, TType.I32); 2696 protocol.writeI32(this.faceId); 2697 protocol.writeFieldEnd(); 2698 protocol.writeFieldStop(); 2699 protocol.writeStructEnd(); 2700 } 2701 2702 @Override 2703 protected FeatureBean receive(Protocol protocol, MessageMetadata metadata) throws Exception { 2704 FeatureBean result = null; 2705 ServiceRuntimeException ex1 = null; 2706 protocol.readStructBegin(); 2707 while (true) { 2708 FieldMetadata field = protocol.readFieldBegin(); 2709 if (field.typeId == TType.STOP) { 2710 break; 2711 } 2712 switch (field.fieldId) { 2713 case 0: { 2714 if (field.typeId == TType.STRUCT) { 2715 net.gdface.facedb.thrift.client.FeatureBean value = net.gdface.facedb.thrift.client.FeatureBean.ADAPTER.read(protocol); 2716 result = value; 2717 } else { 2718 ProtocolUtil.skip(protocol, field.typeId); 2719 } 2720 } 2721 break; 2722 case 1: { 2723 if (field.typeId == TType.STRUCT) { 2724 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 2725 ex1 = value; 2726 } else { 2727 ProtocolUtil.skip(protocol, field.typeId); 2728 } 2729 } 2730 break; 2731 default: ProtocolUtil.skip(protocol, field.typeId); break; 2732 } 2733 protocol.readFieldEnd(); 2734 } 2735 protocol.readStructEnd(); 2736 if (result != null) { 2737 return result; 2738 } else if (ex1 != null) { 2739 throw ex1; 2740 } else { 2741 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 2742 } 2743 } 2744 } 2745 2746 private static final class GetFeatureByImageMd5Call extends MethodCall<FeatureBean> { 2747 private final String imageMd5; 2748 2749 GetFeatureByImageMd5Call(String imageMd5, ServiceMethodCallback<FeatureBean> callback) { 2750 super("getFeatureByImageMd5", TMessageType.CALL, callback); 2751 this.imageMd5 = imageMd5; 2752 } 2753 2754 @Override 2755 protected void send(Protocol protocol) throws IOException { 2756 protocol.writeStructBegin("args"); 2757 if (this.imageMd5 != null) { 2758 protocol.writeFieldBegin("imageMd5", 1, TType.STRING); 2759 protocol.writeString(this.imageMd5); 2760 protocol.writeFieldEnd(); 2761 } 2762 protocol.writeFieldStop(); 2763 protocol.writeStructEnd(); 2764 } 2765 2766 @Override 2767 protected FeatureBean receive(Protocol protocol, MessageMetadata metadata) throws Exception { 2768 FeatureBean result = null; 2769 ServiceRuntimeException ex1 = null; 2770 protocol.readStructBegin(); 2771 while (true) { 2772 FieldMetadata field = protocol.readFieldBegin(); 2773 if (field.typeId == TType.STOP) { 2774 break; 2775 } 2776 switch (field.fieldId) { 2777 case 0: { 2778 if (field.typeId == TType.STRUCT) { 2779 net.gdface.facedb.thrift.client.FeatureBean value = net.gdface.facedb.thrift.client.FeatureBean.ADAPTER.read(protocol); 2780 result = value; 2781 } else { 2782 ProtocolUtil.skip(protocol, field.typeId); 2783 } 2784 } 2785 break; 2786 case 1: { 2787 if (field.typeId == TType.STRUCT) { 2788 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 2789 ex1 = value; 2790 } else { 2791 ProtocolUtil.skip(protocol, field.typeId); 2792 } 2793 } 2794 break; 2795 default: ProtocolUtil.skip(protocol, field.typeId); break; 2796 } 2797 protocol.readFieldEnd(); 2798 } 2799 protocol.readStructEnd(); 2800 if (result != null) { 2801 return result; 2802 } else if (ex1 != null) { 2803 throw ex1; 2804 } else { 2805 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 2806 } 2807 } 2808 } 2809 2810 private static final class GetFeatureCountCall extends MethodCall<Integer> { 2811 GetFeatureCountCall(ServiceMethodCallback<Integer> callback) { 2812 super("getFeatureCount", TMessageType.CALL, callback); 2813 } 2814 2815 @Override 2816 protected void send(Protocol protocol) throws IOException { 2817 protocol.writeStructBegin("args"); 2818 protocol.writeFieldStop(); 2819 protocol.writeStructEnd(); 2820 } 2821 2822 @Override 2823 protected Integer receive(Protocol protocol, MessageMetadata metadata) throws Exception { 2824 Integer result = null; 2825 ServiceRuntimeException ex1 = null; 2826 protocol.readStructBegin(); 2827 while (true) { 2828 FieldMetadata field = protocol.readFieldBegin(); 2829 if (field.typeId == TType.STOP) { 2830 break; 2831 } 2832 switch (field.fieldId) { 2833 case 0: { 2834 if (field.typeId == TType.I32) { 2835 int value = protocol.readI32(); 2836 result = value; 2837 } else { 2838 ProtocolUtil.skip(protocol, field.typeId); 2839 } 2840 } 2841 break; 2842 case 1: { 2843 if (field.typeId == TType.STRUCT) { 2844 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 2845 ex1 = value; 2846 } else { 2847 ProtocolUtil.skip(protocol, field.typeId); 2848 } 2849 } 2850 break; 2851 default: ProtocolUtil.skip(protocol, field.typeId); break; 2852 } 2853 protocol.readFieldEnd(); 2854 } 2855 protocol.readStructEnd(); 2856 if (result != null) { 2857 return result; 2858 } else if (ex1 != null) { 2859 throw ex1; 2860 } else { 2861 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 2862 } 2863 } 2864 } 2865 2866 private static final class GetFeaturesByImageMd5Call extends MethodCall<List<FeatureBean>> { 2867 private final String imageMd5; 2868 2869 GetFeaturesByImageMd5Call(String imageMd5, ServiceMethodCallback<List<FeatureBean>> callback) { 2870 super("getFeaturesByImageMd5", TMessageType.CALL, callback); 2871 this.imageMd5 = imageMd5; 2872 } 2873 2874 @Override 2875 protected void send(Protocol protocol) throws IOException { 2876 protocol.writeStructBegin("args"); 2877 if (this.imageMd5 != null) { 2878 protocol.writeFieldBegin("imageMd5", 1, TType.STRING); 2879 protocol.writeString(this.imageMd5); 2880 protocol.writeFieldEnd(); 2881 } 2882 protocol.writeFieldStop(); 2883 protocol.writeStructEnd(); 2884 } 2885 2886 @Override 2887 protected List<FeatureBean> receive(Protocol protocol, MessageMetadata metadata) throws 2888 Exception { 2889 List<FeatureBean> result = null; 2890 ServiceRuntimeException ex1 = null; 2891 protocol.readStructBegin(); 2892 while (true) { 2893 FieldMetadata field = protocol.readFieldBegin(); 2894 if (field.typeId == TType.STOP) { 2895 break; 2896 } 2897 switch (field.fieldId) { 2898 case 0: { 2899 if (field.typeId == TType.LIST) { 2900 ListMetadata listMetadata0 = protocol.readListBegin(); 2901 List<FeatureBean> value = new ArrayList<FeatureBean>(listMetadata0.size); 2902 for (int i0 = 0; i0 < listMetadata0.size; ++i0) { 2903 net.gdface.facedb.thrift.client.FeatureBean item0 = net.gdface.facedb.thrift.client.FeatureBean.ADAPTER.read(protocol); 2904 value.add(item0); 2905 } 2906 protocol.readListEnd(); 2907 result = value; 2908 } else { 2909 ProtocolUtil.skip(protocol, field.typeId); 2910 } 2911 } 2912 break; 2913 case 1: { 2914 if (field.typeId == TType.STRUCT) { 2915 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 2916 ex1 = value; 2917 } else { 2918 ProtocolUtil.skip(protocol, field.typeId); 2919 } 2920 } 2921 break; 2922 default: ProtocolUtil.skip(protocol, field.typeId); break; 2923 } 2924 protocol.readFieldEnd(); 2925 } 2926 protocol.readStructEnd(); 2927 if (result != null) { 2928 return result; 2929 } else if (ex1 != null) { 2930 throw ex1; 2931 } else { 2932 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 2933 } 2934 } 2935 } 2936 2937 private static final class GetImageCall extends MethodCall<ImageBean> { 2938 private final String imageMd5; 2939 2940 GetImageCall(String imageMd5, ServiceMethodCallback<ImageBean> callback) { 2941 super("getImage", TMessageType.CALL, callback); 2942 this.imageMd5 = imageMd5; 2943 } 2944 2945 @Override 2946 protected void send(Protocol protocol) throws IOException { 2947 protocol.writeStructBegin("args"); 2948 if (this.imageMd5 != null) { 2949 protocol.writeFieldBegin("imageMd5", 1, TType.STRING); 2950 protocol.writeString(this.imageMd5); 2951 protocol.writeFieldEnd(); 2952 } 2953 protocol.writeFieldStop(); 2954 protocol.writeStructEnd(); 2955 } 2956 2957 @Override 2958 protected ImageBean receive(Protocol protocol, MessageMetadata metadata) throws Exception { 2959 ImageBean result = null; 2960 ServiceRuntimeException ex1 = null; 2961 protocol.readStructBegin(); 2962 while (true) { 2963 FieldMetadata field = protocol.readFieldBegin(); 2964 if (field.typeId == TType.STOP) { 2965 break; 2966 } 2967 switch (field.fieldId) { 2968 case 0: { 2969 if (field.typeId == TType.STRUCT) { 2970 net.gdface.facedb.thrift.client.ImageBean value = net.gdface.facedb.thrift.client.ImageBean.ADAPTER.read(protocol); 2971 result = value; 2972 } else { 2973 ProtocolUtil.skip(protocol, field.typeId); 2974 } 2975 } 2976 break; 2977 case 1: { 2978 if (field.typeId == TType.STRUCT) { 2979 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 2980 ex1 = value; 2981 } else { 2982 ProtocolUtil.skip(protocol, field.typeId); 2983 } 2984 } 2985 break; 2986 default: ProtocolUtil.skip(protocol, field.typeId); break; 2987 } 2988 protocol.readFieldEnd(); 2989 } 2990 protocol.readStructEnd(); 2991 if (result != null) { 2992 return result; 2993 } else if (ex1 != null) { 2994 throw ex1; 2995 } else { 2996 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 2997 } 2998 } 2999 } 3000 3001 private static final class GetImageByFaceIdCall extends MethodCall<ImageBean> { 3002 private final Integer faceId; 3003 3004 GetImageByFaceIdCall(Integer faceId, ServiceMethodCallback<ImageBean> callback) { 3005 super("getImageByFaceId", TMessageType.CALL, callback); 3006 if (faceId == null) throw new NullPointerException("faceId"); 3007 this.faceId = faceId; 3008 } 3009 3010 @Override 3011 protected void send(Protocol protocol) throws IOException { 3012 protocol.writeStructBegin("args"); 3013 protocol.writeFieldBegin("faceId", 1, TType.I32); 3014 protocol.writeI32(this.faceId); 3015 protocol.writeFieldEnd(); 3016 protocol.writeFieldStop(); 3017 protocol.writeStructEnd(); 3018 } 3019 3020 @Override 3021 protected ImageBean receive(Protocol protocol, MessageMetadata metadata) throws Exception { 3022 ImageBean result = null; 3023 ServiceRuntimeException ex1 = null; 3024 protocol.readStructBegin(); 3025 while (true) { 3026 FieldMetadata field = protocol.readFieldBegin(); 3027 if (field.typeId == TType.STOP) { 3028 break; 3029 } 3030 switch (field.fieldId) { 3031 case 0: { 3032 if (field.typeId == TType.STRUCT) { 3033 net.gdface.facedb.thrift.client.ImageBean value = net.gdface.facedb.thrift.client.ImageBean.ADAPTER.read(protocol); 3034 result = value; 3035 } else { 3036 ProtocolUtil.skip(protocol, field.typeId); 3037 } 3038 } 3039 break; 3040 case 1: { 3041 if (field.typeId == TType.STRUCT) { 3042 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 3043 ex1 = value; 3044 } else { 3045 ProtocolUtil.skip(protocol, field.typeId); 3046 } 3047 } 3048 break; 3049 default: ProtocolUtil.skip(protocol, field.typeId); break; 3050 } 3051 protocol.readFieldEnd(); 3052 } 3053 protocol.readStructEnd(); 3054 if (result != null) { 3055 return result; 3056 } else if (ex1 != null) { 3057 throw ex1; 3058 } else { 3059 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 3060 } 3061 } 3062 } 3063 3064 private static final class GetImageByFeatureIdCall extends MethodCall<ImageBean> { 3065 private final String featureId; 3066 3067 GetImageByFeatureIdCall(String featureId, ServiceMethodCallback<ImageBean> callback) { 3068 super("getImageByFeatureId", TMessageType.CALL, callback); 3069 this.featureId = featureId; 3070 } 3071 3072 @Override 3073 protected void send(Protocol protocol) throws IOException { 3074 protocol.writeStructBegin("args"); 3075 if (this.featureId != null) { 3076 protocol.writeFieldBegin("featureId", 1, TType.STRING); 3077 protocol.writeString(this.featureId); 3078 protocol.writeFieldEnd(); 3079 } 3080 protocol.writeFieldStop(); 3081 protocol.writeStructEnd(); 3082 } 3083 3084 @Override 3085 protected ImageBean receive(Protocol protocol, MessageMetadata metadata) throws Exception { 3086 ImageBean result = null; 3087 ServiceRuntimeException ex1 = null; 3088 protocol.readStructBegin(); 3089 while (true) { 3090 FieldMetadata field = protocol.readFieldBegin(); 3091 if (field.typeId == TType.STOP) { 3092 break; 3093 } 3094 switch (field.fieldId) { 3095 case 0: { 3096 if (field.typeId == TType.STRUCT) { 3097 net.gdface.facedb.thrift.client.ImageBean value = net.gdface.facedb.thrift.client.ImageBean.ADAPTER.read(protocol); 3098 result = value; 3099 } else { 3100 ProtocolUtil.skip(protocol, field.typeId); 3101 } 3102 } 3103 break; 3104 case 1: { 3105 if (field.typeId == TType.STRUCT) { 3106 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 3107 ex1 = value; 3108 } else { 3109 ProtocolUtil.skip(protocol, field.typeId); 3110 } 3111 } 3112 break; 3113 default: ProtocolUtil.skip(protocol, field.typeId); break; 3114 } 3115 protocol.readFieldEnd(); 3116 } 3117 protocol.readStructEnd(); 3118 if (result != null) { 3119 return result; 3120 } else if (ex1 != null) { 3121 throw ex1; 3122 } else { 3123 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 3124 } 3125 } 3126 } 3127 3128 private static final class GetImageBytesCall extends MethodCall<ByteString> { 3129 private final String imageMd5; 3130 3131 GetImageBytesCall(String imageMd5, ServiceMethodCallback<ByteString> callback) { 3132 super("getImageBytes", TMessageType.CALL, callback); 3133 this.imageMd5 = imageMd5; 3134 } 3135 3136 @Override 3137 protected void send(Protocol protocol) throws IOException { 3138 protocol.writeStructBegin("args"); 3139 if (this.imageMd5 != null) { 3140 protocol.writeFieldBegin("imageMd5", 1, TType.STRING); 3141 protocol.writeString(this.imageMd5); 3142 protocol.writeFieldEnd(); 3143 } 3144 protocol.writeFieldStop(); 3145 protocol.writeStructEnd(); 3146 } 3147 3148 @Override 3149 protected ByteString receive(Protocol protocol, MessageMetadata metadata) throws Exception { 3150 ByteString result = null; 3151 ServiceRuntimeException ex1 = null; 3152 protocol.readStructBegin(); 3153 while (true) { 3154 FieldMetadata field = protocol.readFieldBegin(); 3155 if (field.typeId == TType.STOP) { 3156 break; 3157 } 3158 switch (field.fieldId) { 3159 case 0: { 3160 if (field.typeId == TType.STRING) { 3161 ByteString value = protocol.readBinary(); 3162 result = value; 3163 } else { 3164 ProtocolUtil.skip(protocol, field.typeId); 3165 } 3166 } 3167 break; 3168 case 1: { 3169 if (field.typeId == TType.STRUCT) { 3170 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 3171 ex1 = value; 3172 } else { 3173 ProtocolUtil.skip(protocol, field.typeId); 3174 } 3175 } 3176 break; 3177 default: ProtocolUtil.skip(protocol, field.typeId); break; 3178 } 3179 protocol.readFieldEnd(); 3180 } 3181 protocol.readStructEnd(); 3182 if (result != null) { 3183 return result; 3184 } else if (ex1 != null) { 3185 throw ex1; 3186 } else { 3187 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 3188 } 3189 } 3190 } 3191 3192 private static final class GetImageBytesRefCall extends MethodCall<ByteString> { 3193 private final String primaryKey; 3194 3195 private final String refType; 3196 3197 GetImageBytesRefCall(String primaryKey, String refType, 3198 ServiceMethodCallback<ByteString> callback) { 3199 super("getImageBytesRef", TMessageType.CALL, callback); 3200 this.primaryKey = primaryKey; 3201 this.refType = refType; 3202 } 3203 3204 @Override 3205 protected void send(Protocol protocol) throws IOException { 3206 protocol.writeStructBegin("args"); 3207 if (this.primaryKey != null) { 3208 protocol.writeFieldBegin("primaryKey", 1, TType.STRING); 3209 protocol.writeString(this.primaryKey); 3210 protocol.writeFieldEnd(); 3211 } 3212 if (this.refType != null) { 3213 protocol.writeFieldBegin("refType", 2, TType.STRING); 3214 protocol.writeString(this.refType); 3215 protocol.writeFieldEnd(); 3216 } 3217 protocol.writeFieldStop(); 3218 protocol.writeStructEnd(); 3219 } 3220 3221 @Override 3222 protected ByteString receive(Protocol protocol, MessageMetadata metadata) throws Exception { 3223 ByteString result = null; 3224 ServiceRuntimeException ex1 = null; 3225 protocol.readStructBegin(); 3226 while (true) { 3227 FieldMetadata field = protocol.readFieldBegin(); 3228 if (field.typeId == TType.STOP) { 3229 break; 3230 } 3231 switch (field.fieldId) { 3232 case 0: { 3233 if (field.typeId == TType.STRING) { 3234 ByteString value = protocol.readBinary(); 3235 result = value; 3236 } else { 3237 ProtocolUtil.skip(protocol, field.typeId); 3238 } 3239 } 3240 break; 3241 case 1: { 3242 if (field.typeId == TType.STRUCT) { 3243 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 3244 ex1 = value; 3245 } else { 3246 ProtocolUtil.skip(protocol, field.typeId); 3247 } 3248 } 3249 break; 3250 default: ProtocolUtil.skip(protocol, field.typeId); break; 3251 } 3252 protocol.readFieldEnd(); 3253 } 3254 protocol.readStructEnd(); 3255 if (result != null) { 3256 return result; 3257 } else if (ex1 != null) { 3258 throw ex1; 3259 } else { 3260 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 3261 } 3262 } 3263 } 3264 3265 private static final class GetImageCountCall extends MethodCall<Integer> { 3266 private final String where; 3267 3268 GetImageCountCall(String where, ServiceMethodCallback<Integer> callback) { 3269 super("getImageCount", TMessageType.CALL, callback); 3270 this.where = where; 3271 } 3272 3273 @Override 3274 protected void send(Protocol protocol) throws IOException { 3275 protocol.writeStructBegin("args"); 3276 if (this.where != null) { 3277 protocol.writeFieldBegin("where", 1, TType.STRING); 3278 protocol.writeString(this.where); 3279 protocol.writeFieldEnd(); 3280 } 3281 protocol.writeFieldStop(); 3282 protocol.writeStructEnd(); 3283 } 3284 3285 @Override 3286 protected Integer receive(Protocol protocol, MessageMetadata metadata) throws Exception { 3287 Integer result = null; 3288 ServiceRuntimeException ex1 = null; 3289 protocol.readStructBegin(); 3290 while (true) { 3291 FieldMetadata field = protocol.readFieldBegin(); 3292 if (field.typeId == TType.STOP) { 3293 break; 3294 } 3295 switch (field.fieldId) { 3296 case 0: { 3297 if (field.typeId == TType.I32) { 3298 int value = protocol.readI32(); 3299 result = value; 3300 } else { 3301 ProtocolUtil.skip(protocol, field.typeId); 3302 } 3303 } 3304 break; 3305 case 1: { 3306 if (field.typeId == TType.STRUCT) { 3307 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 3308 ex1 = value; 3309 } else { 3310 ProtocolUtil.skip(protocol, field.typeId); 3311 } 3312 } 3313 break; 3314 default: ProtocolUtil.skip(protocol, field.typeId); break; 3315 } 3316 protocol.readFieldEnd(); 3317 } 3318 protocol.readStructEnd(); 3319 if (result != null) { 3320 return result; 3321 } else if (ex1 != null) { 3322 throw ex1; 3323 } else { 3324 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 3325 } 3326 } 3327 } 3328 3329 private static final class GetImageRefCall extends MethodCall<ImageBean> { 3330 private final String primaryKey; 3331 3332 private final String refType; 3333 3334 GetImageRefCall(String primaryKey, String refType, ServiceMethodCallback<ImageBean> callback) { 3335 super("getImageRef", TMessageType.CALL, callback); 3336 this.primaryKey = primaryKey; 3337 this.refType = refType; 3338 } 3339 3340 @Override 3341 protected void send(Protocol protocol) throws IOException { 3342 protocol.writeStructBegin("args"); 3343 if (this.primaryKey != null) { 3344 protocol.writeFieldBegin("primaryKey", 1, TType.STRING); 3345 protocol.writeString(this.primaryKey); 3346 protocol.writeFieldEnd(); 3347 } 3348 if (this.refType != null) { 3349 protocol.writeFieldBegin("refType", 2, TType.STRING); 3350 protocol.writeString(this.refType); 3351 protocol.writeFieldEnd(); 3352 } 3353 protocol.writeFieldStop(); 3354 protocol.writeStructEnd(); 3355 } 3356 3357 @Override 3358 protected ImageBean receive(Protocol protocol, MessageMetadata metadata) throws Exception { 3359 ImageBean result = null; 3360 ServiceRuntimeException ex1 = null; 3361 protocol.readStructBegin(); 3362 while (true) { 3363 FieldMetadata field = protocol.readFieldBegin(); 3364 if (field.typeId == TType.STOP) { 3365 break; 3366 } 3367 switch (field.fieldId) { 3368 case 0: { 3369 if (field.typeId == TType.STRUCT) { 3370 net.gdface.facedb.thrift.client.ImageBean value = net.gdface.facedb.thrift.client.ImageBean.ADAPTER.read(protocol); 3371 result = value; 3372 } else { 3373 ProtocolUtil.skip(protocol, field.typeId); 3374 } 3375 } 3376 break; 3377 case 1: { 3378 if (field.typeId == TType.STRUCT) { 3379 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 3380 ex1 = value; 3381 } else { 3382 ProtocolUtil.skip(protocol, field.typeId); 3383 } 3384 } 3385 break; 3386 default: ProtocolUtil.skip(protocol, field.typeId); break; 3387 } 3388 protocol.readFieldEnd(); 3389 } 3390 protocol.readStructEnd(); 3391 if (result != null) { 3392 return result; 3393 } else if (ex1 != null) { 3394 throw ex1; 3395 } else { 3396 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 3397 } 3398 } 3399 } 3400 3401 private static final class GetImagesByFeatureIdCall extends MethodCall<List<ImageBean>> { 3402 private final String featureId; 3403 3404 GetImagesByFeatureIdCall(String featureId, ServiceMethodCallback<List<ImageBean>> callback) { 3405 super("getImagesByFeatureId", TMessageType.CALL, callback); 3406 this.featureId = featureId; 3407 } 3408 3409 @Override 3410 protected void send(Protocol protocol) throws IOException { 3411 protocol.writeStructBegin("args"); 3412 if (this.featureId != null) { 3413 protocol.writeFieldBegin("featureId", 1, TType.STRING); 3414 protocol.writeString(this.featureId); 3415 protocol.writeFieldEnd(); 3416 } 3417 protocol.writeFieldStop(); 3418 protocol.writeStructEnd(); 3419 } 3420 3421 @Override 3422 protected List<ImageBean> receive(Protocol protocol, MessageMetadata metadata) throws 3423 Exception { 3424 List<ImageBean> result = null; 3425 ServiceRuntimeException ex1 = null; 3426 protocol.readStructBegin(); 3427 while (true) { 3428 FieldMetadata field = protocol.readFieldBegin(); 3429 if (field.typeId == TType.STOP) { 3430 break; 3431 } 3432 switch (field.fieldId) { 3433 case 0: { 3434 if (field.typeId == TType.LIST) { 3435 ListMetadata listMetadata0 = protocol.readListBegin(); 3436 List<ImageBean> value = new ArrayList<ImageBean>(listMetadata0.size); 3437 for (int i0 = 0; i0 < listMetadata0.size; ++i0) { 3438 net.gdface.facedb.thrift.client.ImageBean item0 = net.gdface.facedb.thrift.client.ImageBean.ADAPTER.read(protocol); 3439 value.add(item0); 3440 } 3441 protocol.readListEnd(); 3442 result = value; 3443 } else { 3444 ProtocolUtil.skip(protocol, field.typeId); 3445 } 3446 } 3447 break; 3448 case 1: { 3449 if (field.typeId == TType.STRUCT) { 3450 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 3451 ex1 = value; 3452 } else { 3453 ProtocolUtil.skip(protocol, field.typeId); 3454 } 3455 } 3456 break; 3457 default: ProtocolUtil.skip(protocol, field.typeId); break; 3458 } 3459 protocol.readFieldEnd(); 3460 } 3461 protocol.readStructEnd(); 3462 if (result != null) { 3463 return result; 3464 } else if (ex1 != null) { 3465 throw ex1; 3466 } else { 3467 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 3468 } 3469 } 3470 } 3471 3472 private static final class HasFeatureCall extends MethodCall<Boolean> { 3473 private final ByteString feature; 3474 3475 HasFeatureCall(ByteString feature, ServiceMethodCallback<Boolean> callback) { 3476 super("hasFeature", TMessageType.CALL, callback); 3477 this.feature = feature; 3478 } 3479 3480 @Override 3481 protected void send(Protocol protocol) throws IOException { 3482 protocol.writeStructBegin("args"); 3483 if (this.feature != null) { 3484 protocol.writeFieldBegin("feature", 1, TType.STRING); 3485 protocol.writeBinary(this.feature); 3486 protocol.writeFieldEnd(); 3487 } 3488 protocol.writeFieldStop(); 3489 protocol.writeStructEnd(); 3490 } 3491 3492 @Override 3493 protected Boolean receive(Protocol protocol, MessageMetadata metadata) throws Exception { 3494 Boolean result = null; 3495 ServiceRuntimeException ex1 = null; 3496 protocol.readStructBegin(); 3497 while (true) { 3498 FieldMetadata field = protocol.readFieldBegin(); 3499 if (field.typeId == TType.STOP) { 3500 break; 3501 } 3502 switch (field.fieldId) { 3503 case 0: { 3504 if (field.typeId == TType.BOOL) { 3505 boolean value = protocol.readBool(); 3506 result = value; 3507 } else { 3508 ProtocolUtil.skip(protocol, field.typeId); 3509 } 3510 } 3511 break; 3512 case 1: { 3513 if (field.typeId == TType.STRUCT) { 3514 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 3515 ex1 = value; 3516 } else { 3517 ProtocolUtil.skip(protocol, field.typeId); 3518 } 3519 } 3520 break; 3521 default: ProtocolUtil.skip(protocol, field.typeId); break; 3522 } 3523 protocol.readFieldEnd(); 3524 } 3525 protocol.readStructEnd(); 3526 if (result != null) { 3527 return result; 3528 } else if (ex1 != null) { 3529 throw ex1; 3530 } else { 3531 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 3532 } 3533 } 3534 } 3535 3536 private static final class HasFeatureByMD5Call extends MethodCall<Boolean> { 3537 private final String featureId; 3538 3539 HasFeatureByMD5Call(String featureId, ServiceMethodCallback<Boolean> callback) { 3540 super("hasFeatureByMD5", TMessageType.CALL, callback); 3541 this.featureId = featureId; 3542 } 3543 3544 @Override 3545 protected void send(Protocol protocol) throws IOException { 3546 protocol.writeStructBegin("args"); 3547 if (this.featureId != null) { 3548 protocol.writeFieldBegin("featureId", 1, TType.STRING); 3549 protocol.writeString(this.featureId); 3550 protocol.writeFieldEnd(); 3551 } 3552 protocol.writeFieldStop(); 3553 protocol.writeStructEnd(); 3554 } 3555 3556 @Override 3557 protected Boolean receive(Protocol protocol, MessageMetadata metadata) throws Exception { 3558 Boolean result = null; 3559 ServiceRuntimeException ex1 = null; 3560 protocol.readStructBegin(); 3561 while (true) { 3562 FieldMetadata field = protocol.readFieldBegin(); 3563 if (field.typeId == TType.STOP) { 3564 break; 3565 } 3566 switch (field.fieldId) { 3567 case 0: { 3568 if (field.typeId == TType.BOOL) { 3569 boolean value = protocol.readBool(); 3570 result = value; 3571 } else { 3572 ProtocolUtil.skip(protocol, field.typeId); 3573 } 3574 } 3575 break; 3576 case 1: { 3577 if (field.typeId == TType.STRUCT) { 3578 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 3579 ex1 = value; 3580 } else { 3581 ProtocolUtil.skip(protocol, field.typeId); 3582 } 3583 } 3584 break; 3585 default: ProtocolUtil.skip(protocol, field.typeId); break; 3586 } 3587 protocol.readFieldEnd(); 3588 } 3589 protocol.readStructEnd(); 3590 if (result != null) { 3591 return result; 3592 } else if (ex1 != null) { 3593 throw ex1; 3594 } else { 3595 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 3596 } 3597 } 3598 } 3599 3600 private static final class HasImageCall extends MethodCall<Boolean> { 3601 private final String imageMd5; 3602 3603 HasImageCall(String imageMd5, ServiceMethodCallback<Boolean> callback) { 3604 super("hasImage", TMessageType.CALL, callback); 3605 this.imageMd5 = imageMd5; 3606 } 3607 3608 @Override 3609 protected void send(Protocol protocol) throws IOException { 3610 protocol.writeStructBegin("args"); 3611 if (this.imageMd5 != null) { 3612 protocol.writeFieldBegin("imageMd5", 1, TType.STRING); 3613 protocol.writeString(this.imageMd5); 3614 protocol.writeFieldEnd(); 3615 } 3616 protocol.writeFieldStop(); 3617 protocol.writeStructEnd(); 3618 } 3619 3620 @Override 3621 protected Boolean receive(Protocol protocol, MessageMetadata metadata) throws Exception { 3622 Boolean result = null; 3623 ServiceRuntimeException ex1 = null; 3624 protocol.readStructBegin(); 3625 while (true) { 3626 FieldMetadata field = protocol.readFieldBegin(); 3627 if (field.typeId == TType.STOP) { 3628 break; 3629 } 3630 switch (field.fieldId) { 3631 case 0: { 3632 if (field.typeId == TType.BOOL) { 3633 boolean value = protocol.readBool(); 3634 result = value; 3635 } else { 3636 ProtocolUtil.skip(protocol, field.typeId); 3637 } 3638 } 3639 break; 3640 case 1: { 3641 if (field.typeId == TType.STRUCT) { 3642 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 3643 ex1 = value; 3644 } else { 3645 ProtocolUtil.skip(protocol, field.typeId); 3646 } 3647 } 3648 break; 3649 default: ProtocolUtil.skip(protocol, field.typeId); break; 3650 } 3651 protocol.readFieldEnd(); 3652 } 3653 protocol.readStructEnd(); 3654 if (result != null) { 3655 return result; 3656 } else if (ex1 != null) { 3657 throw ex1; 3658 } else { 3659 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 3660 } 3661 } 3662 } 3663 3664 private static final class IsLocalCall extends MethodCall<Boolean> { 3665 IsLocalCall(ServiceMethodCallback<Boolean> callback) { 3666 super("isLocal", TMessageType.CALL, callback); 3667 } 3668 3669 @Override 3670 protected void send(Protocol protocol) throws IOException { 3671 protocol.writeStructBegin("args"); 3672 protocol.writeFieldStop(); 3673 protocol.writeStructEnd(); 3674 } 3675 3676 @Override 3677 protected Boolean receive(Protocol protocol, MessageMetadata metadata) throws Exception { 3678 Boolean result = null; 3679 ServiceRuntimeException ex1 = null; 3680 protocol.readStructBegin(); 3681 while (true) { 3682 FieldMetadata field = protocol.readFieldBegin(); 3683 if (field.typeId == TType.STOP) { 3684 break; 3685 } 3686 switch (field.fieldId) { 3687 case 0: { 3688 if (field.typeId == TType.BOOL) { 3689 boolean value = protocol.readBool(); 3690 result = value; 3691 } else { 3692 ProtocolUtil.skip(protocol, field.typeId); 3693 } 3694 } 3695 break; 3696 case 1: { 3697 if (field.typeId == TType.STRUCT) { 3698 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 3699 ex1 = value; 3700 } else { 3701 ProtocolUtil.skip(protocol, field.typeId); 3702 } 3703 } 3704 break; 3705 default: ProtocolUtil.skip(protocol, field.typeId); break; 3706 } 3707 protocol.readFieldEnd(); 3708 } 3709 protocol.readStructEnd(); 3710 if (result != null) { 3711 return result; 3712 } else if (ex1 != null) { 3713 throw ex1; 3714 } else { 3715 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 3716 } 3717 } 3718 } 3719 3720 private static final class LoadFeaturesMd5ByCreateTimeCall extends MethodCall<List<String>> { 3721 private final Long timestamp; 3722 3723 LoadFeaturesMd5ByCreateTimeCall(Long timestamp, ServiceMethodCallback<List<String>> callback) { 3724 super("loadFeaturesMd5ByCreateTime", TMessageType.CALL, callback); 3725 this.timestamp = timestamp; 3726 } 3727 3728 @Override 3729 protected void send(Protocol protocol) throws IOException { 3730 protocol.writeStructBegin("args"); 3731 if (this.timestamp != null) { 3732 protocol.writeFieldBegin("timestamp", 1, TType.I64); 3733 protocol.writeI64(this.timestamp); 3734 protocol.writeFieldEnd(); 3735 } 3736 protocol.writeFieldStop(); 3737 protocol.writeStructEnd(); 3738 } 3739 3740 @Override 3741 protected List<String> receive(Protocol protocol, MessageMetadata metadata) throws Exception { 3742 List<String> result = null; 3743 ServiceRuntimeException ex1 = null; 3744 protocol.readStructBegin(); 3745 while (true) { 3746 FieldMetadata field = protocol.readFieldBegin(); 3747 if (field.typeId == TType.STOP) { 3748 break; 3749 } 3750 switch (field.fieldId) { 3751 case 0: { 3752 if (field.typeId == TType.LIST) { 3753 ListMetadata listMetadata0 = protocol.readListBegin(); 3754 List<String> value = new ArrayList<String>(listMetadata0.size); 3755 for (int i0 = 0; i0 < listMetadata0.size; ++i0) { 3756 String item0 = protocol.readString(); 3757 value.add(item0); 3758 } 3759 protocol.readListEnd(); 3760 result = value; 3761 } else { 3762 ProtocolUtil.skip(protocol, field.typeId); 3763 } 3764 } 3765 break; 3766 case 1: { 3767 if (field.typeId == TType.STRUCT) { 3768 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 3769 ex1 = value; 3770 } else { 3771 ProtocolUtil.skip(protocol, field.typeId); 3772 } 3773 } 3774 break; 3775 default: ProtocolUtil.skip(protocol, field.typeId); break; 3776 } 3777 protocol.readFieldEnd(); 3778 } 3779 protocol.readStructEnd(); 3780 if (result != null) { 3781 return result; 3782 } else if (ex1 != null) { 3783 throw ex1; 3784 } else { 3785 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 3786 } 3787 } 3788 } 3789 3790 private static final class LoadFeaturesMd5ByCreateTimeTimeStrCall extends MethodCall<List<String>> { 3791 private final String timestamp; 3792 3793 LoadFeaturesMd5ByCreateTimeTimeStrCall(String timestamp, 3794 ServiceMethodCallback<List<String>> callback) { 3795 super("loadFeaturesMd5ByCreateTimeTimeStr", TMessageType.CALL, callback); 3796 this.timestamp = timestamp; 3797 } 3798 3799 @Override 3800 protected void send(Protocol protocol) throws IOException { 3801 protocol.writeStructBegin("args"); 3802 if (this.timestamp != null) { 3803 protocol.writeFieldBegin("timestamp", 1, TType.STRING); 3804 protocol.writeString(this.timestamp); 3805 protocol.writeFieldEnd(); 3806 } 3807 protocol.writeFieldStop(); 3808 protocol.writeStructEnd(); 3809 } 3810 3811 @Override 3812 protected List<String> receive(Protocol protocol, MessageMetadata metadata) throws Exception { 3813 List<String> result = null; 3814 ServiceRuntimeException ex1 = null; 3815 protocol.readStructBegin(); 3816 while (true) { 3817 FieldMetadata field = protocol.readFieldBegin(); 3818 if (field.typeId == TType.STOP) { 3819 break; 3820 } 3821 switch (field.fieldId) { 3822 case 0: { 3823 if (field.typeId == TType.LIST) { 3824 ListMetadata listMetadata0 = protocol.readListBegin(); 3825 List<String> value = new ArrayList<String>(listMetadata0.size); 3826 for (int i0 = 0; i0 < listMetadata0.size; ++i0) { 3827 String item0 = protocol.readString(); 3828 value.add(item0); 3829 } 3830 protocol.readListEnd(); 3831 result = value; 3832 } else { 3833 ProtocolUtil.skip(protocol, field.typeId); 3834 } 3835 } 3836 break; 3837 case 1: { 3838 if (field.typeId == TType.STRUCT) { 3839 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 3840 ex1 = value; 3841 } else { 3842 ProtocolUtil.skip(protocol, field.typeId); 3843 } 3844 } 3845 break; 3846 default: ProtocolUtil.skip(protocol, field.typeId); break; 3847 } 3848 protocol.readFieldEnd(); 3849 } 3850 protocol.readStructEnd(); 3851 if (result != null) { 3852 return result; 3853 } else if (ex1 != null) { 3854 throw ex1; 3855 } else { 3856 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 3857 } 3858 } 3859 } 3860 3861 private static final class LoadFeaturesMd5ByWhereCall extends MethodCall<List<String>> { 3862 private final String where; 3863 3864 LoadFeaturesMd5ByWhereCall(String where, ServiceMethodCallback<List<String>> callback) { 3865 super("loadFeaturesMd5ByWhere", TMessageType.CALL, callback); 3866 this.where = where; 3867 } 3868 3869 @Override 3870 protected void send(Protocol protocol) throws IOException { 3871 protocol.writeStructBegin("args"); 3872 if (this.where != null) { 3873 protocol.writeFieldBegin("where", 1, TType.STRING); 3874 protocol.writeString(this.where); 3875 protocol.writeFieldEnd(); 3876 } 3877 protocol.writeFieldStop(); 3878 protocol.writeStructEnd(); 3879 } 3880 3881 @Override 3882 protected List<String> receive(Protocol protocol, MessageMetadata metadata) throws Exception { 3883 List<String> result = null; 3884 ServiceRuntimeException ex1 = null; 3885 protocol.readStructBegin(); 3886 while (true) { 3887 FieldMetadata field = protocol.readFieldBegin(); 3888 if (field.typeId == TType.STOP) { 3889 break; 3890 } 3891 switch (field.fieldId) { 3892 case 0: { 3893 if (field.typeId == TType.LIST) { 3894 ListMetadata listMetadata0 = protocol.readListBegin(); 3895 List<String> value = new ArrayList<String>(listMetadata0.size); 3896 for (int i0 = 0; i0 < listMetadata0.size; ++i0) { 3897 String item0 = protocol.readString(); 3898 value.add(item0); 3899 } 3900 protocol.readListEnd(); 3901 result = value; 3902 } else { 3903 ProtocolUtil.skip(protocol, field.typeId); 3904 } 3905 } 3906 break; 3907 case 1: { 3908 if (field.typeId == TType.STRUCT) { 3909 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 3910 ex1 = value; 3911 } else { 3912 ProtocolUtil.skip(protocol, field.typeId); 3913 } 3914 } 3915 break; 3916 default: ProtocolUtil.skip(protocol, field.typeId); break; 3917 } 3918 protocol.readFieldEnd(); 3919 } 3920 protocol.readStructEnd(); 3921 if (result != null) { 3922 return result; 3923 } else if (ex1 != null) { 3924 throw ex1; 3925 } else { 3926 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 3927 } 3928 } 3929 } 3930 3931 private static final class LoadImagesByWhereCall extends MethodCall<List<ImageBean>> { 3932 private final String where; 3933 3934 private final Integer startRow; 3935 3936 private final Integer numRows; 3937 3938 LoadImagesByWhereCall(String where, Integer startRow, Integer numRows, 3939 ServiceMethodCallback<List<ImageBean>> callback) { 3940 super("loadImagesByWhere", TMessageType.CALL, callback); 3941 this.where = where; 3942 if (startRow == null) throw new NullPointerException("startRow"); 3943 this.startRow = startRow; 3944 if (numRows == null) throw new NullPointerException("numRows"); 3945 this.numRows = numRows; 3946 } 3947 3948 @Override 3949 protected void send(Protocol protocol) throws IOException { 3950 protocol.writeStructBegin("args"); 3951 if (this.where != null) { 3952 protocol.writeFieldBegin("where", 1, TType.STRING); 3953 protocol.writeString(this.where); 3954 protocol.writeFieldEnd(); 3955 } 3956 protocol.writeFieldBegin("startRow", 2, TType.I32); 3957 protocol.writeI32(this.startRow); 3958 protocol.writeFieldEnd(); 3959 protocol.writeFieldBegin("numRows", 3, TType.I32); 3960 protocol.writeI32(this.numRows); 3961 protocol.writeFieldEnd(); 3962 protocol.writeFieldStop(); 3963 protocol.writeStructEnd(); 3964 } 3965 3966 @Override 3967 protected List<ImageBean> receive(Protocol protocol, MessageMetadata metadata) throws 3968 Exception { 3969 List<ImageBean> result = null; 3970 ServiceRuntimeException ex1 = null; 3971 protocol.readStructBegin(); 3972 while (true) { 3973 FieldMetadata field = protocol.readFieldBegin(); 3974 if (field.typeId == TType.STOP) { 3975 break; 3976 } 3977 switch (field.fieldId) { 3978 case 0: { 3979 if (field.typeId == TType.LIST) { 3980 ListMetadata listMetadata0 = protocol.readListBegin(); 3981 List<ImageBean> value = new ArrayList<ImageBean>(listMetadata0.size); 3982 for (int i0 = 0; i0 < listMetadata0.size; ++i0) { 3983 net.gdface.facedb.thrift.client.ImageBean item0 = net.gdface.facedb.thrift.client.ImageBean.ADAPTER.read(protocol); 3984 value.add(item0); 3985 } 3986 protocol.readListEnd(); 3987 result = value; 3988 } else { 3989 ProtocolUtil.skip(protocol, field.typeId); 3990 } 3991 } 3992 break; 3993 case 1: { 3994 if (field.typeId == TType.STRUCT) { 3995 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 3996 ex1 = value; 3997 } else { 3998 ProtocolUtil.skip(protocol, field.typeId); 3999 } 4000 } 4001 break; 4002 default: ProtocolUtil.skip(protocol, field.typeId); break; 4003 } 4004 protocol.readFieldEnd(); 4005 } 4006 protocol.readStructEnd(); 4007 if (result != null) { 4008 return result; 4009 } else if (ex1 != null) { 4010 throw ex1; 4011 } else { 4012 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 4013 } 4014 } 4015 } 4016 4017 private static final class LoadImagesMd5ByCreateTimeCall extends MethodCall<List<String>> { 4018 private final Long timestamp; 4019 4020 LoadImagesMd5ByCreateTimeCall(Long timestamp, ServiceMethodCallback<List<String>> callback) { 4021 super("loadImagesMd5ByCreateTime", TMessageType.CALL, callback); 4022 this.timestamp = timestamp; 4023 } 4024 4025 @Override 4026 protected void send(Protocol protocol) throws IOException { 4027 protocol.writeStructBegin("args"); 4028 if (this.timestamp != null) { 4029 protocol.writeFieldBegin("timestamp", 1, TType.I64); 4030 protocol.writeI64(this.timestamp); 4031 protocol.writeFieldEnd(); 4032 } 4033 protocol.writeFieldStop(); 4034 protocol.writeStructEnd(); 4035 } 4036 4037 @Override 4038 protected List<String> receive(Protocol protocol, MessageMetadata metadata) throws Exception { 4039 List<String> result = null; 4040 ServiceRuntimeException ex1 = null; 4041 protocol.readStructBegin(); 4042 while (true) { 4043 FieldMetadata field = protocol.readFieldBegin(); 4044 if (field.typeId == TType.STOP) { 4045 break; 4046 } 4047 switch (field.fieldId) { 4048 case 0: { 4049 if (field.typeId == TType.LIST) { 4050 ListMetadata listMetadata0 = protocol.readListBegin(); 4051 List<String> value = new ArrayList<String>(listMetadata0.size); 4052 for (int i0 = 0; i0 < listMetadata0.size; ++i0) { 4053 String item0 = protocol.readString(); 4054 value.add(item0); 4055 } 4056 protocol.readListEnd(); 4057 result = value; 4058 } else { 4059 ProtocolUtil.skip(protocol, field.typeId); 4060 } 4061 } 4062 break; 4063 case 1: { 4064 if (field.typeId == TType.STRUCT) { 4065 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 4066 ex1 = value; 4067 } else { 4068 ProtocolUtil.skip(protocol, field.typeId); 4069 } 4070 } 4071 break; 4072 default: ProtocolUtil.skip(protocol, field.typeId); break; 4073 } 4074 protocol.readFieldEnd(); 4075 } 4076 protocol.readStructEnd(); 4077 if (result != null) { 4078 return result; 4079 } else if (ex1 != null) { 4080 throw ex1; 4081 } else { 4082 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 4083 } 4084 } 4085 } 4086 4087 private static final class LoadImagesMd5ByCreateTimeTimeStrCall extends MethodCall<List<String>> { 4088 private final String timestamp; 4089 4090 LoadImagesMd5ByCreateTimeTimeStrCall(String timestamp, 4091 ServiceMethodCallback<List<String>> callback) { 4092 super("loadImagesMd5ByCreateTimeTimeStr", TMessageType.CALL, callback); 4093 this.timestamp = timestamp; 4094 } 4095 4096 @Override 4097 protected void send(Protocol protocol) throws IOException { 4098 protocol.writeStructBegin("args"); 4099 if (this.timestamp != null) { 4100 protocol.writeFieldBegin("timestamp", 1, TType.STRING); 4101 protocol.writeString(this.timestamp); 4102 protocol.writeFieldEnd(); 4103 } 4104 protocol.writeFieldStop(); 4105 protocol.writeStructEnd(); 4106 } 4107 4108 @Override 4109 protected List<String> receive(Protocol protocol, MessageMetadata metadata) throws Exception { 4110 List<String> result = null; 4111 ServiceRuntimeException ex1 = null; 4112 protocol.readStructBegin(); 4113 while (true) { 4114 FieldMetadata field = protocol.readFieldBegin(); 4115 if (field.typeId == TType.STOP) { 4116 break; 4117 } 4118 switch (field.fieldId) { 4119 case 0: { 4120 if (field.typeId == TType.LIST) { 4121 ListMetadata listMetadata0 = protocol.readListBegin(); 4122 List<String> value = new ArrayList<String>(listMetadata0.size); 4123 for (int i0 = 0; i0 < listMetadata0.size; ++i0) { 4124 String item0 = protocol.readString(); 4125 value.add(item0); 4126 } 4127 protocol.readListEnd(); 4128 result = value; 4129 } else { 4130 ProtocolUtil.skip(protocol, field.typeId); 4131 } 4132 } 4133 break; 4134 case 1: { 4135 if (field.typeId == TType.STRUCT) { 4136 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 4137 ex1 = value; 4138 } else { 4139 ProtocolUtil.skip(protocol, field.typeId); 4140 } 4141 } 4142 break; 4143 default: ProtocolUtil.skip(protocol, field.typeId); break; 4144 } 4145 protocol.readFieldEnd(); 4146 } 4147 protocol.readStructEnd(); 4148 if (result != null) { 4149 return result; 4150 } else if (ex1 != null) { 4151 throw ex1; 4152 } else { 4153 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 4154 } 4155 } 4156 } 4157 4158 private static final class LoadImagesMd5ByWhereCall extends MethodCall<List<String>> { 4159 private final String where; 4160 4161 LoadImagesMd5ByWhereCall(String where, ServiceMethodCallback<List<String>> callback) { 4162 super("loadImagesMd5ByWhere", TMessageType.CALL, callback); 4163 this.where = where; 4164 } 4165 4166 @Override 4167 protected void send(Protocol protocol) throws IOException { 4168 protocol.writeStructBegin("args"); 4169 if (this.where != null) { 4170 protocol.writeFieldBegin("where", 1, TType.STRING); 4171 protocol.writeString(this.where); 4172 protocol.writeFieldEnd(); 4173 } 4174 protocol.writeFieldStop(); 4175 protocol.writeStructEnd(); 4176 } 4177 4178 @Override 4179 protected List<String> receive(Protocol protocol, MessageMetadata metadata) throws Exception { 4180 List<String> result = null; 4181 ServiceRuntimeException ex1 = null; 4182 protocol.readStructBegin(); 4183 while (true) { 4184 FieldMetadata field = protocol.readFieldBegin(); 4185 if (field.typeId == TType.STOP) { 4186 break; 4187 } 4188 switch (field.fieldId) { 4189 case 0: { 4190 if (field.typeId == TType.LIST) { 4191 ListMetadata listMetadata0 = protocol.readListBegin(); 4192 List<String> value = new ArrayList<String>(listMetadata0.size); 4193 for (int i0 = 0; i0 < listMetadata0.size; ++i0) { 4194 String item0 = protocol.readString(); 4195 value.add(item0); 4196 } 4197 protocol.readListEnd(); 4198 result = value; 4199 } else { 4200 ProtocolUtil.skip(protocol, field.typeId); 4201 } 4202 } 4203 break; 4204 case 1: { 4205 if (field.typeId == TType.STRUCT) { 4206 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 4207 ex1 = value; 4208 } else { 4209 ProtocolUtil.skip(protocol, field.typeId); 4210 } 4211 } 4212 break; 4213 default: ProtocolUtil.skip(protocol, field.typeId); break; 4214 } 4215 protocol.readFieldEnd(); 4216 } 4217 protocol.readStructEnd(); 4218 if (result != null) { 4219 return result; 4220 } else if (ex1 != null) { 4221 throw ex1; 4222 } else { 4223 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 4224 } 4225 } 4226 } 4227 4228 private static final class SearchFacesCall extends MethodCall<List<SearchResult>> { 4229 private final ByteString imgData; 4230 4231 private final CodeInfo facePos; 4232 4233 private final Double similarty; 4234 4235 private final Integer rows; 4236 4237 private final String where; 4238 4239 SearchFacesCall(ByteString imgData, CodeInfo facePos, Double similarty, Integer rows, 4240 String where, ServiceMethodCallback<List<SearchResult>> callback) { 4241 super("searchFaces", TMessageType.CALL, callback); 4242 this.imgData = imgData; 4243 this.facePos = facePos; 4244 if (similarty == null) throw new NullPointerException("similarty"); 4245 this.similarty = similarty; 4246 if (rows == null) throw new NullPointerException("rows"); 4247 this.rows = rows; 4248 this.where = where; 4249 } 4250 4251 @Override 4252 protected void send(Protocol protocol) throws IOException { 4253 protocol.writeStructBegin("args"); 4254 if (this.imgData != null) { 4255 protocol.writeFieldBegin("imgData", 1, TType.STRING); 4256 protocol.writeBinary(this.imgData); 4257 protocol.writeFieldEnd(); 4258 } 4259 if (this.facePos != null) { 4260 protocol.writeFieldBegin("facePos", 2, TType.STRUCT); 4261 net.gdface.facedb.thrift.client.CodeInfo.ADAPTER.write(protocol, this.facePos); 4262 protocol.writeFieldEnd(); 4263 } 4264 protocol.writeFieldBegin("similarty", 3, TType.DOUBLE); 4265 protocol.writeDouble(this.similarty); 4266 protocol.writeFieldEnd(); 4267 protocol.writeFieldBegin("rows", 4, TType.I32); 4268 protocol.writeI32(this.rows); 4269 protocol.writeFieldEnd(); 4270 if (this.where != null) { 4271 protocol.writeFieldBegin("where", 5, TType.STRING); 4272 protocol.writeString(this.where); 4273 protocol.writeFieldEnd(); 4274 } 4275 protocol.writeFieldStop(); 4276 protocol.writeStructEnd(); 4277 } 4278 4279 @Override 4280 protected List<SearchResult> receive(Protocol protocol, MessageMetadata metadata) throws 4281 Exception { 4282 List<SearchResult> result = null; 4283 ImageErrorException ex1 = null; 4284 NotFaceDetectedException ex2 = null; 4285 ServiceRuntimeException ex3 = null; 4286 protocol.readStructBegin(); 4287 while (true) { 4288 FieldMetadata field = protocol.readFieldBegin(); 4289 if (field.typeId == TType.STOP) { 4290 break; 4291 } 4292 switch (field.fieldId) { 4293 case 0: { 4294 if (field.typeId == TType.LIST) { 4295 ListMetadata listMetadata0 = protocol.readListBegin(); 4296 List<SearchResult> value = new ArrayList<SearchResult>(listMetadata0.size); 4297 for (int i0 = 0; i0 < listMetadata0.size; ++i0) { 4298 net.gdface.facedb.thrift.client.SearchResult item0 = net.gdface.facedb.thrift.client.SearchResult.ADAPTER.read(protocol); 4299 value.add(item0); 4300 } 4301 protocol.readListEnd(); 4302 result = value; 4303 } else { 4304 ProtocolUtil.skip(protocol, field.typeId); 4305 } 4306 } 4307 break; 4308 case 1: { 4309 if (field.typeId == TType.STRUCT) { 4310 net.gdface.facedb.thrift.client.ImageErrorException value = net.gdface.facedb.thrift.client.ImageErrorException.ADAPTER.read(protocol); 4311 ex1 = value; 4312 } else { 4313 ProtocolUtil.skip(protocol, field.typeId); 4314 } 4315 } 4316 break; 4317 case 2: { 4318 if (field.typeId == TType.STRUCT) { 4319 net.gdface.facedb.thrift.client.NotFaceDetectedException value = net.gdface.facedb.thrift.client.NotFaceDetectedException.ADAPTER.read(protocol); 4320 ex2 = value; 4321 } else { 4322 ProtocolUtil.skip(protocol, field.typeId); 4323 } 4324 } 4325 break; 4326 case 3: { 4327 if (field.typeId == TType.STRUCT) { 4328 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 4329 ex3 = value; 4330 } else { 4331 ProtocolUtil.skip(protocol, field.typeId); 4332 } 4333 } 4334 break; 4335 default: ProtocolUtil.skip(protocol, field.typeId); break; 4336 } 4337 protocol.readFieldEnd(); 4338 } 4339 protocol.readStructEnd(); 4340 if (result != null) { 4341 return result; 4342 } else if (ex1 != null) { 4343 throw ex1; 4344 } else if (ex2 != null) { 4345 throw ex2; 4346 } else if (ex3 != null) { 4347 throw ex3; 4348 } else { 4349 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 4350 } 4351 } 4352 } 4353 4354 private static final class SearchFacesMatCall extends MethodCall<List<SearchResult>> { 4355 private final MatType matType; 4356 4357 private final ByteString matData; 4358 4359 private final Integer width; 4360 4361 private final Integer height; 4362 4363 private final CodeInfo facePos; 4364 4365 private final Double similarty; 4366 4367 private final Integer rows; 4368 4369 private final String where; 4370 4371 SearchFacesMatCall(MatType matType, ByteString matData, Integer width, Integer height, 4372 CodeInfo facePos, Double similarty, Integer rows, String where, 4373 ServiceMethodCallback<List<SearchResult>> callback) { 4374 super("searchFacesMat", TMessageType.CALL, callback); 4375 this.matType = matType; 4376 this.matData = matData; 4377 if (width == null) throw new NullPointerException("width"); 4378 this.width = width; 4379 if (height == null) throw new NullPointerException("height"); 4380 this.height = height; 4381 this.facePos = facePos; 4382 if (similarty == null) throw new NullPointerException("similarty"); 4383 this.similarty = similarty; 4384 if (rows == null) throw new NullPointerException("rows"); 4385 this.rows = rows; 4386 this.where = where; 4387 } 4388 4389 @Override 4390 protected void send(Protocol protocol) throws IOException { 4391 protocol.writeStructBegin("args"); 4392 if (this.matType != null) { 4393 protocol.writeFieldBegin("matType", 1, TType.I32); 4394 protocol.writeI32(this.matType.value); 4395 protocol.writeFieldEnd(); 4396 } 4397 if (this.matData != null) { 4398 protocol.writeFieldBegin("matData", 2, TType.STRING); 4399 protocol.writeBinary(this.matData); 4400 protocol.writeFieldEnd(); 4401 } 4402 protocol.writeFieldBegin("width", 3, TType.I32); 4403 protocol.writeI32(this.width); 4404 protocol.writeFieldEnd(); 4405 protocol.writeFieldBegin("height", 4, TType.I32); 4406 protocol.writeI32(this.height); 4407 protocol.writeFieldEnd(); 4408 if (this.facePos != null) { 4409 protocol.writeFieldBegin("facePos", 5, TType.STRUCT); 4410 net.gdface.facedb.thrift.client.CodeInfo.ADAPTER.write(protocol, this.facePos); 4411 protocol.writeFieldEnd(); 4412 } 4413 protocol.writeFieldBegin("similarty", 6, TType.DOUBLE); 4414 protocol.writeDouble(this.similarty); 4415 protocol.writeFieldEnd(); 4416 protocol.writeFieldBegin("rows", 7, TType.I32); 4417 protocol.writeI32(this.rows); 4418 protocol.writeFieldEnd(); 4419 if (this.where != null) { 4420 protocol.writeFieldBegin("where", 8, TType.STRING); 4421 protocol.writeString(this.where); 4422 protocol.writeFieldEnd(); 4423 } 4424 protocol.writeFieldStop(); 4425 protocol.writeStructEnd(); 4426 } 4427 4428 @Override 4429 protected List<SearchResult> receive(Protocol protocol, MessageMetadata metadata) throws 4430 Exception { 4431 List<SearchResult> result = null; 4432 NotFaceDetectedException ex1 = null; 4433 ServiceRuntimeException ex2 = null; 4434 protocol.readStructBegin(); 4435 while (true) { 4436 FieldMetadata field = protocol.readFieldBegin(); 4437 if (field.typeId == TType.STOP) { 4438 break; 4439 } 4440 switch (field.fieldId) { 4441 case 0: { 4442 if (field.typeId == TType.LIST) { 4443 ListMetadata listMetadata0 = protocol.readListBegin(); 4444 List<SearchResult> value = new ArrayList<SearchResult>(listMetadata0.size); 4445 for (int i0 = 0; i0 < listMetadata0.size; ++i0) { 4446 net.gdface.facedb.thrift.client.SearchResult item0 = net.gdface.facedb.thrift.client.SearchResult.ADAPTER.read(protocol); 4447 value.add(item0); 4448 } 4449 protocol.readListEnd(); 4450 result = value; 4451 } else { 4452 ProtocolUtil.skip(protocol, field.typeId); 4453 } 4454 } 4455 break; 4456 case 1: { 4457 if (field.typeId == TType.STRUCT) { 4458 net.gdface.facedb.thrift.client.NotFaceDetectedException value = net.gdface.facedb.thrift.client.NotFaceDetectedException.ADAPTER.read(protocol); 4459 ex1 = value; 4460 } else { 4461 ProtocolUtil.skip(protocol, field.typeId); 4462 } 4463 } 4464 break; 4465 case 2: { 4466 if (field.typeId == TType.STRUCT) { 4467 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 4468 ex2 = value; 4469 } else { 4470 ProtocolUtil.skip(protocol, field.typeId); 4471 } 4472 } 4473 break; 4474 default: ProtocolUtil.skip(protocol, field.typeId); break; 4475 } 4476 protocol.readFieldEnd(); 4477 } 4478 protocol.readStructEnd(); 4479 if (result != null) { 4480 return result; 4481 } else if (ex1 != null) { 4482 throw ex1; 4483 } else if (ex2 != null) { 4484 throw ex2; 4485 } else { 4486 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 4487 } 4488 } 4489 } 4490 4491 private static final class SearchFeaturesCall extends MethodCall<List<SearchResult>> { 4492 private final ByteString feature; 4493 4494 private final Double similarty; 4495 4496 private final Integer rows; 4497 4498 private final String where; 4499 4500 SearchFeaturesCall(ByteString feature, Double similarty, Integer rows, String where, 4501 ServiceMethodCallback<List<SearchResult>> callback) { 4502 super("searchFeatures", TMessageType.CALL, callback); 4503 this.feature = feature; 4504 if (similarty == null) throw new NullPointerException("similarty"); 4505 this.similarty = similarty; 4506 if (rows == null) throw new NullPointerException("rows"); 4507 this.rows = rows; 4508 this.where = where; 4509 } 4510 4511 @Override 4512 protected void send(Protocol protocol) throws IOException { 4513 protocol.writeStructBegin("args"); 4514 if (this.feature != null) { 4515 protocol.writeFieldBegin("feature", 1, TType.STRING); 4516 protocol.writeBinary(this.feature); 4517 protocol.writeFieldEnd(); 4518 } 4519 protocol.writeFieldBegin("similarty", 2, TType.DOUBLE); 4520 protocol.writeDouble(this.similarty); 4521 protocol.writeFieldEnd(); 4522 protocol.writeFieldBegin("rows", 3, TType.I32); 4523 protocol.writeI32(this.rows); 4524 protocol.writeFieldEnd(); 4525 if (this.where != null) { 4526 protocol.writeFieldBegin("where", 4, TType.STRING); 4527 protocol.writeString(this.where); 4528 protocol.writeFieldEnd(); 4529 } 4530 protocol.writeFieldStop(); 4531 protocol.writeStructEnd(); 4532 } 4533 4534 @Override 4535 protected List<SearchResult> receive(Protocol protocol, MessageMetadata metadata) throws 4536 Exception { 4537 List<SearchResult> result = null; 4538 ServiceRuntimeException ex1 = null; 4539 protocol.readStructBegin(); 4540 while (true) { 4541 FieldMetadata field = protocol.readFieldBegin(); 4542 if (field.typeId == TType.STOP) { 4543 break; 4544 } 4545 switch (field.fieldId) { 4546 case 0: { 4547 if (field.typeId == TType.LIST) { 4548 ListMetadata listMetadata0 = protocol.readListBegin(); 4549 List<SearchResult> value = new ArrayList<SearchResult>(listMetadata0.size); 4550 for (int i0 = 0; i0 < listMetadata0.size; ++i0) { 4551 net.gdface.facedb.thrift.client.SearchResult item0 = net.gdface.facedb.thrift.client.SearchResult.ADAPTER.read(protocol); 4552 value.add(item0); 4553 } 4554 protocol.readListEnd(); 4555 result = value; 4556 } else { 4557 ProtocolUtil.skip(protocol, field.typeId); 4558 } 4559 } 4560 break; 4561 case 1: { 4562 if (field.typeId == TType.STRUCT) { 4563 net.gdface.facedb.thrift.client.ServiceRuntimeException value = net.gdface.facedb.thrift.client.ServiceRuntimeException.ADAPTER.read(protocol); 4564 ex1 = value; 4565 } else { 4566 ProtocolUtil.skip(protocol, field.typeId); 4567 } 4568 } 4569 break; 4570 default: ProtocolUtil.skip(protocol, field.typeId); break; 4571 } 4572 protocol.readFieldEnd(); 4573 } 4574 protocol.readStructEnd(); 4575 if (result != null) { 4576 return result; 4577 } else if (ex1 != null) { 4578 throw ex1; 4579 } else { 4580 throw new ThriftException(ThriftException.Kind.MISSING_RESULT, "Missing result"); 4581 } 4582 } 4583 } 4584}