EDMModel


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 modeloptions - options for creatingThrows:EdmiException - If the method fails.See Also:EDMConstants.CreateModelOptions

      • create

        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 modelencoding - e string encoding to use for the new modeloptions - options for creatingThrows: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 insensitiveReturns:the created instanceThrows: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 insensitiveattrNames - array of attrinbute names to retrieve, null if no attrsvalues - new attribute values, attrNames[] and values[] must have same lengthReturns:the created instanceThrows:EdmiException - if the method fails

      • delete

        void delete()
             throws EdmiException

        Delete this model.

        Throws:EdmiException - if the method fails

      • deleteContents

        void deleteContents()
                     throws EdmiException

        Delete contents of this model.

        Throws:EdmiException - if the method fails

      • getRepository

        EDMRepository getRepository()
                             throws EdmiException

        Gets the repository containig this model

        Returns:Repository objectThrows:EdmiException - if the method fails

      • getOpenMode

        int getOpenMode()
                 throws EdmiException

        Check open mode, normally only used in LOCAL contexts.

        Returns:current open modeThrows:EdmiException - if the method failsSee Also:EDMConstants.OpenModes

      • setOpenMode

        void setOpenMode(int openMode)
                  throws EdmiException

        Open or close model with specified mode, normally only used in LOCAL contexts.

        Parameters:openMode - requested modeThrows:EdmiException - if the method failsSee Also:EDMConstants.OpenModes

      • getUnderlyingSchema

        EDMExpressSchema getUnderlyingSchema()
                                      throws EdmiException

        Retrieve underlying schema for this model

        Returns:Schema for this modelThrows:EdmiException - if the method fails

      • getHeaderModel

        EDMModel getHeaderModel()
                         throws EdmiException

        Check open mode (normally only used in LOCAL contexts )

        Returns:current open modeThrows:EdmiException - if the method failsSee 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

        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 EntityReturns:aggregate for the entity extentThrows: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.openModesThrows:EdmiException - if the method fails

      • closeModel

        void closeModel()
                 throws EdmiException

        This method will close the model.

        Throws:EdmiException - if the method fails