Skip to content

Instantly share code, notes, and snippets.

@heiko-braun
Created January 22, 2013 14:00
Show Gist options
  • Save heiko-braun/4594850 to your computer and use it in GitHub Desktop.
Save heiko-braun/4594850 to your computer and use it in GitHub Desktop.
"transaction-isolation" => {
"type" => STRING,
"description" => "Set the java.sql.Connection transaction isolation level. Valid values are: TRANSACTION_READ_UNCOMMITTED, TRANSACTION_READ_COMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE and TRANSACTION_NONE",
"expressions-allowed" => true,
"nillable" => true,
"min-length" => 1L,
"max-length" => 2147483647L,
"access-type" => "read-write",
"storage" => "configuration",
"restart-required" => "no-services"
},
@heiko-braun
Copy link
Author

Do we have a formal way of declarding allowed values: TRANSACTION_READ_UNCOMMITTED, TRANSACTION_READ_COMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE and TRANSACTION_NONE

@bstansberry
Copy link

Yes. Typically that attribute is backed by an enum, and the definition of the attribute (AttributeDefinition) takes a "validator" which for enums would be an EnumValidator. If the definition uses that the "allowed" field in the description gets set automatically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment