Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WDESIGNER and version 23.2
Div
Classe2e-refDiv

Otp
Floatingfalse

Rde

Stereotype Attributes

MongoDB Alias

Multiexcerpt
MultiExcerptNameMongoDBAlias_introduction

The settings on the MongoDBAlias are used to build the MongoDB connection string and to set database connection options. Each alias will create a separate connection pool. For each request, the xUML Runtime will use one connection from this pool for the entire request duration.

To use the MongoDB adapter it is helpful if you are familiar with the MongoDB options. Each listed tagged value is setting the MongoDB option having the same name.
Please refer to the MongoDB manual for more information on each option.

Multiexcerpt
MultiExcerptNameMongoDBAlias
AttributeDescriptionAllowed Values / Examples
NameSpecify a name for the alias.any string
Standard
protocol

Specifies the protocol to be used with this connection.mongodbUse the standard MongoDB connection protocol (default).
mongodb+srvUse DNS seed list.
hostsSpecifies a list of MongoDB host with optional ports (one list entry per line).

scheer-acme.com
db.scheer-acme.com:2701

replicaSetSpecifies a replica set name.
databaseSpecifies the default database to be used.
collectionSpecifies the default collection to be used.
xUMLRuntimeUseTransactions

Specifies whether to use automatic transactions with replica sets. If enabled, the xUML Runtime will apply the transaction concepts as documented on xUML Runtime Transaction Concepts.

Note
iconfalse

Transactions can only be enabled when using replica sets. Also, some options like read/write concerns make it impossible to use transactions. If a conflict can be detected, the Runtime refuses to start.
Use with caution, and refer to the MongoDB manual for more information.

true

Use automatic transactions on replica sets.

falseDo not use automatic transactions on replica sets (default).
Authentication
userSpecifies the database user (if the database requires authentication). If the user contains characters that MongoDB has defined as to be illegal, they will be converted correctly to percent encoding.
passwordSpecifies the password of user (if the database requires authentication). If the password contains characters that MongoDB has defined as to be illegal, they will be converted correctly to percent encoding.
defaultauthdbSpecifies the defaultauthdb option, the authentication database to be used if user and password are provided.
authSourceSpecifies the authSource option, the database name that is associated with the provided credentials.
authMechanismSpecifies the authMechanism option, the authentication mechanism to be used to authenticate the connection.
authMechanismPropertiesSpecifies the authMechanismProperties option, the properties of the specified authMechanism as a comma-separated list of colon-separated key-value pairs.

CANNONICALIZE_HOST_NAME:true,AWS_SESSION_TOKEN:FQoGZXIvYXdzEN...

Compression
compressorsSpecifies the compressors option, the compressor to be used for network communication.zlibUse zlib compression.
noneNo compression.
zlibCompressionLevelSpecifies the zlibCompressionLevel option, compression level if zlib compression is used.-1zlib default
0no compression
1-9compression level
Misc
retryReadsSpecifies the retryReads option. This option enables retryable reads.trueRetry reads (default).
falseDo not retry reads.
retryWritesSpecifies the retryWrites option. This option enables retryable writes.trueRetry writes (default)
falseDo not retry writes.
Pooling
maxPoolSizeSpecifies the maxPoolSize option, the maximum number of connections in the connection pool.any positive integer
100default
waitQueueTimeoutMSSpecifies the waitQueueTimeoutMS option, the maximum wait time for a client connection to become available from the pool.any positive integer
30000default
Read/write
wSpecifies the w option. This option requests acknowlegdement that a write operation has been propagated to the specified number of MongoDB instances or MongoDB instances with specific tags.a positive integer
(default 1)
Acknowledge propagation to the given number of databases.
majorityAcknowledge propagation to the majority of databases.
a tag setAcknowledge propagation to the databases with the specified tags.
wtimeoutMSSpecifies the wtimeoutMS option, the time limit for the write concern in milliseconds.any positive integer
30000default
journalSpecifies the journal option. This option requests acknowlegdement from the database that the write operation has been written to the journal.trueRequest acknowlegdement for write operations.
falseNo acknowlegdement of write operations (default).
readConcernLevelSpecifies the readConcernLevel option. Refer to the MongoDB manual for more details.One of: local (default), majority, linearizable, available, snapshot
readPreferenceSpecifies the readPreference option. Refer to the MongoDB manual for more details.One of: primary (default), primaryPreferred, secondary, secondaryPreferred, nearest
maxStalenessSecondsSpecifies the maxStalenessSeconds option, how stale a secondary can be before the client stops using it for read operations.any positive integer >= 90
-1default
readPreferenceTagsSpecifies the readPreferenceTags option.
Server selection & discovery
localThresholdMSSpecifies the localThresholdMS option.any positive integer
15default
serverSelectionTimeoutMSSpecifies the serverSelectionTimeoutMS option.any positive integer
30000default
heartbeatFrequencyMSSpecifies the heartbeatFrequencyMS option.any positive integer
10000default
Timeout
connectTimeoutMSSpecifies the connectTimeoutMS option, the time in milliseconds a connection is attempted before it times out.any positive integer
30000default
socketTimeoutMSSpecifies the socketTimeoutMS option, the time in milliseconds a send or receive is attempted on a socket before it times out.any positive integer
30000default
TLS
tlsSpecifies the tls option, used to enable/disable TLS.trueEnable TLS.
falseDisable TLS (default).
tlsCertificateKeyFileSpecifies the tlsCertificateKeyFile option, the path to a .pem file that contains either the TLS/SSL X.509 certificate of the client, or the client's TLS/SSL certificate and key.
tlsCertificateKeyFilePasswordSpecifies the tlsCertificateKeyFilePassword option, the password to decrypt the certificate file.
tlsCAFileSpecifies the tlsCAFile option, the path to a .pem file that contains the root certificate chain of the certificate authority. This file is used to validate the certificate presented by the database instance.
tlsAllowInvalidCertificatesSpecifies the tlsAllowInvalidCertificates option, used to allow invalid certificates.trueBypass certifiate validation.
falseValidate the certificate presented by the database instance (default).
tlsAllowInvalidHostnamesSpecifies the tlsAllowInvalidHostnames option, used to disable hostname validation.trueDo not validate the hostname of the certificate presented by the database instance.
falseValidate the hostname of the certificate presented by the database instance (default).
tlsInsecureSpecifies the tlsInsecure option.trueDisable TLS various certificate validations. Refer to the MongoDB manual for details.
falseValidate TLS certificates (default).

