Interface DataSourceName

All Superinterfaces:
CMetadata, DeployedDataPackage, MdObjectBase, MdObjectBaseUtil, MdObjectBaseXML, PrimaryType, RelationalSchema, Remote, Root

public interface DataSourceName extends RelationalSchema
Represents a data source name (DSN) that is a construct used by the SAS table server to identify a data source definition. A data source definition specifies how to locate and access a data source, including any authentication (such as a user name and password) that a user must supply in order to access the data and any properties used to connect to a particular data source or data sources. By using a DSN, a user can avoid specifying connection parameters to connect to a data source. An administrator can also configure a data source, determine the level of security, and share the DSN with others.

Attributes of DataSourceName are:

Associations of DataSourceName are:

Usage

To create an instance of this DataSourceName, use the factory create methods.
Example: create a DataSourceName with name "DataSourceName_Object", in repository "AAAAAAAA".
 // create a store to contain your objects for this change. If you do not have an existing object
 // or store to use.  You may obtain the store from another object by using Object.getObjectStore().
 MdFactory factory; //where "factory" is a valid MdFactory instance
 MdObjectStore objectStore = factory.createObjectStore();
 DataSourceName myObject = (DataSourceName) factory.createComplexMetadataObject(objectStore, "DataSourceName_Object", MetadataObjects.DATASOURCENAME, "AAAAAAAA");
 myObject.updateMetadataAll();  // Write object to server
 objectStore.dispose();  // dispose of the object store if it is no longer needed
 

Behavior

  • Attributes and associations for this object can be retrieved by using the methods in MdOMIUtil.
  • When changes are made to the object, either by setting an attribute or adding objects to a particular association, they can be persisted to the metadata server with the updateMetadataAll method.
  • If an object needs to be deleted, the delete method can be used. This will flag the object as being deleted on the client, and will require an update call to persist the change to the server.

Dependencies

This class depends on objects being contained in an MdObjectStore. Object stores should be disposed of when they are no longer needed as this will help clean up memory. Disposing an object store will dispose of all objects contained within that store.

