On this page
          
          
        The PolyDocument object in the Polypheny JDBC Multimodel Extension serves as a representation of a document in a document-based result within the Polypheny environment. It extends Java’s HashMap class.
Constructors
Constructor with Map Parameter
public PolyDocument(Map<PolyString, PolyValue> value)
Creates a new PolyDocument object from a given map of String and TypedValue pairs.
Parameters:
| Parameter | Type | Description | 
|---|---|---|
value | 
      Map<String, PolyValue> | 
      The key-value pairs representing the document | 
Constructor with Single Key-Value Pair
public PolyDocument(String key, TypedValue value)
Creates a new PolyDocument object with a single key-value pair.
Parameters:
| Parameter | Type | Description | 
|---|---|---|
key | 
      String | 
      The key representing a field in the document | 
value | 
      TypedValue | 
      The value associated with the key | 
You can treat a PolyDocument object like a HashMap<String, TypedValue>, enabling you to easily iterate over its keys and values, among other operations.
Usage:
PolyDocument document = PolyDocument.ofDocument(someMap);
for (Map.Entry<String, TypedValue> entry : document.entrySet()) {
    // Process each key-value pair in the document
}
          
          
          
            © Polypheny GmbH. All Rights Reserved.