MongoDB Adapter

AttributeDescriptionAllowed Values
alias

Specify the MongoDB alias resp. the database the adapter should use to establish the connection.

a valid MongoDB alias
databaseOverwrite the database given in the alias.
collectionOverwrite the collection given in the alias.
action

Multiexcerpt include
SpaceWithExcerptINTERNAL
MultiExcerptNameinfo_alias_attribute_action
PageWithExcerptINTERNAL:_designer_excerpts


MongoDB Adapter Operations
Anchor
find
find

aggregate Operations
Anchor
aggregate
aggregate

Multiexcerpt
MultiExcerptNameaggregate_operations
  • aggregate ( database : String, collection : String, pipeline : String[], handle : MongoDBHandle )
  • aggregate ( database : String, collection : String, pipeline : String[], result: String[] )
  • aggregate ( database : String, collection : String, pipeline : String[], result: Any[] )


Multiexcerpt
MultiExcerptNameaggregate
NameTypeDirectionDescription
databaseStringin
Multiexcerpt
MultiExcerptNamedatabase

Name of the database you want to access. This overwrites the setting on the MongoDB Alias and MongoDB Adapter.

collectionStringin
Multiexcerpt
MultiExcerptNamecollection

Name of the collection you want to access. This overwrites the setting on the MongoDB Alias and MongoDB Adapter.

pipelineArray of Stringin
Pipeline you want to use with aggregation.


Multiexcerpt
MultiExcerptNamepipeline
Each array element must be a MongDB pipeline step as valid JSON.
handleMongoDBHandleoutHandle to a result set. You can use fetch to get documents from this result set.
result

Array of String

Array of all resulting documents in JSON format.out
Multiexcerpt
MultiExcerptNameresult

Result set as an array. Depending on the array element specified on this parameter, the resulting documents are either presented in extended JSON format (String), or serialized into xUML model structures (<document class>).

Array of <document class>Array of objects of an xUML class representing the document structure.

delete Operation
Anchor
delete
delete

Multiexcerpt
MultiExcerptNamedelete_operations
shouldDisplayInlineCommentsInIncludesfalse
  • delete ( queryString : String, database : String, collection : String, rowsAffected : Integer )


Multiexcerpt
MultiExcerptNamedelete
NameTypeDirectionDescriptionAllowed Values / Examples
queryStringStringin


Multiexcerpt
MultiExcerptNamequeryString

MongoDB JSON query string.

Info

In contrast to the MongoDB shell, the JSON keys must be quoted properly.

MongoDB query string as valid JSON
databaseStringin

Multiexcerpt include
MultiExcerptNamedatabase
PageWithExcerptMongoDB


collectionStringin

Multiexcerpt include
MultiExcerptNamecollection
PageWithExcerptMongoDB


