EDMInstance


edm.edom3

Interface EDMInstance


  • All Superinterfaces:EDMContextDependent, EDMData

    All Known Subinterfaces:EDMInstanceTools, EDMModel, EDMRepository, EDMRow



    public interface EDMInstance
    extends EDMData

    This interface represents a existing or non-existing instance in local or remote context. An instance can be a database instance or an in-memory instance.

    Author:AET

    • 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 casesentityName - entity name, caese insensitiveattrNames - array of attrinbute names to retrieve, null if no attrsvalues - new attribute values, attrNames[] and values[] must have same lengthReturns:this instanceThrows: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 useaggrType - optional aggregate type, the TYPE fields in the select are used.Returns:The created aggregateThrows:EdmiException - if the method fails

      • delete

        void delete(long options)
             throws EdmiException

        Delete this instance

        Parameters:options - control delete instance,nstance references or allThrows:EdmiException - if the method failsSee Also:EDMConstants.InstanceOptions

      • getAccessManager

        EDMAccessManager getAccessManager()
                                   throws EdmiException

        Retrieve an access manager for this instance

        Returns:Access manager objectThrows:EdmiException - itf the method fails

      • getInstanceType

        EDMInstance getInstanceType()
                             throws EdmiException

        Retrieve information on what instance type this instance is

        Returns:EntityinstanceThrows: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 startmaxElements - How many references to return as maximumReturns:Arrey of EntityinstanceThrows: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 attributeReturns:the attribute valueThrows: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 attributevalue - new attribute valueThrows: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 retrieveReturns:the attribute valuesThrows: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 retrievevalues - new attribute values, attrNames[] and values[] must have samne lengthThrows: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 attributevalue - new value for the attributeThrows:EdmiException - if the method fails

      • isInstanceOf

        boolean isInstanceOf(java.lang.String stype)
                      throws EdmiException

        Check instance type

        Parameters:stype - name to compare withReturns:true if match, false elseThrows:EdmiException - if the method fails

      • isKindOf

        boolean isKindOf(java.lang.String stype)
                  throws EdmiException

        Check instance type

        Parameters:stype - name to compare withReturns:true if match, false elseThrows: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 namevalue - new attribute valueThrows: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 namevalue - new attribute valueThrows: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 namevalue - new attribute valueThrows: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 namevalue - new attribute valueThrows: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 namevalue - new attribute valueThrows: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 attributeReturns:true isf attribute is setThrows: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 retrieveReturns:boolean array indicating if the corresponding attribute is setThrows:EdmiException - if the method fails