Converts protobuf Proposal object to Transaction object.

@param prop the protobuf Proposal object.
@return the Transaction object.
515750
public static Transaction fromProposal(Proposal prop) {
    Zxid zxid = fromProtoZxid(prop.getZxid());
    ByteBuffer buffer = prop.getBody().asReadOnlyByteBuffer();
    return new Transaction(zxid, prop.getType().getNumber(), buffer);
  }
105099
@InternalApi
  public static Instance fromProto(@Nonnull com.google.bigtable.admin.v2.Instance proto) {
    return new Instance(proto);
  }
1081969
public static <T> T convertPublisher(Object object, Class<T> publisherType) {
        Objects.requireNonNull(object, "Invalid argument [object]: " + object);
        Objects.requireNonNull(object, "Invalid argument [publisherType]: " + publisherType);
        if (object instanceof CompletableFuture) {
            @SuppressWarnings("unchecked") Publisher<T> futurePublisher = (Publisher<T>) Publishers.fromCompletableFuture(() -> ((CompletableFuture) object));
            return ConversionService.SHARED.convert(futurePublisher, publisherType)
                    .orElseThrow(() -> new IllegalArgumentException("Unsupported Reactive type: " + object.getClass()));
        } else {
            return ConversionService.SHARED.convert(object, publisherType)
                    .orElseThrow(() -> new IllegalArgumentException("Unsupported Reactive type: " + object.getClass()));
        }
    }
891492
@SuppressWarnings("unchecked")
    public static <T> T getPropValue(final Object entity, final String propName) {
        return getPropValue(entity, propName, false);
    }
764357
function movePropDefsToProto(proto) {
        var stype = proto.entityType || proto.complexType;
        var ctor = proto.constructor;
        if (!ctor){
            throw new Error("No type constructor for EntityType = "+stype.name);
        }
        addResetFn(ctor);
        stype.getProperties().forEach(function(prop) {
            var propName = prop.name;
            if (propName in proto) {
                wrapPrototypeProperty(proto, prop);
            } else {
                wrapInstanceProperty(proto, prop);
            }
        });
    }
602363
private OpenConnection.Property convertToProperty(Map.Entry<String, String> entry) {
        OpenConnection.Property property = new OpenConnection.Property();
        property.setName(entry.getKey());
        property.setValue(entry.getValue());
        return property;
    }
74008
public Object get(String propName) {
        if (propName.equals("repositoryId")) {
            return getRepositoryId();
        }
        if (propName.equals("repositoryCheckPoint")) {
            return getRepositoryCheckPoint();
        }
        return null;
    }
483252
public Object copy(final Object obj, final PersistenceBroker broker)
    {
        return clone(obj, IdentityMapFactory.getIdentityMap(), broker);
    }
925234
public static TransactionException invalidPropertyUse(Concept concept, Schema.VertexProperty property) {
        return create(INVALID_PROPERTY_USE.getMessage(concept, property));
    }
178417
def _to_protobuf(self):
        
        projection = self._normalize_projection(self._projection)
        orders = self._normalize_orders()
        start_at = self._normalize_cursor(self._start_at, orders)
        end_at = self._normalize_cursor(self._end_at, orders)

        query_kwargs = {
            "select": projection,
            "from": [
                query_pb2.StructuredQuery.CollectionSelector(
                    collection_id=self._parent.id
                )
            ],
            "where": self._filters_pb(),
            "order_by": orders,
            "start_at": _cursor_pb(start_at),
            "end_at": _cursor_pb(end_at),
        }
        if self._offset is not None:
            query_kwargs["offset"] = self._offset
        if self._limit is not None:
            query_kwargs["limit"] = wrappers_pb2.Int32Value(value=self._limit)

        return query_pb2.StructuredQuery(**query_kwargs)
1056368
public static TtlAction fromProtobuf(PTtlAction pTtlAction) {
    if (pTtlAction == null) {
      return TtlAction.DELETE;
    }
    switch (pTtlAction) {
      case DELETE:
        return TtlAction.DELETE;
      case FREE:
        return TtlAction.FREE;
      default:
        throw new IllegalStateException("Unknown protobuf ttl action: " + pTtlAction);
    }
  }
14429
public static Object convertProperty(Object dynaPropVal) {
        Object propertyValue = null;
        if (dynaPropVal == null) {
            throw new IllegalArgumentException("Unable to convertProperty on null object.");
        }
        Class<?> propClass = dynaPropVal.getClass();
        String propName = propClass.getName();
        //Check the dynamic propery for ArrayOfXXX object
        if (propName.contains("ArrayOf")) {
            String methodName = propName.substring(propName.indexOf("ArrayOf") + "ArrayOf".length());
            // If object is ArrayOfXXX object, then get the XXX[] by invoking getXXX() on the object. For Ex:
            // ArrayOfManagedObjectReference.getManagedObjectReference() returns ManagedObjectReference[] array.
            try {
                Method getMethod;
                try {
                    getMethod = propClass.getMethod("get" + methodName, (Class[]) null);
                }
                catch (NoSuchMethodException ignore) {
                    getMethod = propClass.getMethod("get_" + methodName.toLowerCase(), (Class[]) null);
                }
                propertyValue = getMethod.invoke(dynaPropVal, (Object[]) null);
            }
            catch (Exception e) {
                log.error("Exception caught trying to convertProperty", e);
            }
        }
        //Handle the case of an unwrapped array being deserialized.
        else if (dynaPropVal.getClass().isArray()) {
            propertyValue = dynaPropVal;
        }
        else {
            propertyValue = dynaPropVal;
        }

        return propertyValue;
    }
482388
public <T> T getStaticPropertyValue(String propName, Class<T> type) {
        return ClassPropertyFetcher.getStaticPropertyValue(getClazz(), propName, type);
    }
39543
public static Boolean getSeqOrderValue(Properties prop)
    {
        String result = prop.getProperty(PROP_SEQ_ORDER, null);
        if(result != null)
        {
            return Boolean.valueOf(result);
        }
        else
        {
            return null;
        }
    }
604842
public static void setPropValue(final Object entity, final String propName, final Object propValue) {
        setPropValue(entity, propName, propValue, false);
    }
1020715
def _ConvertDataPropertyType(self, propType):
      
      if propType:
         name = propType.name
         version = propType.version
         aType = propType.type
         flags = self._ConvertAnnotations(propType.annotation)
         prop = (name, aType, version, flags)
      else:
         prop = None
      return prop
1187997
public static Method getPropSetMethod(final Class<?> cls, final String propName) {
        Map<String, Method> propSetMethodMap = entityPropSetMethodPool.get(cls);

        if (propSetMethodMap == null) {
            loadPropGetSetMethodList(cls);
            propSetMethodMap = entityPropSetMethodPool.get(cls);
        }

        Method method = propSetMethodMap.get(propName);

        if (method == null) {
            synchronized (entityDeclaredPropGetMethodPool) {
                Map<String, Method> setterMethodList = getPropSetMethodList(cls);

                for (String key : setterMethodList.keySet()) {
                    if (isPropName(cls, propName, key)) {
                        method = propSetMethodMap.get(key);

                        break;
                    }
                }

                if ((method == null) && !propName.equalsIgnoreCase(formalizePropName(propName))) {
                    method = getPropSetMethod(cls, formalizePropName(propName));
                }

                // set method mask to avoid query next time.
                if (method == null) {
                    method = METHOD_MASK;
                }

                propSetMethodMap.put(propName, method);
            }
        }

        return (method == METHOD_MASK) ? null : method;
    }