rowsAffectedIntegerout
Multiexcerpt
MultiExcerptNamerowsAffected

Returns how many rows have been affected by the MongoDB operation.

Info

This information may be unavailable depending on the acknowledgement settings on the MongoDB Alias . If the Runtime cannot retrieve this information,  rowsAffected  will be NULL.


fetch Operations
Anchor
fetch
fetch

Multiexcerpt
MultiExcerptNamefetch_operations
shouldDisplayInlineCommentsInIncludesfalse
  • fetch ( handle : MongoDBHandle, result: String[] )
  • fetch ( handle : MongoDBHandle, result: Any[] )


Multiexcerpt
MultiExcerptNamefetch
NameTypeDirectionDescription
handleMongoDBHandleinHandle to a result set that has been created by a find operation.
resultStringResulting document in JSON format.outFetched document. Depending on the type specified on this parameter, the resulting document is either presented in extended JSON format (String), or serialized into  model structures (<document class>).
<document class>Objects of an xUML class representing the document structure.

find Operations

Multiexcerpt
MultiExcerptNamefind_operations
shouldDisplayInlineCommentsInIncludesfalse
  • find ( queryString : String, options : MongoDBFindOptions, database : String, collection : String, handle : MongoDBHandle )
  • find ( queryString : String, options : MongoDBFindOptions, database : String, collection : String, result: String[] )
  • find ( queryString : String, options : MongoDBFindOptions, database : String, collection : String, result: Any[] )


Multiexcerpt
MultiExcerptNamefind
NameTypeDirectionDescriptionAllowed Values / Examples
queryStringStringin
Multiexcerpt include
MultiExcerptNamequeryString
PageWithExcerptMongoDB
MongoDB query string as valid JSON
optionsMongoDBFindOptionsinMongoDB options for find.
databaseStringin

Multiexcerpt include
MultiExcerptNamedatabase
PageWithExcerptMongoDB


collectionStringin

Multiexcerpt include
MultiExcerptNamecollection
PageWithExcerptMongoDB


resultArray of StringArray of all resulting documents in JSON format.out

Multiexcerpt include
MultiExcerptNameresult
PageWithExcerptMongoDB


Array of <document class>Array of objects of an xUML class representing the document structure.
handleMongoDBHandleoutHandle to a result set. You can use fetch to get documents from this result set.

insert Operations
Anchor
insert
insert

Multiexcerpt
MultiExcerptNameinsert_operations
  • insert ( document: Any, database : String, collection : String )
  • insert ( documents: Any[], database : String,  collection : String )
Multiexcerpt
MultiExcerptNameinsert
NameTypeDirectionDescription
document<document class>inA data structure representing the document you want to insert. The data structure will be serialized.
documentsArray of <document class>inArray of documents you want to insert. Each array element is treated as a single document parameter and all of them will be inserted.
databaseStringin

Multiexcerpt include
MultiExcerptNamedatabase
PageWithExcerptMongoDB

collectionStringin

Multiexcerpt include
MultiExcerptNamecollection
PageWithExcerptMongoDB

replace Operation
Anchor
replace
replace

Multiexcerpt
MultiExcerptNamereplace_operations
shouldDisplayInlineCommentsInIncludesfalse
  • replace ( document : Any, queryString : String, options : MongoDBOptions, database : String, collection : String, rowsAffected : Integer )
Multiexcerpt
MultiExcerptNamereplace
NameTypeDirectionDescriptionAllowed Values / Examples
documentAny <document class>in

A data structure representing the document you want to replace the selected document with. The old stored document will be replaced by the new one, the MongoDB _id, however, will not change.



queryStringStringin

Multiexcerpt include
MultiExcerptNamequeryString
PageWithExcerptMongoDB

MongoDB query string as valid JSON
optionsMongoDBReplaceOptionsinMongoDB options for replace.
databaseStringin

Multiexcerpt include
MultiExcerptNamedatabase
PageWithExcerptMongoDB


collectionStringin

Multiexcerpt include
MultiExcerptNamecollection
PageWithExcerptMongoDB


rowsAffectedIntegerout

Multiexcerpt include
MultiExcerptNamerowsAffected
PageWithExcerptMongoDB


update Operations
Anchor
update
update

Multiexcerpt
MultiExcerptNameupdate_operations
shouldDisplayInlineCommentsInIncludesfalse
  • update ( updateString : String, queryString : String, options : MongoDBOptions, nullifications : String[], removals : String[], database : String, collection : String, rowsAffected : Integer )
  • update ( pipeline : String[], queryString : String, options : MongoDBOptions, nullifications : String[], removals : String[], database : String, collection : String, rowsAffected : Integer )
  • update (  document : Any, queryString : String, options : MongoDBOptions, nullifications : String[], removals : String[], database : String, collection : String, rowsAffected : Integer )
