Interface SASLibrary

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

public interface SASLibrary extends RelationalSchema
Represents a SAS library. A SAS library is a collection of one or more SAS files that are recognized by SAS software and that are referenced and stored as a unit. Each file is a member of the library. SAS libraries are accessed with a LIBNAME statement. The LIBNAME statement specifies the data engine and any required or optional parameters for accessing the data source. The SASLibrary metadata type stores the LIBNAME statement arguments necessary to access a particular data source in a metadata repository.

Attributes of SASLibrary are:

Associations of SASLibrary are:

Usage

To create an instance of this SASLibrary, use the factory create methods.
Example: create a SASLibrary with name "SASLibrary_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();
 SASLibrary myObject = (SASLibrary) factory.createComplexMetadataObject(objectStore, "SASLibrary_Object", MetadataObjects.SASLIBRARY, "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_ISDBMSLIBNAME_NAME

      static final String ATTRIBUTE_ISDBMSLIBNAME_NAME
      Constant used for the name of the IsDBMSLibname attribute.

      IsDBMSLibname: A boolean that indicates whether this library uses a connection to an external database server.

      See Also:
    • ATTRIBUTE_ENGINE_NAME

      static final String ATTRIBUTE_ENGINE_NAME
      Constant used for the name of the Engine attribute.

      Engine: The engine specification used by the SAS LIBNAME statement.

      See Also:
    • ATTRIBUTE_LIBREF_NAME

      static final String ATTRIBUTE_LIBREF_NAME
      Constant used for the name of the Libref attribute.

      Libref: The libref used by the SAS LIBNAME statement.

      See Also:
    • ATTRIBUTE_ISPREASSIGNED_NAME

      static final String ATTRIBUTE_ISPREASSIGNED_NAME
      Constant used for the name of the IsPreassigned attribute.

      IsPreassigned: This boolean indicates whether the library is pre-assigned in the SAS session. If true, the other attributes of this object that contain information used by a LIBNAME statement may be provided for documentation purposes only but is not required to access the library, because the LIBNAME has been assigned via some other mechanism.

      See Also:
    • ASSOCIATION_DEFAULTLOGIN_NAME

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

      DefaultLogin: The default login to use for this library.  

      See Also:
    • ASSOCIATION_LIBRARYCONNECTION_NAME

      static final String ASSOCIATION_LIBRARYCONNECTION_NAME
      Constant used for the name of the LibraryConnection association.

      LibraryConnection: The connection to a DBMS server or a SAS server.  

      See Also:
    • ASSOCIATION_SASCATALOGS_NAME

      static final String ASSOCIATION_SASCATALOGS_NAME
      Constant used for the name of the SASCatalogs association.

      SASCatalogs: The catalogs contained in this library.  

      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:
      DefaultLogin
      LibraryConnection
      SASCatalogs
      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.
    • getIsDBMSLibname

      int getIsDBMSLibname() throws RemoteException
      Gets the int value of IsDBMSLibname
      Returns:
      The IsDBMSLibname
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • getIsDBMSLibnameState

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

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

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

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

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

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

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

      int getIsPreassigned() throws RemoteException
      Gets the int value of IsPreassigned
      Returns:
      The IsPreassigned
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • getIsPreassignedState

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

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

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

      AssociationList getLibraryConnections() throws RemoteException, MdException
      Gets the AssociationList of LibraryConnections
      Returns:
      Returns the AssociationList of LibraryConnections which can be of type:
      SASClientConnection
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException
    • getLibraryConnection

      SASClientConnection getLibraryConnection() throws RemoteException, MdException
      Gets the SASClientConnection for LibraryConnection
      Returns:
      The SASClientConnection ( null if not set) of LibraryConnectionwhich can be of type:
      SASClientConnection
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException - If error getting/setting part of the object.
    • getSASCatalogs

      AssociationList getSASCatalogs() throws RemoteException, MdException
      Gets the AssociationList of SASCatalogs
      Returns:
      Returns the AssociationList of SASCatalogs which can be of type:
      SASCatalog
      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 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.
    • getLibraryConnections

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

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

      void setIsDBMSLibname(int inIsDBMSLibname) throws RemoteException
      Sets the IsDBMSLibname value and sets the state to MetadataState.LOCAL.
      Parameters:
      inIsDBMSLibname - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setIsDBMSLibname

      void setIsDBMSLibname(int inIsDBMSLibname, int state) throws RemoteException
      Sets the IsDBMSLibname Metadata State.
      Parameters:
      inIsDBMSLibname - int
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setIsDBMSLibname

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

      void setIsDBMSLibname(String inIsDBMSLibname, int state) throws RemoteException
      Sets the IsDBMSLibname value and Metadata State.
      Parameters:
      inIsDBMSLibname - String
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setIsDBMSLibnameState

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

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

      void setEngine(String inEngine, int state) throws RemoteException
      Sets the Engine Metadata State.
      Parameters:
      inEngine - String
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setEngineState

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

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

      void setLibref(String inLibref, int state) throws RemoteException
      Sets the Libref Metadata State.
      Parameters:
      inLibref - String
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setLibrefState

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

      void setIsPreassigned(int inIsPreassigned) throws RemoteException
      Sets the IsPreassigned value and sets the state to MetadataState.LOCAL.
      Parameters:
      inIsPreassigned - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setIsPreassigned

      void setIsPreassigned(int inIsPreassigned, int state) throws RemoteException
      Sets the IsPreassigned Metadata State.
      Parameters:
      inIsPreassigned - int
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setIsPreassigned

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

      void setIsPreassigned(String inIsPreassigned, int state) throws RemoteException
      Sets the IsPreassigned value and Metadata State.
      Parameters:
      inIsPreassigned - String
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setIsPreassignedState

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

      void setDefaultLogins(AssociationList list) throws RemoteException
      Sets the DefaultLogins list to be list. Object 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. Object 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.
    • setLibraryConnections

      void setLibraryConnections(AssociationList list) throws RemoteException
      Sets the LibraryConnections list to be list. Object of which can be of type:
      SASClientConnection
      Parameters:
      list - AssociationList
      Throws:
      RemoteException - If error communicating with remote object.
    • setLibraryConnections

      void setLibraryConnections(AssociationList list, int state) throws RemoteException
      Sets the LibraryConnections list to be list. Object of which can be of type:
      SASClientConnection
      Parameters:
      list - AssociationList
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setLibraryConnection

      void setLibraryConnection(SASClientConnection inObject) throws RemoteException
      Sets the LibraryConnections list 0th element to be inObject.
      Parameters:
      inObject - SASClientConnection
      Throws:
      RemoteException - If error communicating with remote object.
    • setSASCatalogs

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

      void setSASCatalogs(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.