예제 #1
0
 /**
  * Convert DeleteAction to DeleteActionProto.
  *
  * @param action
  * @return
  */
 public static DeleteActionProto convert(DeleteAction action) {
   DeleteActionProto.Builder builder = DeleteActionProto.newBuilder();
   builder.setTableName(action.getFTableName());
   builder.setPrimayKey(ByteString.copyFrom(action.getCombinedPrimaryKey()));
   return builder.build();
 }
예제 #2
0
 /**
  * convert DeleteActionProto to DeleteAction.
  *
  * @param proto
  * @return
  */
 public static DeleteAction convert(DeleteActionProto deleteActionProto) {
   return new DeleteAction(
       deleteActionProto.getTableName(), deleteActionProto.getPrimayKey().toByteArray());
 }