Package io.ebean.config
Enum TenantMode
- java.lang.Object
-
- java.lang.Enum<TenantMode>
-
- io.ebean.config.TenantMode
-
- All Implemented Interfaces:
Serializable
,Comparable<TenantMode>
public enum TenantMode extends Enum<TenantMode>
The mode to use for multi-tenancy.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CATALOG
Each Tenant has their own Database but with in connection poolDB
Each Tenant has their own Database (javax.sql.DataSource)DB_WITH_MASTER
Each Tenant has their own Database (javax.sql.DataSource), and there is also one master-database (that holds configuration e.g.)NONE
No multi-tenancy.PARTITION
Tenants share tables but have a discriminator/partition column that partitions the data.SCHEMA
Each Tenant has their own Database schema.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isDdlEnabled()
Returns true, if DDL is enabled.boolean
isDynamicDataSource()
Return true if the DataSource is not available on bootup.static TenantMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static TenantMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final TenantMode NONE
No multi-tenancy.
-
DB
public static final TenantMode DB
Each Tenant has their own Database (javax.sql.DataSource)
-
SCHEMA
public static final TenantMode SCHEMA
Each Tenant has their own Database schema.
-
CATALOG
public static final TenantMode CATALOG
Each Tenant has their own Database but with in connection pool
-
PARTITION
public static final TenantMode PARTITION
Tenants share tables but have a discriminator/partition column that partitions the data.
-
DB_WITH_MASTER
public static final TenantMode DB_WITH_MASTER
Each Tenant has their own Database (javax.sql.DataSource), and there is also one master-database (that holds configuration e.g.)
-
-
Method Detail
-
values
public static TenantMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TenantMode c : TenantMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TenantMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isDynamicDataSource
public boolean isDynamicDataSource()
Return true if the DataSource is not available on bootup.
-
isDdlEnabled
public boolean isDdlEnabled()
Returns true, if DDL is enabled.
-
-