Package edm.edom3

Interface EDMModel

  • All Superinterfaces:
    EDMContextDependent, EDMData, EDMInstance

    public interface EDMModel
    extends EDMInstance
    This interface represents a existing or non-existing model in local or remote context. Mostly used for local/remote interchange operations (now).
    • Method Detail

      • create

        void create​(EDMSchema schema,
                    long options)
             throws EdmiException
        Create a model in the database with default string encoding. Remember to set correct options when creating a model.
        Parameters:
        schema - schema to use for the new model
        options - options for creating
        Throws:
        EdmiException - If the method fails.
        See Also:
        EDMConstants.CreateModelOptions
      • create

        @Deprecated
        void create​(EDMSchema schema,
                    java.lang.String encoding,
                    int options)
             throws EdmiException
        Deprecated.
        Use create(EDMSchema schema,int options), encoding must be given as an option
        Create a model in the database with given string encoding. Remember to set correct options when creating a model.
        Parameters:
        schema - schema to use for the new model
        encoding - e string encoding to use for the new model
        options - options for creating
        Throws:
        EdmiException - If the method fails.
        See Also:
        EDMConstants.CreateModelOptions
      • createInstance

        EDMInstance createInstance​(java.lang.String entityName)
                            throws EdmiException
        Create an instance in this model
        Parameters:
        entityName - entity name, caese insensitive
        Returns:
        the created instance
        Throws:
        EdmiException - if the method fails
      • createInstance

        EDMInstance createInstance​(java.lang.String entityName,
                                   java.lang.String[] attrNames,
                                   EDMSelect[] values)
                            throws EdmiException
        Create an instance in this model and optionally assign attributes.
        Parameters:
        entityName - entity name, caese insensitive
        attrNames - array of attrinbute names to retrieve, null if no attrs
        values - new attribute values, attrNames[] and values[] must have same length
        Returns:
        the created instance
        Throws:
        EdmiException - if the method fails
      • deleteContents

        void deleteContents()
                     throws EdmiException
        Delete contents of this model.
        Throws:
        EdmiException - if the method fails
      • setOpenMode

        void setOpenMode​(int openMode)
                  throws EdmiException
        Open or close model with specified mode, normally only used in LOCAL contexts.
        Parameters:
        openMode - requested mode
        Throws:
        EdmiException - if the method fails
        See Also:
        EDMConstants.OpenModes
      • setHeaderModel

        void setHeaderModel​(EDMModel headerModel)
                     throws EdmiException
        Assigns a header to the model
        Parameters:
        headerModel - header model to assign, null to unassign.
        Throws:
        EdmiException - if the method fails
      • getEDMEncoding

        java.lang.String getEDMEncoding()
        Get encoding for this model.
        Returns:
        encoding name, null if none
      • setEDMEncoding

        @Deprecated
        void setEDMEncoding​(java.lang.String s)
        Deprecated.
        encoding should be set when a model is created, and read from model meta data when retrieving data. Kept for backward compatibility.
        Override model encoding as read from EDM. Can be used when utilizing a model object that does not yet exist. It is not possible to set the model encoding in database with this function.
        Parameters:
        s - encoding name, null if none
      • getEntityExtent

        EDMAggregate getEntityExtent​(java.lang.String entityName)
                              throws EdmiException
        Returns all of the instances of the given entity name (Entity Extent).
        Parameters:
        entityName - The name of the Entity
        Returns:
        aggregate for the entity extent
        Throws:
        EdmiException - if entity not found
      • openModel

        void openModel​(int openMode)
                throws EdmiException
        This method will open the model based on the given model.
        Parameters:
        openMode - AN integer based on EDMCOnstants.openModes
        Throws:
        EdmiException - if the method fails
      • closeModel

        void closeModel()
                 throws EdmiException
        This method will close the model.
        Throws:
        EdmiException - if the method fails