Package edm.edom3

Interface EDMInstance

    • Method Detail

      • create

        EDMInstance create​(EDMInstance owner,
                           java.lang.String entityName,
                           java.lang.String[] attrNames,
                           EDMSelect[] values)
                    throws EdmiException
        Create instance and optionally assign attributes. For "normal" instances it is usually easier to use theEDMModel.createInstance method in stead.
        Parameters:
        owner - where to create the entity, model in most cases
        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:
        this instance
        Throws:
        EdmiException - if the method fails
      • createAggrAttrBN

        EDMAggregate createAggrAttrBN​(java.lang.String attrName,
                                      EDMSelect aggrType)
                               throws EdmiException
        Create an aggregate in an attribute
        Parameters:
        attrName - name of the attribute to use
        aggrType - optional aggregate type, the TYPE fields in the select are used.
        Returns:
        The created aggregate
        Throws:
        EdmiException - if the method fails
      • getInstanceType

        EDMInstance getInstanceType()
                             throws EdmiException
        Retrieve information on what instance type this instance is
        Returns:
        Entityinstance
        Throws:
        EdmiException - if the method fails
      • getInstanceReferences

        EDMInstance[] getInstanceReferences​(int firstIndex,
                                            int maxElements)
                                     throws EdmiException
        Retrieve information on what instances references this instance once or more.
        Parameters:
        firstIndex - Where in the index of all references possible to start
        maxElements - How many references to return as maximum
        Returns:
        Arrey of Entityinstance
        Throws:
        EdmiException - if the method fails
      • getAttrBN

        EDMSelect getAttrBN​(java.lang.String attrName)
                     throws EdmiException
        Retrieve attribute value for this instance
        Parameters:
        attrName - name of the attribute
        Returns:
        the attribute value
        Throws:
        EdmiException - if the method fails
      • putAttrBN

        void putAttrBN​(java.lang.String attrName,
                       EDMSelect value)
                throws EdmiException
        set attribute value for this instance
        Parameters:
        attrName - name of the attribute
        value - new attribute value
        Throws:
        EdmiException - if the method fails
      • getAttrsBN

        EDMSelect[] getAttrsBN​(java.lang.String[] attrNames)
                        throws EdmiException
        Retrieve attribute values for this instance
        Parameters:
        attrNames - array of attrinbute names to retrieve
        Returns:
        the attribute values
        Throws:
        EdmiException - if the method fails
      • putAttrsBN

        void putAttrsBN​(java.lang.String[] attrNames,
                        EDMSelect[] values)
                 throws EdmiException
        Set attribute values for this instance
        Parameters:
        attrNames - array of attrinbute names to retrieve
        values - new attribute values, attrNames[] and values[] must have samne length
        Throws:
        EdmiException - if the method fails
      • putProtectedAttrBN

        void putProtectedAttrBN​(java.lang.String attrName,
                                EDMSelect value)
                         throws EdmiException
        Assign a protected attribute value for this instance
        Parameters:
        attrName - name of the attribute
        value - new value for the attribute
        Throws:
        EdmiException - if the method fails
      • isInstanceOf

        boolean isInstanceOf​(java.lang.String stype)
                      throws EdmiException
        Check instance type
        Parameters:
        stype - name to compare with
        Returns:
        true if match, false else
        Throws:
        EdmiException - if the method fails
      • isKindOf

        boolean isKindOf​(java.lang.String stype)
                  throws EdmiException
        Check instance type
        Parameters:
        stype - name to compare with
        Returns:
        true if match, false else
        Throws:
        EdmiException - if the method fails
      • setAttrBN

        void setAttrBN​(java.lang.String name,
                       boolean value)
                throws EdmiException
        Assign an attribute with a boolean
        Parameters:
        name - attribute name
        value - new attribute value
        Throws:
        EdmiException - if not found or illegal to set
      • setAttrBN

        void setAttrBN​(java.lang.String name,
                       EDMInstance value)
                throws EdmiException
        Assign an attribute with an instance integer
        Parameters:
        name - attribute name
        value - new attribute value
        Throws:
        EdmiException - if not found or illegal to set
      • setAttrBN

        void setAttrBN​(java.lang.String name,
                       long value)
                throws EdmiException
        Assign an attribute with a long integer
        Parameters:
        name - attribute name
        value - new attribute value
        Throws:
        EdmiException - if not found or illegal to set
      • setAttrBN

        void setAttrBN​(java.lang.String name,
                       double value)
                throws EdmiException
        Assign an attribute with a real
        Parameters:
        name - attribute name
        value - new attribute value
        Throws:
        EdmiException - if not found or illegal to set
      • setAttrBN

        void setAttrBN​(java.lang.String name,
                       java.lang.String value)
                throws EdmiException
        Assign an attribute with a string
        Parameters:
        name - attribute name
        value - new attribute value
        Throws:
        EdmiException - if not found or illegal to set
      • testAttrBN

        boolean testAttrBN​(java.lang.String attrName)
                    throws EdmiException
        Check if a single attribute value is set for this instance
        Parameters:
        attrName - name of the attribute
        Returns:
        true isf attribute is set
        Throws:
        EdmiException - if the method fails
      • testAttrsBN

        boolean[] testAttrsBN​(java.lang.String[] attrNames)
                       throws EdmiException
        Check if nultiple attribute value are set for this instance
        Parameters:
        attrNames - array of attrinbute names to retrieve
        Returns:
        boolean array indicating if the corresponding attribute is set
        Throws:
        EdmiException - if the method fails