com.softwareag.mdm.adaptation
Class AdaptationTable

java.lang.Object
  extended bycom.softwareag.mdm.adaptation.AdaptationTable

public final class AdaptationTable
extends Object

An instance of this class holds the occurrences of a node that has been declared in Schema as mdm:table. The declaration of a table is specified at this page.

The schema instance adaptation that contains the table is called the container adaptation. A table is accessed from the container adaptation by calling method ReadContext.getTable(Path).

All the occurrences of a table are represented as adaptations and as such they benefit of inheritance features.


Method Summary
 PrimaryKey computePrimaryKey(Adaptation anOccurrence)
           
 PrimaryKey computePrimaryKey(com.softwareag.mdm.adaptation.uifacade.HrNode aRootNode)
          Deprecated. Replaced by computePrimaryKey(ValueContext).
 PrimaryKey computePrimaryKey(ValueContext aContext)
           
 PrimaryKeyWildCard computePrimaryKeyWildcard(Adaptation anAdaptation)
          Deprecated.  
 PrimaryKeyWildCard computePrimaryKeyWildcard(PrimaryKey aBase, Path wildcardKey)
          Deprecated.  
 Request createRequest()
          Creates a new request over this table.
 RequestResult createRequestResult(String predicate)
          Returns the RequestResult for the predicate specified.
 RequestResult createRequestResult(String predicate, RequestSortCriteria sortCriteria)
          Returns the RequestResult for the predicate and sort criteria specified..
 Adaptation getContainerAdaptation()
           
 com.softwareag.mdm.adaptation.uifacade.HrNode getNodeForUpdatingContent(AdaptationName aName)
          Deprecated. Use ProcedureContext.getContext(AdaptationName).
 Path[] getPrimaryKeySpec()
          Returns the paths of the schema nodes that compose the primary key of this table.
 AdaptationName getRootKey()
          All the occurrences of the tables' tree have a common root.
 SchemaNode getSchemaNode()
           
 Path getTablePath()
          Returns the path of the container node.
 boolean isEdition()
          Deprecated. Replaced by the method Adaptation.isNewOrModifiedInCurrentBranch().
 boolean isPrimaryKeyComplete(ValueContext aContext)
          Returns false if at least one field in the primary key in the context specified is not set.
 Adaptation lookupAdaptationByName(AdaptationName aName)
          Returns the occurrence specified by its name, or null if it does not exist.
 Adaptation lookupAdaptationByPrimaryKey(PrimaryKey aKey)
          Returns the occurrence specified by its primary key, or null if it does not exist or if it is in occulting mode.
 Adaptation lookupAdaptationByPrimaryKey(PrimaryKey aKey, boolean includeOcculting)
          Returns the occurrence specified by its primary key.
 Adaptation lookupAdaptationByPrimaryKey(PrimaryKey aKey, boolean ignored, boolean includeOcculting)
          Deprecated. Replaced by the method lookupAdaptationByPrimaryKey(PrimaryKey, boolean).
 Adaptation lookupAdaptationByPrimaryKey(ValueContext aContext)
          Returns the occurrence that has the primary key specified by the context passed as argument, or null if it does not exist if it is in occulting mode.
 Adaptation lookupAdaptationByPrimaryKey(ValueContext aContext, boolean includeOcculting)
          Returns the occurrence specified by its primary key.
 Adaptation lookupAdaptationByPrimaryKey(ValueContext aContext, boolean ignored, boolean includeOcculting)
          Deprecated. Replaced by the method lookupAdaptationByPrimaryKey(ValueContext, boolean).
 List selectOccurrences(String predicate)
          Returns the list of occurrences which resolve the predicate specified.
 List selectOccurrences(String predicate, RequestSortCriteria sortCriteria)
          Returns the list of occurrences which resolve the predicate specified and sorts the result.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

toString

public String toString()

lookupAdaptationByPrimaryKey

public Adaptation lookupAdaptationByPrimaryKey(ValueContext aContext)
Returns the occurrence that has the primary key specified by the context passed as argument, or null if it does not exist if it is in occulting mode.

See Also:
lookupAdaptationByPrimaryKey(ValueContext, boolean)

lookupAdaptationByPrimaryKey

public Adaptation lookupAdaptationByPrimaryKey(ValueContext aContext,
                                               boolean includeOcculting)
Returns the occurrence specified by its primary key. Returns null if:

The occurrence that is returned can be inherited from an ancestor table.

Parameters:
aContext - Context that specifies the primary key of the occurrence to look up.
includeOcculting - If true, an occulting adaptation may be returned, if false it will not return such an adaptation but null instead.

lookupAdaptationByPrimaryKey

public Adaptation lookupAdaptationByPrimaryKey(ValueContext aContext,
                                               boolean ignored,
                                               boolean includeOcculting)
Deprecated. Replaced by the method lookupAdaptationByPrimaryKey(ValueContext, boolean).


lookupAdaptationByPrimaryKey