Since:
9.0
  • Field Details

    • ATTRIBUTE_LOGICALNAME_NAME

      static final String ATTRIBUTE_LOGICALNAME_NAME
      Constant used for the name of the LogicalName attribute.

      LogicalName: The name used to reference this DSN.

      See Also:
    • ATTRIBUTE_DRIVER_NAME

      static final String ATTRIBUTE_DRIVER_NAME
      Constant used for the name of the Driver attribute.

      Driver: The driver used to implement this DSN.

      See Also:
    • ASSOCIATION_CHILDDATASOURCES_NAME

      static final String ASSOCIATION_CHILDDATASOURCES_NAME
      Constant used for the name of the ChildDataSources association.

      ChildDataSources: The data source names that are nested as part of the root data source name.  

      See Also:
    • ASSOCIATION_DATASOURCECONNECTION_NAME

      static final String ASSOCIATION_DATASOURCECONNECTION_NAME
      Constant used for the name of the DataSourceConnection association.

      DataSourceConnection: The connection used for this data source name.  

      See Also:
    • ASSOCIATION_DEFAULTLOGIN_NAME

      static final String ASSOCIATION_DEFAULTLOGIN_NAME
      Constant used for the name of the DefaultLogin association.

      DefaultLogin: The default login used by this data source name. 

      See Also:
    • ASSOCIATION_PARENTDATASOURCES_NAME

      static final String ASSOCIATION_PARENTDATASOURCES_NAME
      Constant used for the name of the ParentDataSources association.

      ParentDataSources: The data source name that act as the parent for this data source name. Note that the hierarchy should not be traversed from this side of the association since this data source name may be part of more than one hierarchy. 

      See Also:
  • Method Details

    • initializeRequiredObjects

      void initializeRequiredObjects() throws RemoteException
      (S) This initializes the Required Objects(Roles) which are:
      Specified by:
      initializeRequiredObjects in interface DeployedDataPackage
      Specified by:
      initializeRequiredObjects in interface MdObjectBaseUtil
      Specified by:
      initializeRequiredObjects in interface PrimaryType
      Specified by:
      initializeRequiredObjects in interface RelationalSchema
      Specified by:
      initializeRequiredObjects in interface Root
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • initializePredObjects

      void initializePredObjects() throws RemoteException
      (S) Adds the Associated objects to the predObjects which are:
      ChildDataSources
      DataSourceConnection
      Specified by:
      initializePredObjects in interface DeployedDataPackage
      Specified by:
      initializePredObjects in interface MdObjectBase
      Specified by:
      initializePredObjects in interface PrimaryType
      Specified by:
      initializePredObjects in interface RelationalSchema
      Specified by:
      initializePredObjects in interface Root
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • getLogicalName

      String getLogicalName() throws RemoteException
      Gets the String value of LogicalName
      Returns:
      The LogicalName
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • getLogicalNameState

      int getLogicalNameState() throws RemoteException
      Gets the Metadata State of LogicalName
      Returns:
      The State.
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • getLogicalNameMaxLength

      int getLogicalNameMaxLength() throws RemoteException
      Gets the maximum length of LogicalName
      Returns:
      The max size
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • getDriver

      String getDriver() throws RemoteException
      Gets the String value of Driver
      Returns:
      The Driver
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • getDriverState

      int getDriverState() throws RemoteException
      Gets the Metadata State of Driver
      Returns:
      The State.
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • getDriverMaxLength

      int getDriverMaxLength() throws RemoteException
      Gets the maximum length of Driver
      Returns:
      The max size
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • getChildDataSources

      AssociationList getChildDataSources() throws RemoteException, MdException
      Gets the AssociationList of ChildDataSources
      Returns:
      Returns the AssociationList of ChildDataSources which can be of type:
      DataSourceName
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException - If error getting/setting part of the object.
    • getDataSourceConnections

      AssociationList getDataSourceConnections() throws RemoteException, MdException
      Gets the AssociationList of DataSourceConnections
      Returns:
      Returns the AssociationList of DataSourceConnections which can be of type:
      Connection
      SASClientConnection
      OpenClientConnection
      TCPIPConnection
      COMConnection
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException
    • getDataSourceConnection

      Connection getDataSourceConnection() throws RemoteException, MdException
      Gets the Connection for DataSourceConnection
      Returns:
      The Connection ( null if not set) of DataSourceConnectionwhich can be of type:
      Connection
      SASClientConnection
      OpenClientConnection
      TCPIPConnection
      COMConnection
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException - If error getting/setting part of the object.
    • getDefaultLogins

      AssociationList getDefaultLogins() throws RemoteException, MdException
      Gets the Association list of DefaultLogins
      Returns:
      The AssociationList of DefaultLogins which can be of type:
      Login
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException - If error getting/setting part of the object.
    • getDefaultLogin

      Login getDefaultLogin() throws RemoteException, MdException
      Gets the Login for DefaultLogin
      Returns:
      The Login ( null if not set ) of DefaultLogin which can be of type:
      Login
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException - If error getting/setting part of the object.
    • getParentDataSources

      AssociationList getParentDataSources() throws RemoteException, MdException
      Gets the Association list of ParentDataSources
      Returns:
      The AssociationList of ParentDataSources which can be of type:
      DataSourceName
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException - If error getting/setting part of the object.
    • getChildDataSources

      AssociationList getChildDataSources(boolean fGoToServer) throws RemoteException, MdException
      Gets the Associationlist of ChildDataSources
      Parameters:
      fGoToServer - boolean Get the value from the server.
      Returns:
      Returns the AssociationList of ChildDataSources which can be of type:
      DataSourceName
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException - If error getting/setting part of the object.
    • getDataSourceConnections

      AssociationList getDataSourceConnections(boolean fGoToServer) throws RemoteException, MdException
      Gets the Associationlist of DataSourceConnections
      Parameters:
      fGoToServer - boolean Get the value from the server.
      Returns:
      Returns the AssociationList of DataSourceConnections which can be of type:
      Connection
      SASClientConnection
      OpenClientConnection
      TCPIPConnection
      COMConnection
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException - If error getting/setting part of the object.
    • getDefaultLogins

      AssociationList getDefaultLogins(boolean fGoToServer) throws RemoteException, MdException
      Gets the Associationlist of DefaultLogins
      Parameters:
      fGoToServer - boolean Get the value from the server.
      Returns:
      Returns the DefaultLogins which can be of type:
      Login
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException - If error getting/setting part of the object.
    • getParentDataSources

      AssociationList getParentDataSources(boolean fGoToServer) throws RemoteException, MdException
      Gets the Associationlist of ParentDataSources
      Parameters:
      fGoToServer - boolean Get the value from the server.
      Returns:
      Returns the ParentDataSources which can be of type:
      DataSourceName
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException - If error getting/setting part of the object.
    • setLogicalName

      void setLogicalName(String inLogicalName) throws RemoteException
      Sets the LogicalName value and sets the state to MetadataState.LOCAL.
      Parameters:
      inLogicalName - String
      Throws:
      RemoteException - If error communicating with remote object.
    • setLogicalName

      void setLogicalName(String inLogicalName, int state) throws RemoteException
      Sets the LogicalName Metadata State.
      Parameters:
      inLogicalName - String
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setLogicalNameState

      void setLogicalNameState(int state) throws RemoteException
      Sets the Metadata State of LogicalName.
      Parameters:
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setDriver

      void setDriver(String inDriver) throws RemoteException
      Sets the Driver value and sets the state to MetadataState.LOCAL.
      Parameters:
      inDriver - String
      Throws:
      RemoteException - If error communicating with remote object.
    • setDriver

      void setDriver(String inDriver, int state) throws RemoteException
      Sets the Driver Metadata State.
      Parameters:
      inDriver - String
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setDriverState

      void setDriverState(int state) throws RemoteException
      Sets the Metadata State of Driver.
      Parameters:
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setChildDataSources

      void setChildDataSources(AssociationList list) throws RemoteException
      Sets the ChildDataSources list to be list. Objects of which can be of type:
      DataSourceName
      Parameters:
      list - AssociationList
      Throws:
      RemoteException - If error communicating with remote object.
    • setChildDataSources

      void setChildDataSources(AssociationList inObjects, int state) throws RemoteException
      Sets the entire AssociationList to match the passed in Vector, sets the state of the AssociationList
      Parameters:
      inObjects - AssociationList
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setDataSourceConnections

      void setDataSourceConnections(AssociationList list) throws RemoteException
      Sets the DataSourceConnections list to be list. Object of which can be of type:
      Connection
      SASClientConnection
      OpenClientConnection
      TCPIPConnection
      COMConnection
      Parameters:
      list - AssociationList
      Throws:
      RemoteException - If error communicating with remote object.
    • setDataSourceConnections

      void setDataSourceConnections(AssociationList list, int state) throws RemoteException
      Sets the DataSourceConnections list to be list. Object of which can be of type:
      Connection
      SASClientConnection
      OpenClientConnection
      TCPIPConnection
      COMConnection
      Parameters:
      list - AssociationList
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setDataSourceConnection

      void setDataSourceConnection(Connection inObject) throws RemoteException
      Sets the DataSourceConnections list 0th element to be inObject.
      Parameters:
      inObject - Connection
      Throws:
      RemoteException - If error communicating with remote object.
    • setDefaultLogins

      void setDefaultLogins(AssociationList list) throws RemoteException
      Sets the DefaultLogins list to be list. Objects of which can be of type:
      Login
      Parameters:
      list - AssociationList
      Throws:
      RemoteException - If error communicating with remote object.
    • setDefaultLogins

      void setDefaultLogins(AssociationList list, int state) throws RemoteException
      Sets the DefaultLogins list to be list. Objects of which can be of type:
      Login
      Parameters:
      list - AssociationList
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setDefaultLogin

      void setDefaultLogin(Login inObject) throws RemoteException
      Sets the DefaultLogins list 0th element to be inObject.
      Parameters:
      inObject - Login
      Throws:
      RemoteException - If error communicating with remote object.
    • setParentDataSources

      void setParentDataSources(AssociationList list) throws RemoteException
      Sets the ParentDataSources list to be list. Objects of which can be of type:
      DataSourceName
      Parameters:
      list - AssociationList
      Throws:
      RemoteException - If error communicating with remote object.
    • setParentDataSources

      void setParentDataSources(AssociationList inObjects, int state) throws RemoteException
      Sets the entire ParentDataSources list to match the passed in AssociationList, sets the state of the ParentDataSources
      Parameters:
      inObjects - AssociationList
      state - int
      Throws:
      RemoteException - If error communicating with remote object.