org.camunda.bpm.engine.variable.Variables.shortValue()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(111)

本文整理了Java中org.camunda.bpm.engine.variable.Variables.shortValue()方法的一些代码示例,展示了Variables.shortValue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Variables.shortValue()方法的具体详情如下:
包路径:org.camunda.bpm.engine.variable.Variables
类名称:Variables
方法名:shortValue

Variables.shortValue介绍

[英]Creates a new ShortValue that encapsulates the given shortValue
[中]创建一个新的ShortValue,用于封装给定的shortValue

代码示例

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * Creates a new {@link ShortValue} that encapsulates the given <code>shortValue</code>
 */
public static ShortValue shortValue(Short shortValue) {
 return shortValue(shortValue, false);
}

代码示例来源:origin: camunda/camunda-bpm-platform

public ShortValue createValue(Object value, Map<String, Object> valueInfo) {
 return Variables.shortValue((Short) value, isTransient(valueInfo));
}

代码示例来源:origin: camunda/camunda-bpm-platform

public ShortValue readValue(ValueFields valueFields) {
 Long longValue = valueFields.getLongValue();
 Short shortValue = null;
 if(longValue != null) {
  shortValue = Short.valueOf(longValue.shortValue());
 }
 return Variables.shortValue(shortValue);
}

代码示例来源:origin: camunda/camunda-bpm-platform

public ShortValue readValue(ValueFields valueFields) {
 Long longValue = valueFields.getLongValue();
 Short shortValue = null;
 if(longValue != null) {
  shortValue = Short.valueOf(longValue.shortValue());
 }
 return Variables.shortValue(shortValue);
}

代码示例来源:origin: camunda/camunda-bpm-platform

public ShortValue convertToTypedValue(UntypedValueImpl untypedValue) {
 return Variables.shortValue((Short) untypedValue.getValue(), untypedValue.isTransient());
}

代码示例来源:origin: camunda/camunda-bpm-platform

public ShortValue convertToTypedValue(UntypedValueImpl untypedValue) {
 return Variables.shortValue((Short) untypedValue.getValue(), untypedValue.isTransient());
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Override
public ShortValue convertFromTypedValue(TypedValue typedValue) {
 if (typedValue.getType() != ValueType.NUMBER) {
  throw unsupportedConversion(typedValue.getType());
 }
 ShortValueImpl shortValue = null;
 NumberValue numberValue = (NumberValue) typedValue;
 if (numberValue.getValue() != null) {
  shortValue = (ShortValueImpl) Variables.shortValue(numberValue.getValue().shortValue());
 } else {
  shortValue =  (ShortValueImpl) Variables.shortValue(null);
 }
 shortValue.setTransient(numberValue.isTransient());
 return shortValue;
}

代码示例来源:origin: org.camunda.commons/camunda-commons-typed-values

/**
 * Creates a new {@link ShortValue} that encapsulates the given <code>shortValue</code>
 */
public static ShortValue shortValue(Short shortValue) {
 return shortValue(shortValue, false);
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Parameters(name = "{index}: variable = {0}")
public static Collection<Object[]> data() {
 return Arrays
   .asList(new Object[][] {
    { Variables.stringValue("a"), Variables.stringValue(null) },
    { Variables.booleanValue(true), Variables.booleanValue(null) },
    { Variables.integerValue(4), Variables.integerValue(null) },
    { Variables.shortValue((short) 2), Variables.shortValue(null) },
    { Variables.longValue(6L), Variables.longValue(null) },
    { Variables.doubleValue(4.2), Variables.doubleValue(null) },
    { Variables.dateValue(new Date()), Variables.dateValue(null) }
   });
}

代码示例来源:origin: org.camunda.commons/camunda-commons-typed-values

public ShortValue createValue(Object value, Map<String, Object> valueInfo) {
 return Variables.shortValue((Short) value, isTransient(valueInfo));
}

代码示例来源:origin: camunda/camunda-bpm-platform

.putValue("f", Variables.integerValue(10, true))
.putValue("g", Variables.longValue((long) 10, true))
.putValue("h", Variables.shortValue((short) 10, true))
.putValue("i", Variables.objectValue(new Integer(100), true).create())
.putValue("j", Variables.untypedValue(null, true))

代码示例来源:origin: camunda/camunda-bpm-platform

.putValueTyped("f", Variables.integerValue(10, true))
.putValueTyped("g", Variables.longValue((long) 10, true))
.putValueTyped("h", Variables.shortValue((short) 10, true))
.putValueTyped("i", Variables.objectValue(new Integer(100), true).create())
.putValueTyped("j", Variables.untypedValue(null, true))

代码示例来源:origin: org.camunda.bpm/camunda-engine

public ShortValue readValue(ValueFields valueFields) {
 Long longValue = valueFields.getLongValue();
 Short shortValue = null;
 if(longValue != null) {
  shortValue = new Short(longValue.shortValue());
 }
 return Variables.shortValue(shortValue);
}

代码示例来源:origin: org.camunda.bpm/camunda-engine

public ShortValue convertToTypedValue(UntypedValueImpl untypedValue) {
 return Variables.shortValue((Short) untypedValue.getValue(), untypedValue.isTransient());
}

代码示例来源:origin: org.camunda.commons/camunda-commons-typed-values

@Override
public ShortValue convertFromTypedValue(TypedValue typedValue) {
 if (typedValue.getType() != ValueType.NUMBER) {
  throw unsupportedConversion(typedValue.getType());
 }
 ShortValueImpl shortValue = null;
 NumberValue numberValue = (NumberValue) typedValue;
 if (numberValue.getValue() != null) {
  shortValue = (ShortValueImpl) Variables.shortValue(numberValue.getValue().shortValue());
 } else {
  shortValue =  (ShortValueImpl) Variables.shortValue(null);
 }
 shortValue.setTransient(numberValue.isTransient());
 return shortValue;
}

代码示例来源:origin: org.camunda.bpm/camunda-engine

@Parameters(name = "{index}: variable = {0}")
public static Collection<Object[]> data() {
 return Arrays
   .asList(new Object[][] {
    { Variables.stringValue("a"), Variables.stringValue(null) },
    { Variables.booleanValue(true), Variables.booleanValue(null) },
    { Variables.integerValue(4), Variables.integerValue(null) },
    { Variables.shortValue((short) 2), Variables.shortValue(null) },
    { Variables.longValue(6L), Variables.longValue(null) },
    { Variables.doubleValue(4.2), Variables.doubleValue(null) },
    { Variables.dateValue(new Date()), Variables.dateValue(null) }
   });
}

代码示例来源:origin: org.camunda.bpm/camunda-engine

.putValue("f", Variables.integerValue(10, true))
.putValue("g", Variables.longValue((long) 10, true))
.putValue("h", Variables.shortValue((short) 10, true))
.putValue("i", Variables.objectValue(new Integer(100), true).create())
.putValue("j", Variables.untypedValue(null, true))

代码示例来源:origin: org.camunda.bpm/camunda-engine

.putValueTyped("f", Variables.integerValue(10, true))
.putValueTyped("g", Variables.longValue((long) 10, true))
.putValueTyped("h", Variables.shortValue((short) 10, true))
.putValueTyped("i", Variables.objectValue(new Integer(100), true).create())
.putValueTyped("j", Variables.untypedValue(null, true))

相关文章