Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.admin.tools.upgrade.actions
Class AddAttributeAction

    java.lang.Object
      oracle.ifs.admin.tools.upgrade.actions.AbstractUpgradeAction
          oracle.ifs.admin.tools.upgrade.actions.LibrarySessionAction
              oracle.ifs.admin.tools.upgrade.actions.AddAttributeAction

All Implemented Interfaces:
  UpgradeAction

    public class AddAttributeAction

extends LibrarySessionAction

Adds an attribute to an existing classobject.

The attributes of the new attribute are specified by properties. As a result, upgrade actions can often use this class as is, without needing to introduce an action-specific subclass.

(Unpublished)

Field Summary
`protected static java.lang.String` | `PROPERTY_CLASS` The property whose string value is name of the CLASS value.
`protected static java.lang.String` | `PROPERTY_CLASSDOMAIN` The property whose string value is name of the CLASSDOMAIN value.
`protected static java.lang.String` | `PROPERTY_DATABASEOBJECTNAME` The property whose string value is the DATABASEOBJECTNAME value.
`protected static java.lang.String` | `PROPERTY_DATALENGTH` The property whose integer value is the DATALENGTH value.
`protected static java.lang.String` | `PROPERTY_DATASCALE` The property whose integer value is the DATASCALE value.
`protected static java.lang.String` | `PROPERTY_DATATYPE` The property whose string value is the `label` of the DATATYPE value.
`protected static java.lang.String` | `PROPERTY_DESCRIPTION` The property whose string value is DESCRIPTION value.
`protected static java.lang.String` | `PROPERTY_INDEXED` The property whose boolean value is the INDEXED value.
`protected static java.lang.String` | `PROPERTY_NAME` The property whose string value is the NAME value.
`protected static java.lang.String` | `PROPERTY_REFERENTIALINTEGRITYRULE` The property whose string value is the `label` of the REFERENTIALINTEGRITYRULE value.
`protected static java.lang.String` | `PROPERTY_REQUIRED` The property whose boolean value is the REQUIRED value.
`protected static java.lang.String` | `PROPERTY_SETTABLE` The property whose boolean value is the SETTABLE value.
`protected static java.lang.String` | `PROPERTY_UNIQUE` The property whose boolean value is the UNIQUE value.
`protected static java.lang.String` | `PROPERTY_UPDATEABLE` The property whose boolean value is the UPDATEABLE value.
`protected static java.lang.String` | `PROPERTY_VALUEDEFAULT` The property whose string value is name of the VALUEDEFAULT value.
`protected static java.lang.String` | `PROPERTY_VALUEDOMAIN` The property whose string value is name of the VALUEDOMAIN value.
`protected static java.lang.String` | `PROPERTY_VALUEDOMAINVALIDATED` The property whose boolean value is VALUEDOMAINVALIDATED value.

Fields inherited from class oracle.ifs.admin.tools.upgrade.actions.LibrarySessionAction
`PROPERTY_PREVENTSESSIONTIMEOUTS`

Constructor Summary
`AddAttributeAction()`

Method Summary
`protected boolean` | `addColumnDuringPreUpgrade()` Gets whether to add the attribute's column to the "`odm_`" table during the pre-upgrade phase.
`protected void` | `analyze(LibrarySession session)` Called by `analyze`.
`protected AttributeDefinition` | `getAttributeDefinition(LibrarySession session)` Gets the AttributeDefinition for the attribute to be added.
`protected java.lang.String` | `getPreUpgradeAddColumnStatement(LibrarySession session)` Gets the "`ALTER TABLE`" statement executed to add the attribute's column to the "`odm_`" table during pre-upgrade, if `addColumnDuringPreUpgrade` returns true.
`protected void` | `preUpgrade(LibrarySession session)` Called by `preUpgrade`.
`protected void` | `rollback(LibrarySession session, boolean downgrade)` Called by `rollback`.
`protected void` | `upgrade(LibrarySession session)` Called by `upgrade`.

Methods inherited from class oracle.ifs.admin.tools.upgrade.actions.LibrarySessionAction
`abortTransaction, analyze, postUpgrade, postUpgrade, preUpgrade, rollback, upgrade`

Methods inherited from class oracle.ifs.admin.tools.upgrade.actions.AbstractUpgradeAction
`getName, getProperties, getProperty, getUpgradeActionContext, initialize`

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

Field Detail

### PROPERTY_NAME

    protected static final java.lang.String PROPERTY_NAME

  Description copied from class: `AddAttributeAction`
  The property whose string value is the NAME value.

  See Also:
    Constant Field Values
  (Unpublished)

### PROPERTY_CLASS

    protected static final java.lang.String PROPERTY_CLASS

  Description copied from class: `AddAttributeAction`
  The property whose string value is name of the CLASS value.

  See Also:
    Constant Field Values
  (Unpublished)

### PROPERTY_DATATYPE

    protected static final java.lang.String PROPERTY_DATATYPE

  Description copied from class: `AddAttributeAction`
  The property whose string value is the `label` of the DATATYPE value.

  See Also:
    Constant Field Values
  (Unpublished)

### PROPERTY_DATALENGTH

    protected static final java.lang.String PROPERTY_DATALENGTH

  Description copied from class: `AddAttributeAction`
  The property whose integer value is the DATALENGTH value.

  See Also:
    Constant Field Values
  (Unpublished)

### PROPERTY_DATASCALE

    protected static final java.lang.String PROPERTY_DATASCALE

  Description copied from class: `AddAttributeAction`
  The property whose integer value is the DATASCALE value.

  See Also:
    Constant Field Values
  (Unpublished)

### PROPERTY_UNIQUE

    protected static final java.lang.String PROPERTY_UNIQUE

  Description copied from class: `AddAttributeAction`
  The property whose boolean value is the UNIQUE value.

  See Also:
    Constant Field Values
  (Unpublished)

### PROPERTY_REQUIRED

    protected static final java.lang.String PROPERTY_REQUIRED

  Description copied from class: `AddAttributeAction`
  The property whose boolean value is the REQUIRED value.

  See Also:
    Constant Field Values
  (Unpublished)

### PROPERTY_INDEXED

    protected static final java.lang.String PROPERTY_INDEXED

  Description copied from class: `AddAttributeAction`
  The property whose boolean value is the INDEXED value.

  See Also:
    Constant Field Values
  (Unpublished)

### PROPERTY_SETTABLE

    protected static final java.lang.String PROPERTY_SETTABLE

  Description copied from class: `AddAttributeAction`
  The property whose boolean value is the SETTABLE value.

  See Also:
    Constant Field Values
  (Unpublished)

### PROPERTY_UPDATEABLE

    protected static final java.lang.String PROPERTY_UPDATEABLE

  Description copied from class: `AddAttributeAction`
  The property whose boolean value is the UPDATEABLE value.

  See Also:
    Constant Field Values
  (Unpublished)

### PROPERTY_DATABASEOBJECTNAME

    protected static final java.lang.String PROPERTY_DATABASEOBJECTNAME

  Description copied from class: `AddAttributeAction`
  The property whose string value is the DATABASEOBJECTNAME value.

  See Also:
    Constant Field Values
  (Unpublished)

### PROPERTY_CLASSDOMAIN

    protected static final java.lang.String PROPERTY_CLASSDOMAIN

  Description copied from class: `AddAttributeAction`
  The property whose string value is name of the CLASSDOMAIN value.

  See Also:
    Constant Field Values
  (Unpublished)

### PROPERTY_VALUEDOMAIN

    protected static final java.lang.String PROPERTY_VALUEDOMAIN

  Description copied from class: `AddAttributeAction`
  The property whose string value is name of the VALUEDOMAIN value.

  See Also:
    Constant Field Values
  (Unpublished)

### PROPERTY_VALUEDEFAULT

    protected static final java.lang.String PROPERTY_VALUEDEFAULT

  Description copied from class: `AddAttributeAction`
  The property whose string value is name of the VALUEDEFAULT value.

  See Also:
    Constant Field Values
  (Unpublished)

### PROPERTY_VALUEDOMAINVALIDATED

    protected static final java.lang.String PROPERTY_VALUEDOMAINVALIDATED

  Description copied from class: `AddAttributeAction`
  The property whose boolean value is VALUEDOMAINVALIDATED value.

  See Also:
    Constant Field Values
  (Unpublished)

### PROPERTY_REFERENTIALINTEGRITYRULE

    protected static final java.lang.String PROPERTY_REFERENTIALINTEGRITYRULE

  Description copied from class: `AddAttributeAction`
  The property whose string value is the `label` of the REFERENTIALINTEGRITYRULE value.

  See Also:
    Constant Field Values
  (Unpublished)

