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
-
DELETE
- Delete a row.
-
INSERT
- Insert a row.
-
NONE
- Do nothing.
-
SOFTDELETE
- Delete a row if it exists, otherwise do nothing.
-
SOFTINSERT
- Insert a row if it does not already exist.
-
UPDATE
- Update a row.
-
UPDATEORINSERT
- Update a row.
-
Action()
- Construct a default Action object.
-
getAction()
- Get the action to be taken for the element type.
-
getElementTypeName()
- Get the name of the element type to which the action applies.
-
getUpdateAttributeNames()
- Get the names of attributes of the class element type to be updated.
-
getUpdateElementTypeNames()
- Get the names of child elements of the class element type to be updated.
-
getUpdatePropertyMaps()
-
-
isPCDATAUpdated()
- Whether PCDATA is to be updated for the class element type.
-
removeAllUpdateProperties()
- Remove all properties from the update list.
-
removeUpdateProperty(String, String, int)
- Remove a property from the update list.
-
removeUpdateProperty(XMLName, int)
- Remove a property from the update list.
-
setAction(int)
- Set the action to be taken for the element type.
-
setUpdateProperty(String, String, int)
- Add a property to the update list.
-
setUpdateProperty(XMLName, int)
- Add a property to the update list.
NONE
public static final int NONE
- Do nothing.
INSERT
public static final int INSERT
- Insert a row. If the row already exists, throw an exception.
SOFTINSERT
public static final int SOFTINSERT
- Insert a row if it does not already exist.
UPDATE
public static final int UPDATE
- Update a row. If the row does not exist, throw an exception.
UPDATEORINSERT
public static final int UPDATEORINSERT
- Update a row. If the row does not exist, insert it.
DELETE
public static final int DELETE
- Delete a row. If the row does not exist, throw an exception.
SOFTDELETE
public static final int SOFTDELETE
- Delete a row if it exists, otherwise do nothing.
Action
public Action()
- Construct a default Action object.
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.
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.
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.
getUpdateElementTypeNames
public final Enumeration getUpdateElementTypeNames()
- Get the names of child elements of the class element type to be updated.
- Returns:
- An Enumeration of XMLNames
getUpdateAttributeNames
public final Enumeration getUpdateAttributeNames()
- Get the names of attributes of the class element type to be updated.
- Returns:
- An Enumeration of XMLNames
isPCDATAUpdated
public final boolean isPCDATAUpdated()
- Whether PCDATA is to be updated for the class element type.
- Returns:
- Whether PCDATA is updated
getUpdatePropertyMaps
public final Vector getUpdatePropertyMaps()
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.
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.
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.
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.
removeAllUpdateProperties
public void removeAllUpdateProperties()
- Remove all properties from the update list.
All Packages Class Hierarchy This Package Previous Next Index