public class MVCreationOptions extends PublicMetadataObject
BaseMetadataObject
that contains options that Oracle OLAP uses when it creates a materialized view (MV) for an analytic workspace cube or dimension. You create an MVCreationOptions
with the findOrCreateMVCreationOptions
method of an AWCubeOrganization
or an AWPrimaryDimensionOrganization
.
The setMVOption
method of an AWCubeOrganization
or an AWPrimaryDimensionOrganization
specifies the type of MV to create. If you do not create an MVCreationOptions
object, then Oracle OLAP uses default option values when it creates the MV. With an MVCreationOptions
you can specify values for the options. You can specify the type of method, the mode, and the type of constraints to use for the refreshing of the MV.
You specify a refresh method type by using the setRefreshType
method. The refresh method types are the following:
You specify a refresh mode with the setRefreshOnOption
or the setRefreshStartWithExpression
and the setRefreshNextExpression
methods. If you specify a Refresh On mode, then do not specify a Refresh Starts With and Refresh Next mode. If you specify a Refresh Starts With and Refresh Next mode, then do not specify a Refresh On mode.
The refresh modes are the following:
BuildProcess
that includes a BuildItem
for the MdmCube
or MdmPrimaryDimension
with the MV. You execute a BuildProcess
with a DataProvider.executeBuild
method.Another aspect of creating an MV is to specify the whether or not to use enforced or trusted constraints when refreshing the MV. Trusted constraints can result in a more efficient refresh operation. However, if the trusted constraint information is invalid, then the refresh procedure may corrupt the MV. You specify the type of constraint with the setUsingConstraints
method.
For more information about how these options affect the creation of an MV, see the create_mv_refresh
clause of the CREATE MATERIALIZED VIEW
statement in Oracle Database SQL Language Reference.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
REFRESH_ON_COMMIT
A constant that represents the refresh on commit mode, which indicates that a refresh occurs when the database commits a transaction that affects a source table.
|
static java.lang.String |
REFRESH_ON_DEFAULT
A constant that represents the refresh on default mode, which indicates that a refresh occurs on the default setting.
|
static java.lang.String |
REFRESH_ON_DEMAND
A constant that represents the refresh on demand mode, which indicates that a refresh occurs on demand.
|
static java.lang.String |
REFRESH_TYPE_COMPLETE
A constant that represents a complete refresh method type.
|
static java.lang.String |
REFRESH_TYPE_DEFAULT
A constant that represents the default refresh method type.
|
static java.lang.String |
REFRESH_TYPE_FAST
A constant that represents a fast refresh method type.
|
static java.lang.String |
REFRESH_TYPE_FORCE
A constant that represents a force refresh method type.
|
static java.lang.String[] |
VALID_REFRESH_ON_OPTIONS
A constant that has the valid values for the conditions that initiate a refresh.
|
static java.lang.String[] |
VALID_REFRESH_TYPES
A constant that has the valid values for the refresh method type.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
Gets the name of this
MVCreationOptions . |
java.lang.String |
getRefreshNextExpression()
Gets the expression that indicates when the next refresh of the MV occurs.
|
java.lang.String |
getRefreshOnOption()
Gets the mode that Oracle OLAP uses to determine when to refresh the data for the MV that is associated with the dimension or cube.
|
java.lang.String |
getRefreshStartWithExpression()
Gets the expression that indicates when the initial refresh of the MV occurs.
|
java.lang.String |
getRefreshType()
Gets the type of refresh method specified by this
MVCreationOptions . |
java.lang.String |
getUsingConstraints()
Gets the value of the setting that specifies whether a refresh operation uses enforced or trusted contraints.
|
void |
setRefreshNextExpression(java.lang.String exp)
Specifies an expression that determines the interval between automatic refreshes.
|
void |
setRefreshOnOption(java.lang.String option)
Specifies the mode that Oracle OLAP uses to determine when to refresh the MV.
|
void |
setRefreshStartWithExpression(java.lang.String exp)
Specifies an expression that determines when the initial automatic refresh of the MV occurs.
|
void |
setRefreshType(java.lang.String type)
Specifies the type of refresh method that the database uses when it refreshes the MV that is associated with the cube or dimension.
|
void |
setUsingConstraints(java.lang.String exp)
Specifies whether to use enforced or trusted constraints for refreshing the MV.
|
getContainedByObject, getID, getNewName, getOwner
public static final java.lang.String REFRESH_TYPE_FAST
public static final java.lang.String REFRESH_TYPE_COMPLETE
public static final java.lang.String REFRESH_TYPE_FORCE
public static final java.lang.String REFRESH_TYPE_DEFAULT
public static final java.lang.String[] VALID_REFRESH_TYPES
public static final java.lang.String[] VALID_REFRESH_ON_OPTIONS
public static final java.lang.String REFRESH_ON_DEFAULT
public static final java.lang.String REFRESH_ON_DEMAND
public static final java.lang.String REFRESH_ON_COMMIT
public final java.lang.String getRefreshType()
MVCreationOptions
.String
that contains the type of refresh method for the MV.public final void setRefreshType(java.lang.String type)
type
parameter.
Constant | Description |
---|---|
REFRESH_TYPE_COMPLETE |
Refresh all of the data for the cube. |
REFRESH_TYPE_FAST |
Refresh only the data for the cube that needs to change due to changes to the relational source master tables. A fast refresh is possible only if the master tables support the operation. If fast refresh is not possible, the operation does not succeed. |
REFRESH_TYPE_FORCE |
Perform a fast refresh if possible, otherwise perform a complete refresh. |
REFRESH_TYPE_DEFAULT |
Use the default refresh type, which is FORCE . |
type
- A String
that contains a refresh method type for the MV.public final java.lang.String getRefreshStartWithExpression()
String
that contains an expression that indicates when the initial refresh of the MV occurs.public final void setRefreshStartWithExpression(java.lang.String exp)
setRefreshNextExpression
method. If you specify a time to start automatic refreshes but you do not specify time for the next refresh, then the automatic refresh occurs only once, at the time specified by this method.
If you specify a time to start automatic refreshes, then you should not specify a Refresh On mode.
exp
- A String
that contains an expression that evaluates to a future datetime value.public final java.lang.String getRefreshNextExpression()
String
that contains an expression that indicates when the next refresh of the MV occurs.public final void setRefreshNextExpression(java.lang.String exp)
setRefreshStartWithExpression
method. If you do not set the time for the initial refresh, then the database determines the first automatic refresh time by evaluating the expression specified by this method in relation to the creation time of the MV.
If you specify a time inteval for automatic refreshes, then you should not specify a Refresh On mode.
exp
- A String
that contains an expression that evaluates to a future datetime value.public final java.lang.String getRefreshOnOption()
String
that contains the mode that determines when Oracle OLAP refreshes the data in the MV.public final void setRefreshOnOption(java.lang.String option)
option
parameter.
Constant | Description |
---|---|
REFRESH_ON_DEMAND |
Specifies that Oracle OLAP refreshes the MV on demand. |
REFRESH_ON_COMMIT |
Specifies that Oracle OLAP refreshes the MV when the database commits a transaction that affects a master table. |
REFRESH_ON_DEFAULT |
Specifies that Oracle OLAP refreshes the MV on the default setting, which is On Demand. |
If you specify a Refresh On mode, then you should not specify a Starts With or Next time period for automatic refreshes.
option
- A String
that contains a refresh on option for the cube.public final java.lang.String getUsingConstraints()
String
that contains ENFORCED
or TRUSTED
.public final void setUsingConstraints(java.lang.String exp)
exp
- A String
that contains ENFORCED
or TRUSTED
.public java.lang.String getName()
MVCreationOptions
.getName
in class BaseMetadataObject
String
that contains the name of this MVCreationOptions
.