protected BlobInfo getBlobInfo(T state) throws PropertyException { BlobInfo blobInfo = new BlobInfo(); blobInfo.key = (String) state.getSingle(BLOB_DATA); blobInfo.filename = (String) state.getSingle(BLOB_NAME); blobInfo.mimeType = (String) state.getSingle(BLOB_MIME_TYPE); blobInfo.encoding = (String) state.getSingle(BLOB_ENCODING); blobInfo.digest = (String) state.getSingle(BLOB_DIGEST); blobInfo.length = (Long) state.getSingle(BLOB_LENGTH); return blobInfo; }
protected void setBlobInfo(T state, BlobInfo blobInfo) throws PropertyException { state.setSingle(BLOB_DATA, blobInfo.key); state.setSingle(BLOB_NAME, blobInfo.filename); state.setSingle(BLOB_MIME_TYPE, blobInfo.mimeType); state.setSingle(BLOB_ENCODING, blobInfo.encoding); state.setSingle(BLOB_DIGEST, blobInfo.digest); state.setSingle(BLOB_LENGTH, blobInfo.length); }
boolean equals; if (type.isSimpleType()) { Object oldValue = state.getSingle(name); equals = Objects.deepEquals(value, oldValue); } else if (type.isListType() && ((ListType) type).getFieldType().isSimpleType()) { Object[] oldValue = state.getArray(name); if (value == null && oldValue != null && oldValue.length == 0) {