public Adaptation lookupAdaptationByPrimaryKey(PrimaryKey aKey)
Returns the occurrence specified by its primary key, or null if it does not exist or if it is in occulting mode.


lookupAdaptationByPrimaryKey

public Adaptation lookupAdaptationByPrimaryKey(PrimaryKey aKey,
                                               boolean includeOcculting)
Returns the occurrence specified by its primary key. Returns null if:

The occurrence that is returned can be inherited from an ancestor table.

Parameters:
aKey - Identity of the occurrence to look up.
includeOcculting - If true, an occulting adaptation may be returned, if false it will not return such an adaptation but null instead.

lookupAdaptationByPrimaryKey

public Adaptation lookupAdaptationByPrimaryKey(PrimaryKey aKey,
                                               boolean ignored,
                                               boolean includeOcculting)
Deprecated. Replaced by the method lookupAdaptationByPrimaryKey(PrimaryKey, boolean).


computePrimaryKey

public PrimaryKey computePrimaryKey(Adaptation anOccurrence)

computePrimaryKey

public PrimaryKey computePrimaryKey(ValueContext aContext)

computePrimaryKey

public PrimaryKey computePrimaryKey(com.softwareag.mdm.adaptation.uifacade.HrNode aRootNode)
Deprecated. Replaced by computePrimaryKey(ValueContext).


isPrimaryKeyComplete

public boolean isPrimaryKeyComplete(ValueContext aContext)
Returns false if at least one field in the primary key in the context specified is not set.


computePrimaryKeyWildcard

public PrimaryKeyWildCard computePrimaryKeyWildcard(PrimaryKey aBase,
                                                    Path wildcardKey)
Deprecated.  

See Also:
PrimaryKeyWildCard

computePrimaryKeyWildcard

public PrimaryKeyWildCard computePrimaryKeyWildcard(Adaptation anAdaptation)
Deprecated.  

See Also:
PrimaryKeyWildCard

getPrimaryKeySpec

public Path[] getPrimaryKeySpec()
Returns the paths of the schema nodes that compose the primary key of this table.


getSchemaNode

public SchemaNode getSchemaNode()

getContainerAdaptation

public Adaptation getContainerAdaptation()

getNodeForUpdatingContent

public com.softwareag.mdm.adaptation.uifacade.HrNode getNodeForUpdatingContent(AdaptationName aName)
Deprecated. Use ProcedureContext.getContext(AdaptationName).


getTablePath

public Path getTablePath()
Returns the path of the container node.


getRootKey

public AdaptationName getRootKey()
All the occurrences of the tables' tree have a common root. This is a technical slot not seen by the user but that is useful for managing all the occurrences in a unique set, for example for deletion, optimization, etc. This common root is unique for all tables in a given instances' tree, at a given path.

This root exists even if all tables are empty. It is itself not persisted and do not support modifications.

Returns:
the key of the technical root of all the occurrences of tables at the same path.

isEdition

public boolean isEdition()
Deprecated. Replaced by the method Adaptation.isNewOrModifiedInCurrentBranch().


lookupAdaptationByName

public Adaptation lookupAdaptationByName(AdaptationName aName)
Returns the occurrence specified by its name, or null if it does not exist.


createRequest

public Request createRequest()
Creates a new request over this table.

See Also:
createRequestResult(String), createRequestResult(String, RequestSortCriteria)

createRequestResult

public RequestResult createRequestResult(String predicate,
                                         RequestSortCriteria sortCriteria)
Returns the RequestResult for the predicate and sort criteria specified..

This method is equivalent to the method selectOccurrences(String).

Parameters:
predicate - XPath simplified expression of a filter to apply on the table occurrences. If null, no filter is applied.
sortCriteria - Criteria for sorting the result. If null, no specific order is applied.
See Also:
XPath supported syntax. , selectOccurrences(String, RequestSortCriteria), Request.setXPathFilter(String), Request.setSortCriteria(RequestSortCriteria)

createRequestResult

public RequestResult createRequestResult(String predicate)
Returns the RequestResult for the predicate specified.

This method is equivalent to the method selectOccurrences(String).

See Also:
XPath supported syntax. , selectOccurrences(String), Request.setXPathFilter(String)

selectOccurrences

public List selectOccurrences(String predicate,
                              RequestSortCriteria sortCriteria)
Returns the list of occurrences which resolve the predicate specified and sorts the result.

This method is equivalent to the method createRequestResult(String).

Parameters:
predicate - XPath simplified expression of a filter to apply on the table occurrences. If null, no filter is applied.
sortCriteria - Criteria for sorting the result. If null, no specific order is applied.
See Also:
XPath supported syntax. , createRequestResult(String, RequestSortCriteria), Request.setXPathFilter(String)

selectOccurrences

public List selectOccurrences(String predicate)
Returns the list of occurrences which resolve the predicate specified.

This method is equivalent to the method createRequestResult(String).

See Also:
XPath supported syntax. , createRequestResult(String), Request.setXPathFilter(String)


(report a bug)
webMethods MDM 4.2.8 [0558]
Copyright Software AG 2000-2007. All rights reserved.