Skip navigation links
Oracle Fusion Middleware Java API Reference for Oracle ADF Model
12c (12.2.1.1)

E67030-01
oracle.jbo.server

Class ViewLinkDefImpl

    • Field Detail

      • mAssocRef

        protected oracle.jbo.server.EntityAssociationReference mAssocRef
    • Constructor Detail

      • ViewLinkDefImpl

        public ViewLinkDefImpl()
        Constructs a query association
      • ViewLinkDefImpl

        public ViewLinkDefImpl(int defScope,
                               java.lang.String name)
      • ViewLinkDefImpl

        public ViewLinkDefImpl(java.lang.String name)
    • Method Detail

      • getAllDefNames

        public static java.lang.String[] getAllDefNames()
      • findDefObjectNoSub

        public static ViewLinkDefImpl findDefObjectNoSub(java.lang.String viewLinkDefName)
        Finds the ViewLinkDefImpl from the statically maintained list of Meta Objects. Performs essentially the same operation as findDefObject, except that it does not observe meta-object substitution.
        Parameters:
        viewLinkDefName - The fully qualified Name of the ViewDefImpl.
        Returns:
        The View Link definition object corresponding to the specified name.
      • findDefObject

        public static ViewLinkDefImpl findDefObject(java.lang.String viewLinkDefName)
        Finds the ViewLinkDefImpl from the statically maintained list of Meta Objects.
        Parameters:
        viewLinkDefName - The fully qualified Name of the ViewDefImpl.
        Returns:
        The View Link definition object corresponding to the specified name.
      • getComponentClass

        public java.lang.Class getComponentClass()
        Gets the Java Class of the component that this definition object describes, i.e., oracle.jbo.server.ViewLinkImpl.
        Returns:
        the component class.
      • buildLinkEnds

        public void buildLinkEnds(ViewDefImpl source,
                                  java.lang.String srcName,
                                  int srcCardinality,
                                  boolean isSrcPartitionUsingWhereClause,
                                  AttributeDefImpl[] srcAttrs,
                                  java.lang.String[] srcUnboundAttrNames,
                                  ViewDefImpl destination,
                                  java.lang.String destName,
                                  int destCardinality,
                                  boolean isDestPartitionUsingWhereClause,
                                  AttributeDefImpl[] destAttrs,
                                  java.lang.String[] destUnboundAttrNames,
                                  java.lang.Object entityAssocObj,
                                  java.lang.String assocClause,
                                  java.lang.String reverseAssocClause)
        Internal use only. Application developers should not use this method.
      • getBaseAssociationName

        public java.lang.String getBaseAssociationName()
      • setBaseAssociationName

        public void setBaseAssociationName(java.lang.String assocName)
      • getBindingStyle

        public int getBindingStyle()
      • isEntityAssociationReversed

        public boolean isEntityAssociationReversed()
      • setEntityAssociationReversed

        public void setEntityAssociationReversed(boolean b)
      • getEntityAssociationReference

        public oracle.jbo.server.EntityAssociationReference getEntityAssociationReference()
        Returns:
        The EntityAssociationReference.
      • setEntityAssociationReference

        public void setEntityAssociationReference(oracle.jbo.server.EntityAssociationReference assocRef)
        Parameters:
        assocRef - The EntityAssociationReference.
      • getEntityAssociation

        public EntityAssociation getEntityAssociation()
        Returns:
        The EntityAssociation.
      • getSourceEntityAssocEnd

        public AssociationEnd getSourceEntityAssocEnd()
      • getDestinationEntityAssocEnd

        public AssociationEnd getDestinationEntityAssocEnd()
      • getDestinationBindVariables

        public ViewAttributeDefImpl[] getDestinationBindVariables()
        Returns:
        The destination bind variables.
      • isPartitionUsingWhereClause

        public boolean isPartitionUsingWhereClause(boolean isReversed)
      • setDestinationBindVariables

        public void setDestinationBindVariables(ViewAttributeDefImpl[] vars)
        Parameters:
        vars - The list of AttributeDefImpls as bind variables on other end.
      • isSDOHidden

        public boolean isSDOHidden()
      • setSDOHidden

        public void setSDOHidden(boolean b)
      • diffContents

        public DifferDetails diffContents(DiffMergeable docDef,
                                          DiffMergeable orgDef,
                                          DifferDetails difDetails)
        Description copied from interface: DiffMergeable
        Performs diff of scalar values. Typically, scalar attr values are grouped into String, int, and boolean arrays -- one set coming from 'this' definition and the other set coming from orgDef. Then, help methods on DifferBase can be used to diff the attr values and accumulate the details of diff in difDetails.

        Here is example code snippet:

            private static final String DIFF_STRING_ELEMS[] =
            {
               "MyStringVal1",
               "MyStringVal2"
            };
        
            private static final String DIFF_INT_ELEMS[] =
            {
               "MyIntVal",
            }
        
            public DifferDetails diffContents(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
            {
                orgDefImpl = () orgDef;
        
               final String editStringValues[] =
               {
                  this.getMyStringVal1(),
                  this.getMyStringVal2()
               };
        
               String orgStringValues[] = null;
        
               if (orgDef != null)
               {
                  String orgV[] =
                  {
                     orgDefImpl.getMyStringVal1(),
                     orgDefImpl.getMyStringVal2()
                  };
        
                  orgStringValues = orgV;
               }
        
               final int editIntValues[] =
               {
                  this.getMyIntVal(),
               };
        
               int orgIntValues[] = null;
        
               if (orgDef != null)
               {
                  int orgV[] =
                  {
                     orgDefImpl.getMyIntVal()
                  };
        
                  orgIntValues = orgV;
               }
        
               difDetails = DifferBase.diffStringArray(this, DIFF_STRING_ELEMS, editStringValues, orgStringValues, difDetails);
               difDetails = DifferBase.diffIntArray(this, DIFF_INT_ELEMS, editIntValues, orgIntValues, difDetails);
        
               return difDetails;
           }
         

        Specified by:
        diffContents in interface DiffMergeable
        Overrides:
        diffContents in class AssociationDefBase
        Parameters:
        docDef - the document-level definition
        orgDef - the original definition. It could be null if the definition did not exist originally
        difDetails - the DifferDetails that accumulate the details of diff from the document-level (top-level) def
        Returns:
        the DifferDetails that has all the details of diff
      • applyDiffContents

        public void applyDiffContents(DifferDetails dif,
                                      DiffResolver resolver)
        Description copied from interface: DiffMergeable
        When diff/merge operation is requested, we have the following three def objects:

        orgDef - original def object (from the branch point) editDef - def object into which changes are to be merge toMergeDef - def object to be merged (source of changes) For sandbox refresh operation, orgDef comes from the branch point, editDef from the sandbox, toMergeDef from the mainline of the repos. With these three defs, we first diff editDef against orgDef, producing editDifDetails.

        Similarly, toMergeDef is diffed against orgDef, producing toMergeDifDetails. The diff engine then walks through these two sets of diffs and identifies conflicts. After the conflicts are all resolved, we apply appropriate changes to editDef.

        applyDiffContents is called to apply changes to scalar values. dif contains the changed values to be applied to 'this' object. Use sample code like the following:

            public void applyDiffContents(DifferDetails dif, DiffResolver resolver)
            {
               DifferChangeMap detailMap = dif.getDetailMap();
               Object[] updValues;
        
               // DIFF_STRING_ELEMS from the above example code
               for (int j = 0; j < DIFF_STRING_ELEMS.length; j++)
               {
                  if ((updValues = (Object[]) detailMap.getValue(DIFF_STRING_ELEMS[j])) != null)
                  {
                     switch(j)
                     {
                     case 0:
                        setMyStringVal1((String) updValues[0]);
                        break;
                     case 1:
                         setMyStringVal2((String) updValues[0]);
                        break;
                     }
                  }
               }
        
               for (int j = 0; j < DIFF_INT_ELEMS.length; j++)
               {
                  if ((updValues = (Object[]) detailMap.getValue(DIFF_INT_ELEMS[j])) != null)
                  {
                     switch(j)
                     {
                     case 0:
                        setMyIntVal((Integer) updValues[0]);
                        break;
                     }
                  }
               }
            }
         

        Notice that the index specified in the case statement is the array index of the attr in the String, int, or boolean array.

        Specified by:
        applyDiffContents in interface DiffMergeable
        Overrides:
        applyDiffContents in class AssociationDefBase
        Parameters:
        dif - changes to be applied to 'this' def
        resolver - the diff resolver used in diff/merge operation
Oracle Fusion Middleware Java API Reference for Oracle ADF Model
12c (12.2.1.1)

E67030-01

Copyright © 1997, 2016, Oracle. All rights reserved.