Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle TopLink API Reference 10g Release 3 (10.1.3) B13698-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.toplink.descriptors
Class CMPPolicy

`java.lang.Object
oracle.toplink.descriptors.CMPPolicy`

All Implemented Interfaces:
  java.io.Serializable

public class CMPPolicy
extends java.lang.Object
implements java.io.Serializable

Description: Place holder for CMP specific information. This class can be set on the Descriptor.

Since:
  TopLink 10.1.3
See Also:
  `PessimisticLockingPolicy`, Serialized Form

Field Summary
`static int` | `AFTER_EJBCREATE` issue SQL after ejbCreate but before ejbPostCreate
`static int` | `AFTER_EJBPOSTCREATE` issue SQL after ejbPostCreate
`static int` | `ALL_MODIFICATIONS` defer all modifications, inserts and deletes included (default)
`static int` | `NONE` defer no changes
`static boolean` | `OPTIMIZE_PESSIMISTIC_CMP`
`static int` | `UNDEFINED` undefined if it is non-deferred issue sql at create
`static int` | `UPDATE_MODIFICATIONS` defer updates

Constructor Summary
`CMPPolicy()`

Method Summary
`int` | `getDeferModificationsUntilCommit()` ADVANCED: This can be used to control when changes to objects are submitted to the database This is only applicable to TopLink's CMP implementation and not available within the core.
`boolean` | `getForceUpdate()` ADVANCED: Return true if descriptor is set to always update all registered objects of this type
`java.lang.Class` | `getMappedClass()` PUBLIC: Answer the mapped class.
`int` | `getNonDeferredCreateTime()` ADVANCED: This setting is only available for CMP beans that are not being deferred.
`PessimisticLockingPolicy` | `getPessimisticLockingPolicy()` PUBLIC: Return the policy for bean pessimistic locking
`boolean` | `getUpdateAllFields()` ADVANCED: Return true if descriptor is set to update all fields for an object of this type when an update occurs.
`boolean` | `hasPessimisticLockingPolicy()` PUBLIC: Return true if bean pessimistic locking is configured
`void` | `setDeferModificationsUntilCommit(int deferralLevel)` ADVANCED: This can be set to control when changes to objects are submitted to the database This is only applicable to TopLink's CMP implementation and not available within the core.
`void` | `setForceUpdate(boolean shouldForceUpdate)` ADVANCED: Configure whether TopLink should always update all registered objects of this type.
`void` | `setMappedClass(java.lang.Class newMappedClass)` PUBLIC: Define the mapped class.
`void` | `setNonDeferredCreateTime(int createTime)` ADVANCED: This setting is only available for CMP beans that are not being deferred.
`void` | `setPessimisticLockingPolicy(PessimisticLockingPolicy policy)` PUBLIC: Configure bean pessimistic locking
`void` | `setUpdateAllFields(boolean shouldUpdatAllFields)` ADVANCED: Configure whether TopLink should update all fields for an object of this type when an update occurs.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### OPTIMIZE_PESSIMISTIC_CMP

    public static boolean OPTIMIZE_PESSIMISTIC_CMP

### NONE

    public static final int NONE

  defer no changes
  See Also:
    Constant Field Values

### UPDATE_MODIFICATIONS

    public static final int UPDATE_MODIFICATIONS

  defer updates
  See Also:
    Constant Field Values

### ALL_MODIFICATIONS

    public static final int ALL_MODIFICATIONS

  defer all modifications, inserts and deletes included (default)
  See Also:
    Constant Field Values

### UNDEFINED

    public static final int UNDEFINED

  undefined if it is non-deferred issue sql at create
  See Also:
    Constant Field Values

### AFTER_EJBCREATE

    public static final int AFTER_EJBCREATE

  issue SQL after ejbCreate but before ejbPostCreate
  See Also:
    Constant Field Values

### AFTER_EJBPOSTCREATE

    public static final int AFTER_EJBPOSTCREATE

  issue SQL after ejbPostCreate
  See Also:
    Constant Field Values

Constructor Detail

### CMPPolicy

    public CMPPolicy()

Method Detail

### getNonDeferredCreateTime

    public int getNonDeferredCreateTime()

  ADVANCED: This setting is only available for CMP beans that are not being deferred. Using it will allow TopLink to determine if the INSERT SQL should be sent to the database before or after the postCreate call.

### getPessimisticLockingPolicy

    public PessimisticLockingPolicy getPessimisticLockingPolicy()

  PUBLIC: Return the policy for bean pessimistic locking
  See Also:
    `#oracle.toplink.descriptors.PessimisticLockingPolicy`

### setDeferModificationsUntilCommit

    public void setDeferModificationsUntilCommit(int deferralLevel)

  ADVANCED: This can be set to control when changes to objects are submitted to the database This is only applicable to TopLink's CMP implementation and not available within the core.

### setMappedClass

    public void setMappedClass(java.lang.Class newMappedClass)

  PUBLIC: Define the mapped class. This is the class which was originally mapped in the MW

### getMappedClass

    public java.lang.Class getMappedClass()

  PUBLIC: Answer the mapped class. This is the class which was originally mapped in the MW

### setNonDeferredCreateTime

    public void setNonDeferredCreateTime(int createTime)

  ADVANCED: This setting is only available for CMP beans that are not being deferred. Using it will allow TopLink to determine if the INSERT SQL should be sent to the database before or after the postCreate call.

### setPessimisticLockingPolicy

    public void setPessimisticLockingPolicy(PessimisticLockingPolicy policy)

  PUBLIC: Configure bean pessimistic locking
  See Also:
    `#oracle.toplink.descriptors.PessimisticLockingPolicy`

### hasPessimisticLockingPolicy

    public boolean hasPessimisticLockingPolicy()

  PUBLIC: Return true if bean pessimistic locking is configured

### getDeferModificationsUntilCommit

    public int getDeferModificationsUntilCommit()

  ADVANCED: This can be used to control when changes to objects are submitted to the database This is only applicable to TopLink's CMP implementation and not available within the core.

### getForceUpdate

    public boolean getForceUpdate()

  ADVANCED: Return true if descriptor is set to always update all registered objects of this type

### setForceUpdate

    public void setForceUpdate(boolean shouldForceUpdate)

  ADVANCED: Configure whether TopLink should always update all registered objects of this type. NOTE: if set to true, then updateAllFields must also be set to true

### getUpdateAllFields

    public boolean getUpdateAllFields()

  ADVANCED: Return true if descriptor is set to update all fields for an object of this type when an update occurs.

### setUpdateAllFields

    public void setUpdateAllFields(boolean shouldUpdatAllFields)

  ADVANCED: Configure whether TopLink should update all fields for an object of this type when an update occurs.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 1998, 2006, Oracle. All Rights Reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD