***  This interface is subject to change.  ***

com.sas.iquery.metadata.business
Interface Model

All Superinterfaces:
Base, java.util.EventListener, PropertyChangeListenee, java.beans.PropertyChangeListener
All Known Subinterfaces:
BusinessModel, DataSelection, InformationMap

public interface Model
extends Base

A SAS Query Services model is a persistable container of information relating to queries. The metadata common across those models are captured by this interface.


Field Summary
static java.lang.String EVENT_DESCRIPTION_CHANGED
          The event indicating that the description for this object has changed.
static java.lang.String EVENT_ID_CHANGED
          The event indicating that the ID for this object has changed.
static java.lang.String EVENT_LABEL_CHANGED
          The event indicating that the label for this object has changed.
static java.lang.String INTERMODEL_ID_DELIMITER
          In an inter-model ID, this string is used to separate a model's ID and a model item's intra-model ID.
 
Fields inherited from interface com.sas.iquery.metadata.business.Base
EVENT_OBJECT_DEFINITION_CHANGED
 
Method Summary
 ModelVersion computeModelVersion()
          Deprecated. use the save options on the InformationMap.save(FolderInterface, String, Map) method
 void dispose()
          Helps dispose of this model from memory -- causing this model and child models (dependent models in memory) to be cleared of much of their modeling.
 java.lang.String getDescription()
          Returns the description for this model
 java.lang.String getID()
          Returns this model's ID.
 java.lang.String getLabel()
          Returns the label for this model
 ModelVersion getLastPersistedModelVersion()
          Deprecated. use BriefInformationMap#getUsageVersion() on information maps
 void setDescription(java.lang.String description)
          Sets the description for this model.
 void setID(java.lang.String ID)
          Sets the ID of this model.
 void setLabel(java.lang.String label)
          Sets the label for this model.
 
Methods inherited from interface com.sas.iquery.metadata.PropertyChangeListenee
addListener, getListeners, removeListener
 

Field Detail

***  This field is subject to change.  ***

INTERMODEL_ID_DELIMITER

static final java.lang.String INTERMODEL_ID_DELIMITER
In an inter-model ID, this string is used to separate a model's ID and a model item's intra-model ID. Neither a model's ID nor a model item's intra-model ID can contain this character.

See Also:
Constant Field Values

***  This field is subject to change.  ***

EVENT_LABEL_CHANGED

static final java.lang.String EVENT_LABEL_CHANGED
The event indicating that the label for this object has changed.

See Also:
Constant Field Values

***  This field is subject to change.  ***

EVENT_DESCRIPTION_CHANGED

static final java.lang.String EVENT_DESCRIPTION_CHANGED
The event indicating that the description for this object has changed.

See Also:
Constant Field Values

***  This field is subject to change.  ***

EVENT_ID_CHANGED

static final java.lang.String EVENT_ID_CHANGED
The event indicating that the ID for this object has changed.

See Also:
Constant Field Values
Method Detail
***  This method is subject to change.  ***

getLabel

java.lang.String getLabel()
Returns the label for this model

Returns:
the label for this model or null if not set

***  This method is subject to change.  ***

setLabel

void setLabel(java.lang.String label)
              throws MetadataException
Sets the label for this model. Validation methods, if any, are currently provided by subclasses. For example,

Parameters:
label - the string to use as the label.
Throws:
MetadataException - if this is not a valid label
MetadataNotChangeableException - if this model is read-only
See Also:

Property change events signalled:

  • EVENT_LABEL_CHANGED

***  This method is subject to change.  ***

getDescription

java.lang.String getDescription()
Returns the description for this model

Returns:
the description for this model or null if not set

***  This method is subject to change.  ***

setDescription

void setDescription(java.lang.String description)
Sets the description for this model.

Property change events signalled:

Parameters:
description - the description for this model
Throws:
MetadataNotChangeableException - if this model is read-only

***  This method is subject to change.  ***

getID

java.lang.String getID()
Returns this model's ID. This ID is used in forming "intermodel" IDs for each of the objects contained within this model. Models are created using a default unique ID within a chain of models from the model to the root of the tree of models.

Returns:
this model's ID.

***  This method is subject to change.  ***

setID

void setID(java.lang.String ID)
           throws MetadataException
Sets the ID of this model. Validation methods, if any, are currently provided by subclasses. For example,

Parameters:
ID - this model's new ID, must not be null
Throws:
MetadataNotChangeableException - if this model is read-only
MetadataException - if this operation failed. Example of failure are:
  • If the ID given is already used by a model that this model is based upon.
  • If the given name contains an illegal character.
See Also:

Property change events signalled:

  • EVENT_ID_CHANGED

***  This method is subject to change.  ***

getLastPersistedModelVersion

ModelVersion getLastPersistedModelVersion()
Deprecated. use BriefInformationMap#getUsageVersion() on information maps

Returns the version of the model as it was last read from persistent storage. If this model is newly created in memory, null is returned.

Returns:
the version of the model as it was last read from persistent storage or null if this model was newly created in memory.
See Also:
computeModelVersion()

***  This method is subject to change.  ***

computeModelVersion

ModelVersion computeModelVersion()
                                 throws MetadataException
Deprecated. use the save options on the InformationMap.save(FolderInterface, String, Map) method

Computes and returns the version of this in-memory model. The computation process for determining the version of this model requires the model to be persistable. If it is not persistable a MetadataException will be thrown.

This method is useful in diagnosing if this model, when being written over its existing persistent storage location, would cause an upgrade in the model's version. That is, prior to writing out this model, one can test whether the model's version would be upgraded as part of the write. When a model's version is upgraded (determinable by comparing the output of this method to the output of getLastPersistedModelVersion()), older versions of IQ software may not be able to read the newly persisted model.

For example, if this method returns ModelVersion.VERSION_913 and its previously stored model had ModelVersion.VERSION_912, then release 9.1.2 software will not be able to read this model if it is written over its previously stored location.

Returns:
the newly computed version of this model.
Throws:
MetadataException - if the model is not properly defined in memory causing it to not be persistable.

***  This method is subject to change.  ***

dispose

void dispose()
Helps dispose of this model from memory -- causing this model and child models (dependent models in memory) to be cleared of much of their modeling. What gets cleared are references the models have to ModelItem objects and listeners the models have on those objects.

This method exists for users to call when they are done with a model to remove any paths to a GC root within the model that may unknowingly exist.

Disposing of a model via this method causes the in-memory model to be essentially gutted, allowing the JVM's garbage collector to collect the model and it's model items.

Calling any methods on a model after it has been disposed is not recommended and can have undesirable results. Doing so is done at your own risk.


***  This interface is subject to change.  ***




Copyright © 2009 SAS Institute Inc. All Rights Reserved.