Package com.zb.mom.ww.mxgateway.client
Class MxValues
java.lang.Object
com.zb.mom.ww.mxgateway.client.MxValues
Factory helpers for building
MxaccessGateway.MxValue and MxaccessGateway.MxArray protobuf
messages and for converting them back into native Java types.
Each *Value factory sets the matching MxDataType and
COM variant type string so the worker can round-trip the value
through MXAccess without further coercion.
-
Method Summary
Modifier and TypeMethodDescriptionstatic MxaccessGateway.MxValueboolValue(boolean value) Builds a booleanMxaccessGateway.MxValue.static MxaccessGateway.MxValuedoubleValue(double value) Builds a 64-bit floating-pointMxaccessGateway.MxValue.static MxaccessGateway.MxValuefloatValue(float value) Builds a 32-bit floating-pointMxaccessGateway.MxValue.static MxaccessGateway.MxArrayint32Array(List<Integer> values) Builds anMxaccessGateway.MxArrayof 32-bit integers.static MxaccessGateway.MxValueint32Value(int value) Builds a 32-bit integerMxaccessGateway.MxValue.static MxaccessGateway.MxValueint64Value(long value) Builds a 64-bit integerMxaccessGateway.MxValue.static StringkindName(MxaccessGateway.MxValue value) Returns a stable name for theMxaccessGateway.MxValuekind, useful for logs.static ObjectConverts anMxaccessGateway.MxArrayinto a native JavaList.static ObjectConverts anMxaccessGateway.MxValueback into a native Java value.static MxaccessGateway.MxArraystringArray(List<String> values) Builds anMxaccessGateway.MxArrayof strings.static MxaccessGateway.MxValuestringValue(String value) Builds a stringMxaccessGateway.MxValue.static MxaccessGateway.MxValuetimestampValue(Instant value) Builds a timestampMxaccessGateway.MxValuefrom anInstant.
-
Method Details
-
boolValue
Builds a booleanMxaccessGateway.MxValue.- Parameters:
value- the boolean payload- Returns:
- a populated
MxValue
-
int32Value
Builds a 32-bit integerMxaccessGateway.MxValue.- Parameters:
value- the int32 payload- Returns:
- a populated
MxValue
-
int64Value
Builds a 64-bit integerMxaccessGateway.MxValue.- Parameters:
value- the int64 payload- Returns:
- a populated
MxValue
-
floatValue
Builds a 32-bit floating-pointMxaccessGateway.MxValue.- Parameters:
value- the float payload- Returns:
- a populated
MxValue
-
doubleValue
Builds a 64-bit floating-pointMxaccessGateway.MxValue.- Parameters:
value- the double payload- Returns:
- a populated
MxValue
-
stringValue
Builds a stringMxaccessGateway.MxValue.- Parameters:
value- the string payload- Returns:
- a populated
MxValue
-
timestampValue
Builds a timestampMxaccessGateway.MxValuefrom anInstant.- Parameters:
value- the instant to encode as MXAccess time- Returns:
- a populated
MxValue
-
nativeValue
Converts anMxaccessGateway.MxValueback into a native Java value.- Parameters:
value- the MXAccess value, may benullor marked as null- Returns:
- the boxed primitive,
String,Instant, byte array,Listof array elements, ornullwhen the value carries no payload
-
nativeArray
Converts anMxaccessGateway.MxArrayinto a native JavaList.- Parameters:
array- the MXAccess array, may benull- Returns:
- a list of boxed primitives, strings, instants, or byte arrays;
an empty list when the array carries no elements;
nullwhenarrayisnull
-
stringArray
Builds anMxaccessGateway.MxArrayof strings.- Parameters:
values- the string elements; the resulting array carries the size as a single dimension- Returns:
- a populated
MxArray
-
int32Array
Builds anMxaccessGateway.MxArrayof 32-bit integers.- Parameters:
values- the int32 elements; the resulting array carries the size as a single dimension- Returns:
- a populated
MxArray
-
kindName
Returns a stable name for theMxaccessGateway.MxValuekind, useful for logs.- Parameters:
value- the MXAccess value, may benull- Returns:
- the
KindCasename, or"KIND_NOT_SET"whenvalueisnull
-