Chapter 16. Global Read-only

The AllReadOnly attribute is one of the Database/DatabaseManager attributes.

The DatabaseManager configuration for AllReadOnly parameter can be retrieved by calling methods:

DODS.getDatabaseManager().getDatabaseManagerConfiguration().getAllReadOnly() 

The Database configuration for AllReadOnly parameter can be retrieved by calling methods:

DODS.getDatabaseManager().findLogicalDatabase(<DbName>).getDatabaseConfiguration().getAllReadOnly() 

This attribute is a flag that indicates whether all tables are read-only. If true, all tables are read-only. This means that insert, update and delete operations are not allowed on any of tables, only selects are allowed.

Since only selects are allowed when this attribute is set to true, in this case, queries with possible joins with other tables are also cached in the query cache (query with possible joins with other tables means that the query was built with methods that allow joins between tables).

This attribute can be handled as static method from <table_name>DO.java class as following :

Returns the current value of (global) AllReadOnly attribute.

The value for AllReadOnly attribute is read from application's configuration file as:

DatabaseManager.defaults.AllReadOnly
DatabaseManager.DB.<database_name>.AllReadOnly

If AllReadOnly is set on DatabaseManager or Database level, the readOnly attribute on table level can not be overridden – in all other cases the readOnly attribute behaves usually. If AllReadOnly is set to true and readOnly attribut of table is set to false, warning is written to log during table initialization. In runtime exception is thrown on attempt of writing to that table.

If not defined in configuration file, the default value is used. The default value is false.