|
Oracle® OLAP Java API Reference 11g Release 1 (11.1) B28128-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.olapi.metadata.BaseMetadataObject
oracle.olapi.metadata.deployment.MVCreationOptions
public class MVCreationOptions
A 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.
You can also specify whether or not to enable the creation of a materialized view for use by the database query rewrite system. The query rewrite system redirects queries for summary data from the master tables to the MV. You use the setEnableRewriteMV
method to specify whether or not to create an MV that is accessible to the query rewrite system.
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.
Field Summary | |
---|---|
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 indicates 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. |
Method Summary | |
---|---|
boolean |
enableRewriteMV() Indicates whether this MVCreationOptions specifies the creation of an MV for use by the database query rewrite system. |
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 a value that indicates 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 |
setEnableRewriteMV(boolean val) Specifies whether or not to create an MV for use by the database query rewrite system. |
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. |
Methods inherited from class oracle.olapi.metadata.BaseMetadataObject |
---|
getID, getOwner |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Method Detail |
---|
public final boolean enableRewriteMV()
MVCreationOptions
specifies the creation of an MV for use by the database query rewrite system.boolean
that is true
if the MV can be used by the query rewrite system or false
otherwise.public final void setEnableRewriteMV(boolean val)
setMVOption
method of an AWCubeOrganization
, you can specify that Oracle OLAP create a rewrite MV. However, if you then specify false
with this method, Oracle OLAP does not actually make the MV available to the query rewrite system. You could later use this method to change the MVCreationOptions
to specify true
and then rebuild the cube. The MV would then be available to the query rewrite system.val
- A boolean
that is true
to enable the creation of a rewrite MV or false
to disable the creation of one.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
.
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |