All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.xmlmiddleware.xmldbms.actions.Action

java.lang.Object
   |
   +----org.xmlmiddleware.xmldbms.actions.Action

public class Action
extends Object
An action to take on an element type mapped as a class. For internal use.

Version:
2.0
Author:
Ronald Bourret, 2001

Variable Index

 o DELETE
Delete a row.
 o INSERT
Insert a row.
 o NONE
Do nothing.
 o SOFTDELETE
Delete a row if it exists, otherwise do nothing.
 o SOFTINSERT
Insert a row if it does not already exist.
 o UPDATE
Update a row.
 o UPDATEORINSERT
Update a row.

Constructor Index

 o Action()
Construct a default Action object.

Method Index

 o getAction()
Get the action to be taken for the element type.
 o getElementTypeName()
Get the name of the element type to which the action applies.
 o getUpdateAttributeNames()
Get the names of attributes of the class element type to be updated.
 o getUpdateElementTypeNames()
Get the names of child elements of the class element type to be updated.
 o getUpdatePropertyMaps()
 o isPCDATAUpdated()
Whether PCDATA is to be updated for the class element type.
 o removeAllUpdateProperties()
Remove all properties from the update list.
 o removeUpdateProperty(String, String, int)
Remove a property from the update list.
 o removeUpdateProperty(XMLName, int)
Remove a property from the update list.
 o setAction(int)
Set the action to be taken for the element type.
 o setUpdateProperty(String, String, int)
Add a property to the update list.
 o setUpdateProperty(XMLName, int)
Add a property to the update list.

Variables

 o NONE
 public static final int NONE
Do nothing.

 o INSERT
 public static final int INSERT
Insert a row. If the row already exists, throw an exception.

 o SOFTINSERT
 public static final int SOFTINSERT
Insert a row if it does not already exist.

 o UPDATE
 public static final int UPDATE
Update a row. If the row does not exist, throw an exception.

 o UPDATEORINSERT
 public static final int UPDATEORINSERT
Update a row. If the row does not exist, insert it.

 o DELETE
 public static final int DELETE
Delete a row. If the row does not exist, throw an exception.

 o SOFTDELETE
 public static final int SOFTDELETE
Delete a row if it exists, otherwise do nothing.

Constructors

 o Action
 public Action()
Construct a default Action object.

Methods

 o getElementTypeName
 public final XMLName getElementTypeName()
Get the name of the element type to which the action applies.

Returns:
The element type name. Returns null if this is the default action.
 o getAction
 public final int getAction()
Get the action to be taken for the element type.

Returns:
The action. One of NONE, INSERT, SOFTINSERT, UPDATE, UPDATEORINSERT, DELETE, or SOFTDELETE.
 o setAction
 public void setAction(int action)
Set the action to be taken for the element type.

Parameters:
action - The action. One of NONE, INSERT, SOFTINSERT, UPDATE, UPDATEORINSERT, DELETE, or SOFTDELETE.
 o getUpdateElementTypeNames
 public final Enumeration getUpdateElementTypeNames()
Get the names of child elements of the class element type to be updated.

Returns:
An Enumeration of XMLNames
 o getUpdateAttributeNames
 public final Enumeration getUpdateAttributeNames()
Get the names of attributes of the class element type to be updated.

Returns:
An Enumeration of XMLNames
 o isPCDATAUpdated
 public final boolean isPCDATAUpdated()
Whether PCDATA is to be updated for the class element type.

Returns:
Whether PCDATA is updated
 o getUpdatePropertyMaps
 public final Vector getUpdatePropertyMaps()
 o setUpdateProperty
 public void setUpdateProperty(String uri,
                               String localName,
                               int type) throws XMLMiddlewareException
Add a property to the update list.

Parameters:
uri - URI of the property. Null for PCDATA.
localName - Local name of the property. Null for PCDATA.
type - PropertyMap.ELEMENTTYPE, .ATTRIBUTE, or .PCDATA
Throws: XMLMiddlewareException
Thrown if the element type, attribute or PCDATA not mapped as a property of the class element.
 o setUpdateProperty
 public void setUpdateProperty(XMLName propName,
                               int type) throws XMLMiddlewareException
Add a property to the update list.

Parameters:
propName - XMLName of the property. Null for PCDATA.
type - PropertyMap.ELEMENTTYPE, .ATTRIBUTE, or .PCDATA
Throws: XMLMiddlewareException
Thrown if the element type, attribute or PCDATA not mapped as a property of the class element.
 o removeUpdateProperty
 public void removeUpdateProperty(String uri,
                                  String localName,
                                  int type) throws XMLMiddlewareException
Remove a property from the update list.

Parameters:
uri - URI of the property. Null for PCDATA.
localName - Local name of the property. Null for PCDATA.
type - PropertyMap.ELEMENTTYPE, .ATTRIBUTE, or .PCDATA
Throws: XMLMiddlewareException
Thrown if the property is not an update property.
 o removeUpdateProperty
 public void removeUpdateProperty(XMLName propName,
                                  int type) throws XMLMiddlewareException
Remove a property from the update list.

Parameters:
propName - XMLName of the property. Null for PCDATA.
type - PropertyMap.ELEMENTTYPE, .ATTRIBUTE, or .PCDATA
Throws: XMLMiddlewareException
Thrown if the property is not an update property.
 o removeAllUpdateProperties
 public void removeAllUpdateProperties()
Remove all properties from the update list.


All Packages  Class Hierarchy  This Package  Previous  Next  Index