Class CollectionSchemaUpdate


  • public class CollectionSchemaUpdate
    extends java.lang.Object
    • Constructor Detail

      • CollectionSchemaUpdate

        public CollectionSchemaUpdate()
    • Method Detail

      • update

        public static CollectionSchemaUpdate update​(java.lang.String key,
                                                    IOperation operation)
        Static factory method to create an CollectionUpdate for the specified key
        Parameters:
        key - : JSON attribute to update
        operation - : operation to carry out on the attribute
        Returns:
        the updated CollectionSchemaUpdate
      • set

        public CollectionSchemaUpdate set​(java.lang.String key,
                                          IOperation operation)
        A method to set a new Operation for a key. It may be of type ADD, RENAME or DELETE. Only one operation per key can be specified. Attempt to add a second operation for a any key will override the first one. Attempt to add a ADD operation for a key which already exists will have no effect. Attempt to add a DELETE operation for akey which does not exist will have no effect.
        Parameters:
        key - (a.k.a JSON Field name) for which operation is being added
        operation - operation to perform
        Returns:
        the updated CollectionSchemaUpdate
      • getUpdateData

        public java.util.Map<java.lang.String,​IOperation> getUpdateData()
      • getAddOperations

        public java.util.Map<java.lang.String,​AddOperation> getAddOperations()
        Returns a Map of ADD operations which have a non-null default value specified.
        Returns:
        Map of ADD operations which have a non-null default value specified
      • getRenameOperations

        public java.util.Map<java.lang.String,​RenameOperation> getRenameOperations()
        Returns a Map of RENAME operations.
        Returns:
        Map of RENAME operations which have a non-null default value specified
      • getDeleteOperations

        public java.util.Map<java.lang.String,​DeleteOperation> getDeleteOperations()
        Returns a Map of DELETE operations.
        Returns:
        Map of DELETE operations which have a non-null default value specified