Multiexcerpt
MultiExcerptNameupdate
NameTypeDirectionDescriptionAllowed Values / Examples
documentAny <document class>in

A data structure representing the document you want to insert. For this, the following rules apply:

  • unset top-level fields will be skipped
  • complex fields will be replaced entirely



updateString
Stringin

MongoDB JSON update string.

Info

In contrast to the MongoDB shell, the JSON keys must be quoted properly.

Refer to  Querying MongoDB  for a comprehensive explanation of how to build an update string and the implications.

MongoDB update string as valid JSON

{ "$set": {
      "address": {
            "city": "Dallas"
      }
}
{ "$set": {
     "address.city": "Dallas"
     }
}
pipeline
Array of Stringsin

Pipeline you want to use with update.

Each array element must be a MongDB pipeline step as valid JSON.


queryStringStringin

Multiexcerpt include
MultiExcerptNamequeryString
PageWithExcerptMongoDB

MongoDB query string as valid JSON
optionsMongoDBReplaceOptionsinMongoDB options for replace.
nullifications
Array of Stringsin

An array of database fields to be set to NULL upon update.

The elements of the path to the field within the corresponding document are to be separated by a dot (see examples). You can use arrays with that notation (see example) only if  arrayFilters  have been provided with the MongoDB update options.

customer.address
customer.address.street
customer.phoneArray.$[elem].number
removals
Array of Stringsin

An array of database fields to be removed upon update.

The elements of the path to the field within the corresponding document are to be separated by a dot (see examples). You can use arrays with that notation (see example) only if  arrayFilters  have been provided with the MongoDB update options.

customer.address
customer.address.street
customer.phoneArray.$[elem].number
databaseStringin

Multiexcerpt include
MultiExcerptNamedatabase
PageWithExcerptMongoDB


collectionStringin

Multiexcerpt include
MultiExcerptNamecollection
PageWithExcerptMongoDB


rowsAffectedIntegerout

Multiexcerpt include
MultiExcerptNamerowsAffected
PageWithExcerptMongoDB


MongoDB Adapter Parameter Types

MongoDBFindOptions

NameTypeDescriptionAllowed Values / Examples
limitIntegerLimits the number of returned documents.any integer between -231 and 231
skipIntegerSpecifies the number of documents to skip in the result set (counted from the beginning).any positive integer
projectionStringAn aggregation document that projects the results accordingly. It defines the final shape of the returned documents.valid JSON
sortStringA sort document.valid JSON

MongoDBHandle

NameTypeDescription
idIntegerID of the MongoDB handle.

MongoDBReplaceOptions

NameTypeDescriptionAllowed Values / Examples
upsertBooleanSpecifies if the document should be inserted if no document matches the query.

true

Insert document.
falseDo nothing.

MongoDBUpdateOptions

NameTypeDescriptionAllowed Values / Examples
upsertBooleanSpecifies if the document should be inserted if no document matches the querytrueInsert document.
falseDo nothing.
arrayFiltersArray of StringSets conditions for the filtered positional operators during the update.array of filter document as valid JSON strings

ExtendedJSONComposerOptions

Tip

See also JSON Adapter and JSON.

NameTypeDescriptionAllowed Values / Examples
format

StringUse format to specify which kind of Extended JSON should be produced: canonical or relaxed Extended JSON.canonicalProduce canonical Extended JSON (default).
relaxedProduce relaxed Extended JSON.
keepNulls

BooleanWhen keepNulls is true, attributes of anObject with NULL values will be rendered to the Extended JSON object, otherwise they will be left out completely (see also chapter NULL Values). The default behavior of classToJson() (i.e. when called without options) is equivalent to keepNulls=false.trueRender NULL attributes to the Extended JSON string.
falseLeave out NULL attributes (default).
writeTypeDiscriminator

Boolean

Use writeTypeDiscriminator to suppress the generation of xUML type properties ("e2e:type") to the generated JSON. If this option is true, the Runtime will write the original xUML type to the generated JSON in form of "e2e:type": "<name of the original xUML type>" if the type being serialized does not match the expected metadata. This is necessary if you want to convert the generated Extended JSON back to an xUML class using extendedJSONToClass() Operation.

Info

In contrast to classToJSON() Operation, writeTypeDiscriminator defaults to false for classToExtendedJson().

trueWrite xUML type discriminator.
falseDo not write xUML type discriminator (default).