### PROPERTY_DESCRIPTION

    protected static final java.lang.String PROPERTY_DESCRIPTION

  Description copied from class: `AddAttributeAction`
  The property whose string value is DESCRIPTION value.

  See Also:
    Constant Field Values
  (Unpublished)

Constructor Detail

### AddAttributeAction

    public AddAttributeAction()

Method Detail

### analyze

    protected void analyze(LibrarySession session)
                    throws IfsException

  Description copied from class: `AddAttributeAction`
  Called by `analyze`.

  Subclasses should override this method to perform the analysis phase of the upgrade action.

  Overrides:
    `analyze` in class `LibrarySessionAction`
  Parameters:
    `session` - the session
  Throws:
    `IfsException` - if the operation fails

### preUpgrade

    protected void preUpgrade(LibrarySession session)
                       throws IfsException

  Description copied from class: `AddAttributeAction`
  Called by `preUpgrade`.

  Subclasses should override this method to perform the pre-upgrade phase of the upgrade action.

  Overrides:
    `preUpgrade` in class `LibrarySessionAction`
  Parameters:
    `session` - the session
  Throws:
    `IfsException` - if the operation fails

### upgrade

    protected void upgrade(LibrarySession session)
                    throws IfsException

  Description copied from class: `AddAttributeAction`
  Called by `upgrade`.

  Subclasses should override this method to perform the upgrade phase of the upgrade action.

  Overrides:
    `upgrade` in class `LibrarySessionAction`
  Parameters:
    `session` - the session
  Throws:
    `IfsException` - if the operation fails

### rollback

    protected void rollback(LibrarySession session,
                            boolean downgrade)
                     throws IfsException

  Description copied from class: `AddAttributeAction`
  Called by `rollback`.

  Subclasses should override this method to rollback the analysis and pre-upgrade phases of the upgrade action.

  Overrides:
    `rollback` in class `LibrarySessionAction`
  Parameters:
    `session` - the session
    `downgrade` - whether the rollback is being performed as part of a downgrade
  Throws:
    `IfsException` - if the operation fails

### addColumnDuringPreUpgrade

    protected boolean addColumnDuringPreUpgrade()
                                         throws IfsException

  Description copied from class: `AddAttributeAction`
  Gets whether to add the attribute's column to the "`odm_`" table during the pre-upgrade phase.

  A subclass that overrides this method to add the column during pre-upgrade is responsible for setting the column's initial values. For both `object-type attributes` and `array-type attributes`, the subclass must set the column to 0, not null, to indicate the attribute has a null value.

  Returns:
    false; subclasses can override this method to return true
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### getPreUpgradeAddColumnStatement

    protected java.lang.String getPreUpgradeAddColumnStatement(LibrarySession session)
                                                        throws IfsException

  Description copied from class: `AddAttributeAction`
  Gets the "`ALTER TABLE`" statement executed to add the attribute's column to the "`odm_`" table during pre-upgrade, if `addColumnDuringPreUpgrade` returns true.

  This class returns a string of form:

      ALTER TABLE tableName ADD (columnName dataType)

  where:
  - tableName is the name of the "`odm_`" table for the ClassObject specified by `AddAttributeAction.PROPERTY_CLASS`,
  - columnName is the value of `AddAttributeAction.PROPERTY_DATABASEOBJECTNAME`, or if that property is unset or null, the value of `AddAttributeAction.PROPERTY_NAME`, and
  - dataType is the `RDBMS data type` computed from the `AddAttributeAction.PROPERTY_DATATYPE`, `AddAttributeAction.PROPERTY_DATALENGTH`, and `AddAttributeAction.PROPERTY_DATASCALE` properties.

  Subclasses can override this method to change the `ALTER TABLE` statement executed.

  If `addColumnDuringPreUpgrade` returns false, the value returned by this method is ignored and may be arbitrary.

  Parameters:
    `session` - the session
  Returns:
    the `ALTER TABLE` statement
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### getAttributeDefinition

    protected AttributeDefinition getAttributeDefinition(LibrarySession session)
                                                  throws IfsException

  Description copied from class: `AddAttributeAction`
  Gets the AttributeDefinition for the attribute to be added.

  The AttributeDefinition is initialized from the properties defined by this class. Subclasses can override this method to refine the definition.

  Parameters:
    `session` - the session
  Returns:
    the definition
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD