List of usage examples for org.springframework.expression TypedValue NULL
TypedValue NULL
To view the source code for org.springframework.expression TypedValue NULL.
Click Source Link
From source file:org.echocat.redprecursor.annotations.utils.MapPropertyAccessor.java
@Override public TypedValue read(EvaluationContext context, Object target, String name) throws AccessException { final Object plainValue = target instanceof Map ? ((Map) target).get(name) : null; return plainValue != null ? new TypedValue(plainValue) : TypedValue.NULL; }
From source file:com.joyveb.dbpimpl.cass.prepare.convert.RowReaderPropertyAccessor.java
public TypedValue read(EvaluationContext context, Object target, String name) { Row row = (Row) target;//from w w w. j a v a 2 s .c om if (row.isNull(name)) { return TypedValue.NULL; } DataType columnType = row.getColumnDefinitions().getType(name); ByteBuffer bytes = row.getBytes(name); Object object = columnType.deserialize(bytes); return new TypedValue(object); }
From source file:io.twipple.springframework.data.clusterpoint.convert.ClusterpointDocumentPropertyAccessor.java
/** * Read the value from the property./*from w w w .java2 s.c o m*/ * * @param context the evaluation context. * @param target the target object. * @param name the name of the property. * @return the typed value of the content to be read. */ @Override public TypedValue read(@NotNull EvaluationContext context, @NotNull Object target, @NotNull String name) { Assert.notNull(context); Assert.notNull(target); Assert.isInstanceOf(ClusterpointDocument.class, target); Assert.hasText(name); ClusterpointDocument source = (ClusterpointDocument) target; Object value = source.read(context, name); return value == null ? TypedValue.NULL : new TypedValue(value); }