John Blum
55076c59cd
Upgrade to Spring Session for Apache Geode & Pivotal GemFire 2.3.0.RC2.
...
Upgrade to Spring Session BOM Dragonfruit-RC2.
2020-05-13 22:49:10 -07:00
John Blum
661b0c1be2
Upgrade to Spring Data Neumann-RC2.
...
Upgrade to Spring Data for Apache Geode & Pivotal GemFire 2.3.0.RC2.
Upgrade to Spring Data Release Train Neumann-RC2.
2020-05-13 22:47:32 -07:00
John Blum
4642c66678
Upgrade to Byte Buddy 1.10.10.
2020-05-13 22:45:16 -07:00
John Blum
83c944a253
Add reference documentation for the new (JSON) Cache Data Import/Export feature.
...
Resolves gh-67.
2020-05-13 22:37:19 -07:00
John Blum
e67dc5e8d2
Switch to using SDG Annotation-based configuration for the "Books" Region on the client.
...
Technically, this means annotated the TestGeodeCientConfiguration with SDG's @EnableEntityDefinedRegions, which auto-magically defines and creates Region(s) from application entity classes.
Resolves gh-67.
2020-05-13 22:37:19 -07:00
John Blum
e3efabe476
Changes 'apache-geode-extensions' dependency from 'optional' to 'compile'.
2020-05-13 00:28:56 -07:00
John Blum
ae39191563
Fix invalid Javadoc tags.
2020-05-13 00:21:47 -07:00
John Blum
a63d792898
Add getAtIdentifier(:PdxInstance) method and strategy for resolving ids from PdxInstances.
...
Add postProcess(:PdxInstance) method to allow subclasses to override the method in order to post process the PdxInstance(s) generated from JSON.
Edit Javadoc.
Rename getIdField(:PdxInstance) to getId(:PdxInstance).
Resolves gh-67.
2020-05-13 00:13:26 -07:00
John Blum
2536585de9
Edit Javadoc.
...
Resolves gh-67.
2020-05-12 22:06:07 -07:00
John Blum
fa9b2e1ae6
Fix infinite recursion bug leading to a StackOverflowError.
...
Renamed the convertObjectToJson(:Object) method in the JSONFormatterPdxToJsonConverter class to convertPojoToJson(:Object).
Resolves gh-67.
2020-05-12 22:01:22 -07:00
John Blum
854a233b04
Rename PdxInstanceWrapperAspect to PdxInstanceWrapperRegionAspect.
...
Edit Javadoc.
Resolves gh-67.
2020-05-12 21:33:51 -07:00
John Blum
a6f07e88b0
Add Unit Tests for PdxInstanceWrapperAspect.
...
Resolve gh-67.
2020-05-12 21:29:32 -07:00
John Blum
f967675423
Add Spring Boot auto-configuration for cache data imports/exports.
...
Resolves gh-67.
2020-05-12 19:48:35 -07:00
John Blum
a513834fae
Add 'org.springframework.boot:spring-boot-starter-json' as test runtime dependency.
2020-05-12 19:45:49 -07:00
John Blum
39efd95a5c
Add protected, no-argument, default constructors.
2020-05-12 19:43:51 -07:00
John Blum
8fe13e01fb
Add descriptive convertJsonToPdx(..) conversion method.
...
Add protected jsonFormatterFromJson(..) method to encapsulate the invocation of the JSONFormatter.fromJSON(..) method.
Add wrap(:PdxInstance) method to wrap the PdxInstance generated from JSON in a new instance of PdxInstanceWrapper.
Resolves gh-67.
2020-05-12 19:41:06 -07:00
John Blum
eba12bad17
Configure Jackson ObjectMapper to find and register additional modules declared on the application's classpath.
...
Resolves gh-67.
2020-05-12 19:23:20 -07:00
John Blum
cc257f5ef9
Edit Javadoc.
...
Resolves gh-67.
2020-05-12 19:05:37 -07:00
John Blum
df466c0a62
Add PdxInstanceWrapper class to wrap (decorate) existing PdxInstances and more appropriately handle JSON to Object mappings returned by getObject().
2020-05-12 19:01:17 -07:00
John Blum
22b01985b7
Add Integration Tests for JsonCacheDataImporterExporter asserting the functionality in a client/server topology with a ClientCache.
...
Resolves gh-67.
2020-05-11 00:04:43 -07:00
John Blum
b1ec1dbab2
Delegate all cach instance operations to org.springframework.geode.util.CacheUtils.
2020-05-11 00:02:41 -07:00
John Blum
d4aa108414
Add abstract utility class for working with GemFire/Geode cache instances (ClientCache & peer Cache) and Regions.
2020-05-11 00:00:10 -07:00
John Blum
d8ede349cb
Add assertion that asserts a given Object (subject) is not null.
...
Edit Javadoc.
2020-05-10 22:28:28 -07:00
John Blum
f40685fb4e
Refactor JSONFormatterPdxToJsonConverter to handle missing type metadata in both PdxInstances and in JSON, which is required to reconstitute the Object.
...
Resolves gh-67.
2020-05-10 13:23:47 -07:00
John Blum
30a84eefdd
Add additional Integration Tests for JsonCacheDataImporterExporter class.
...
Added add test cases covering:
* exportImportWithRegionContainingMixOfObjectsAndPdxInstances
* geodeJsonFormatterCannotHandleTypedJsonObjects
* geodeJsonFormatterCannotRememberPdxInstanceClass
Edit Javadoc.
Resolves gh-67.
2020-05-10 00:26:59 -07:00
John Blum
7c65ad4320
Add PdxInstanceBuilder class used to create instances of PDX types (PdxInstance).
...
The Builder allows users to copy an existing PdxInstance to a new PdxInstance or create a PdxInstance from an Object.
2020-05-09 23:03:26 -07:00
John Blum
a4d452cfa4
Add SimpleCacheResolver class to resolve instances of GemFire/Geode ClientCaches and peer Caches.
2020-05-09 23:03:26 -07:00
John Blum
596ea093ba
Add null-safe asType(:Object, :Class) method to cast the given source Object into an instance of the given Class type.
2020-05-09 21:07:05 -07:00
John Blum
9dbd290322
Add Integration Tests for JsonCacheDataImporterExporter.
...
Resolves gh-67.
2020-05-08 01:45:05 -07:00
John Blum
a855787b66
Include Jackson JSON serializers for BigDecimals and BigIntegers as well as generating typeless Collection JSON.
...
Resolves gh-67.
2020-05-08 01:44:39 -07:00
John Blum
33458ab4be
Refactor POS PurchaseOrder application domain model class to include an identifyAs(:Long) builder method to set the ID of a PurchaseOrder instance.
...
Annotate the PurchaseOrder class with Jackson's JsonTypeInfo annotation.
Include statically defined Array and Map instance members for test purposes.
2020-05-08 01:42:56 -07:00
John Blum
4d7becad79
Simplify ObjectMapper configuration.
...
Remove activation of default typing configuration.
Change target Class type for ObjectTypeMetadataMixin (Mixin) to the (converted) source object's Class type.
Remove unnecessary SimpleModule registration including the addition of the custom BigDecimalSerializer, BigIntegerSerializer and TypelessCollectionSerializer objects.
Resolves gh-67.
2020-05-08 01:29:26 -07:00
John Blum
8418082a00
Remove unnecessary ObjectMapper configuration used specifically for deserialization.
...
Clearly, this configuration is 'unnecessary' because the ObjectMapper is used to serialize Objects to JSON in this converter.
Removes Mixin that virtually annotated application domain model object types with @JsonIgnoreProperties for unknown/unmapped properties.
Removes configuration to accept case insensitive Enum (String) values.
Resolves gh-67.
2020-05-08 00:54:41 -07:00
John Blum
a3faf2584a
Configure the ObjectMapper used to convert (serialize) Objects to JSON with Jackson.
...
Activates default typing using a property.
Adds Mixin to virtually annotate application domain model object types with @JsonTypeInfo.
Adds Mixin to virtually annotate application domain model object types with @JsonIgnoreProperties for unknown/unmapped properties.
Configures JsonGenerator to write BigDecimal values as a plain String.
Configures ObjectMapper to accept case insensitive Enum (String) values.
Configures ObjectMapper to sort properties alphabetically in JSON.
Registers SimpleModule with customer JsonSerializers for java.math.BigDecimal and java.math.BigInteger as well as to render typeless Collections.
Resolves gh-67.
2020-05-08 00:54:41 -07:00
John Blum
2627cf7a90
Change ObjectToJsonConverter implementation from JacksonObjectToJsonConverter to JSONFormatterPdxToJsonConverter.
...
Note that JSONFormatterPdxToJsonConverter extends JacksonObjectToJsonConverter and adds the capability to convert (serialize) PDX to JSON in addition to Objects.
Resolves gh-67.
2020-05-07 22:16:51 -07:00
John Blum
5b5e2e5db8
Add abstract base class implementing the ObjectArrayToJsonConverter interface to encapsulate operation common to all implementations.
...
The abstract base class provides convert methods to convert arrays, Iterables and Map.values(). Additionally it contains support to configure the ObjectToJsonConverter used to convert individual Objects into JSON.
Resolves gh-67.
2020-05-07 21:26:18 -07:00
John Blum
72443e95af
Add ObjectArrayToJsonConverter interface specifying a contract to convert an array of Objects to JSON.
...
Resolves gh-67.
2020-05-07 21:24:09 -07:00
John Blum
9232180643
Add JsonToPdxConverter interface implementation converting JSON to PDX backed by Apache Geode's o.a.g.pdx.JSONFormatter class and Jackson's ObjectMapper.
...
Resolves gh-67.
2020-05-06 13:27:49 -07:00
John Blum
7f9b36ec18
Adds ObjectToJsonConverter interface implementation using Jackson to convert an Object to JSON.
...
Resolves gh-67.
2020-05-06 12:20:52 -07:00
John Blum
e76100af47
Add ObjetToJsonConverter interface implementation to convert an Object or PDX to JSON using Apache Geode's o.a.g.pdx.JSONFormatter class.
...
This converter extends (is backed by) the JacksonObjectToJsonConverter implementation to fallback on Jackson's ObjectMapper if the Object to convert is not a o.a.g.pdx.PdxInstance.
Resolves gh-67.
2020-05-06 11:45:47 -07:00
John Blum
cb3141f0b7
Add JsonToPdxConverter interface implementation to convert JSON to PDX using Apache Geode's o.a.g.pdx.JSONFormatter class.
...
Resolves gh-67.
2020-05-06 11:42:06 -07:00
John Blum
9f97a8313d
Add conditional logic to handle beans of type ResolvableRegionFactoryBean.
...
Resolves gh-67.
2020-05-06 11:07:52 -07:00
John Blum
8aed3f95cd
Add JSON examples for Integration Tests.
...
Resolves gh-67.
2020-05-06 00:45:06 -07:00
John Blum
68e7b54c90
Refactor importInto(:Region) to parse and convert JSON containing multiple objects into an array of PdxInstances each stored in the Region.
...
Edit Javadoc.
Resolves gh-67.
2020-05-06 00:43:03 -07:00
John Blum
e67c383de8
Add JsonToPdxArrayConverter interface and Spring Converter extension specifying a contract to convert JSON into PDX, as an array of PdxInstance objects.
...
Resolves gh-69.
2020-05-06 00:37:31 -07:00
John Blum
bbef166670
Edit Javadoc.
...
Resolves gh-67.
2020-05-06 00:13:17 -07:00
John Blum
8cf6a8b410
Add configurable Product.category as an enumerated type.
2020-05-05 13:40:03 -07:00
John Blum
3f05015b2f
Refactor example POS application model classes to be conducive to Jackson's ObjectMapper configuration imposed by GemFire/Geode PDX framework and JSONFormatter class.
2020-05-05 13:15:24 -07:00
John Blum
c3b697e759
Complete base implementation of the JSON CacheDataImporterExporter.
...
Resolves gh-67.
2020-05-05 11:14:04 -07:00
John Blum
ec20642cc1
Add ObjectToJsonConverter interface specifying a contract for converting an Object to JSON.
...
Resolves gh-67.
2020-05-05 11:14:04 -07:00