public class ViewCriteriaRowImpl extends ViewCriteriaRow implements DefPersistable, DiffMergeable
VC_CONJUNCTION, VC_ITEMS, VC_NAME, VC_NESTEDVC, VC_PROPERTIES, VC_VOBINDVARS, VCROW_CONJ_AND, VCROW_CONJ_NOT, VCROW_CONJ_ORFLAG_DIRTY, FLAG_EDITABLE, FLAG_FROM_TIP, FLAG_LOAD_BASE, FLAG_LOAD_HL_DEFS, FLAG_MAJOR_VERSION_CHANGED, FLAG_MINOR_VERSION_CHANGED, FLAG_NEW, FLAG_NEW_RECURSE, FLAG_SKIP_WRITE, XML_STATEMENTEFFDT_ADJUST_EFFECTIVE_END_DATE_MODE, EFFDT_ADJUST_EFFECTIVE_START_DATE_MODE, EFFDT_DELETE_FUTURE_CHANGE_MODE, EFFDT_DELETE_MODE, EFFDT_DELETE_NEXT_CHANGE_MODE, EFFDT_DELETE_THIS_CHANGE_MODE, EFFDT_DELETE_ZAP_MODE, EFFDT_EXPERT_MODE, EFFDT_NONE_MODE, EFFDT_UPDATE_CHANGE_INSERT_MODE, EFFDT_UPDATE_CORRECTION, EFFDT_UPDATE_INSERT_MODE, EFFDT_UPDATE_MODE, EFFDT_UPDATE_NEW_EARLIEST_CHANGE_MODE, EFFDT_UPDATE_OVERRIDE_MODE, REFRESH_CONTAINEES, REFRESH_FORGET_NEW_ROWS, REFRESH_REMOVE_NEW_ROWS, REFRESH_UNDO_CHANGES, REFRESH_WITH_DB_FORGET_CHANGES, REFRESH_WITH_DB_ONLY_IF_UNCHANGED, STATUS_INITIALIZED, STATUS_NEWXML_IGNORE_DEPTH_COUNT, XML_OPT_ALL_ROWS, XML_OPT_ASSOC_CONSISTENT, XML_OPT_CHANGES_ONLY, XML_OPT_LIMIT_RANGE, XML_PASSIVATION_USEVC_CONJ_AND, VC_CONJ_NOT, VC_CONJ_OR, VC_CONJ_UNION, VC_UPPER_COL_DEFAULT, VC_UPPER_COL_FALSE, VC_UPPER_COL_TRUE| Constructor and Description | 
|---|
ViewCriteriaRowImpl(ViewCriteria viewCriteria)  | 
ViewCriteriaRowImpl(ViewCriteria viewCriteria,
                   java.lang.Object[] data)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
applyDiffChildren(DifferDetails dif,
                 DiffResolver resolver)
Applies changes to children defs. 
 | 
void | 
applyDiffContents(DifferDetails dif,
                 DiffResolver resolver)
When diff/merge operation is requested, we have the following
 three def objects: 
 | 
DifferDetails | 
beginDiffObjects(DiffMergeable docDef,
                DiffMergeable orgDef,
                DifferDetails difDetails)
This method is the entry point call when the diffing process
 begins on the document-level def. 
 | 
protected ViewCriteriaItem | 
createCriteriaItem(int index,
                  java.lang.String name,
                  int kind)  | 
DifferDetails | 
diffChildren(DiffMergeable docDef,
            DiffMergeable orgDef,
            DifferDetails difDetails)
Performs diff of children defs. 
 | 
DifferDetails | 
diffContents(DiffMergeable docDef,
            DiffMergeable orgDef,
            DifferDetails difDetails)
Performs diff of scalar values. 
 | 
DifferDetails | 
diffObjects(DiffMergeable docDef,
           DiffMergeable orgDef,
           DifferDetails difDetails)
The work-horse method performing diff between two defs of this
 def type. 
 | 
DifferDetails | 
ensureDifferDetails(DifferDetails difDetails)
Ensures that we have a valid  
DifferDetails. | 
java.lang.String | 
getDefTypeName()
Returns the XML def type name of this defintion object, e.g.,
 "PDefEntityObject". 
 | 
java.lang.String | 
getDefXMLElementTag()  | 
java.lang.String | 
getDefXMLNameSpace()  | 
java.lang.String | 
getFullName()
This method returns the Persistence reference of the object. 
 | 
java.lang.String | 
getIdentificationAttributeName()
return the attribute name for identification on an xml element. 
 | 
java.lang.String | 
getMergeableFullName()
Returns the fully qualified name of the diff-mergeable definition object. 
 | 
java.lang.String | 
getMergeableName()
Returns the diff-mergeable definition's name (short form). 
 | 
DefPersistable | 
getOrigObject()  | 
java.lang.String | 
getXMLElementTag()
Returns a piece of static info for the type of object this is invoked
 upon. 
 | 
boolean | 
isDirty()
This method returns if an Object is modified from last save/load 
 | 
boolean | 
isNew()
This method returns if this object is previously persisted. 
 | 
boolean | 
isNewRecurse()  | 
boolean | 
isSkipWrite()  | 
boolean | 
isWriteObject(DefPersistable parentObj,
             DefWriter defWriter)  | 
void | 
loadXMLContents(DefElement xmlElement)  | 
void | 
setDirty(boolean b)
This method marks the Object dirty 
 | 
void | 
setNew(boolean b)
This method marks the as previously persisted. 
 | 
void | 
setNewRecurse(boolean b)  | 
void | 
setOrigObject(DefPersistable oldObj)  | 
void | 
setSkipWrite(boolean b)  | 
void | 
writeChildren(DefWriter jos)
Writes the Object's children to the Persistent storage 
 | 
void | 
writeContents(DefWriter jos)
Objects should write their persistence output in this method 
 | 
void | 
writeObject(DefWriter jos)
Objects should write their persistence output in this method 
 | 
addCriteriaItem, copyFrom, ensureCriteriaItem, ensureCriteriaItem, ensureCriteriaItem, ensureCriteriaItem, equals, getAllBindVariables, getAllBindVariablesInternal, getAttribute, getAttribute, getAttributeAlias, getAttributeCount, getAttributeHints, getAttributeHints, getAttributeIndexOf, getAttributeNameFromAlias, getAttributeNames, getAttributeSecurityHints, getAttributeSecurityHints, getAttributeValues, getBindVarCriteriaItem, getConjunction, getConjunctionString, getConjunctionValue, getCriteriaItem, getCriteriaItem, getCriteriaItemArray, getCriteriaItems, getCriteriaItems, getCriteriaItemsAndBindVars, getCriteriaItemsForSearch, getEffectiveDateMode, getExprVarVal, getItemsConjunction, getItemsConjunction, getKey, getLocale, getName, getNestedVCCount, getNestedViewCriteria, getOperator, getOperator, getProperties, getRootCriteriaRelativeName, getSecurityHints, getStructureDef, getUpperColumnsValue, getViewCriteria, getViewObjectBindVars, hasAttributeListChanged, hasData, hasExprDefVCItem, hasExprVarVal, hasSameConjunction, initDefLocaleContextInternal, initUniqueRowName, internalEnsureItemList, isAttributeSearchable, isAttributeUpdateable, isDead, isItemSearchable, isUpperColumns, lock, mergeFrom, notifyChanged, readXML, readXML, refresh, remove, removeAndRetain, removeCriteriaItem, removeFromCollection, resetAttributeListChanged, resetOperator, setAttribute, setAttribute, setAttributeValues, setBindVarCriteriaItem, setConjunction, setConjunctionOnItems, setCriteriaItem, setCriteriaItem, setEffectiveDateMode, setExprVarVal, setName, setNewRowState, setOperator, setOperator, setUpperColumns, setUpperColumnsValue, toString, validate, writeXML, writeXML, writeXML, writeXMLpublic ViewCriteriaRowImpl(ViewCriteria viewCriteria)
public ViewCriteriaRowImpl(ViewCriteria viewCriteria, java.lang.Object[] data)
public boolean isDirty()
DefPersistableisDirty in interface DefPersistablepublic void setDirty(boolean b)
DefPersistablesetDirty in interface DefPersistableb - If true the Object is marked Dirty.public boolean isNew()
DefPersistableisNew in interface DefPersistablepublic void setNew(boolean b)
DefPersistablesetNew in interface DefPersistableb - If true the Object is marked as new object.public boolean isNewRecurse()
isNewRecurse in interface DefPersistablepublic void setNewRecurse(boolean b)
setNewRecurse in interface DefPersistablepublic boolean isSkipWrite()
isSkipWrite in interface DefPersistablepublic void setSkipWrite(boolean b)
setSkipWrite in interface DefPersistablepublic boolean isWriteObject(DefPersistable parentObj, DefWriter defWriter)
isWriteObject in interface DefPersistablepublic DefPersistable getOrigObject()
getOrigObject in interface DefPersistablepublic void setOrigObject(DefPersistable oldObj)
setOrigObject in interface DefPersistablepublic java.lang.String getFullName()
DefPersistablegetFullName in interface DefPersistablepublic java.lang.String getMergeableName()
DiffMergeablegetMergeableName in interface DiffMergeablepublic java.lang.String getMergeableFullName()
DiffMergeablegetMergeableFullName in interface DiffMergeablepublic void writeObject(DefWriter jos)
PersistentDefinitionwriteObject in interface PersistentDefinitionjos - the Output storage for persistencepublic void writeContents(DefWriter jos)
PersistentDefinitionwriteContents in interface PersistentDefinitionjos - the Output storage for persistencepublic void writeChildren(DefWriter jos)
PersistentDefinitionwriteChildren in interface PersistentDefinitionjos - the Output storage for persistencepublic void loadXMLContents(DefElement xmlElement)
public java.lang.String getXMLElementTag()
PersistentDefinitiongetXMLElementTag in interface PersistentDefinitionpublic java.lang.String getDefXMLElementTag()
getDefXMLElementTag in interface PersistentDefinitionpublic java.lang.String getDefTypeName()
DiffMergeablegetDefTypeName in interface DiffMergeablepublic java.lang.String getDefXMLNameSpace()
getDefXMLNameSpace in interface PersistentDefinitionpublic java.lang.String getIdentificationAttributeName()
PersistentDefinitiongetIdentificationAttributeName in interface PersistentDefinitionprotected ViewCriteriaItem createCriteriaItem(int index, java.lang.String name, int kind)
createCriteriaItem in class ViewCriteriaRowpublic DifferDetails ensureDifferDetails(DifferDetails difDetails)
DiffMergeableDifferDetails.
 
 This method is to create a DifferDetails object to
 be used for diffing if necessary.  The difDetails may come in
 as null.  By calling this method, we can ensure that
 a non-null difDetails is there.  So, instead of
 writing:
 
    if (difDetails == null)
    {
       difDetails = new DifferDetails(..);
    }
    difDetails.addDiffDetail(..);
 
 we can write
 
    (difDetails = diffMergeable.ensureDifferDetails(difDetails)).addDiffDetail(..);
 
 ensureDifferDetails in interface DiffMergeabledifDetails - the incoming DifferDetails.  It may
   be null.difDetails if it wasn't
   null coming in, or a new DifferDetails if
   the incoming difDetails was nullpublic DifferDetails diffContents(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
DiffMergeableorgDef.  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)
    {
       <Your-def-class> orgDefImpl = (<Your-def-class>) 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;
   }
 
 diffContents in interface DiffMergeabledocDef - the document-level definitionorgDef - the original definition.  It could be
   null if the definition did not exist originallydifDetails - the DifferDetails that accumulate
   the details of diff from the document-level (top-level) defDifferDetails that has all the details
   of diffpublic DifferDetails diffChildren(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
DiffMergeabledifDetails and
 return it at the end.
 For example, if this def has Child1 and Child2, its implementation should look something like:
    public DifferDetails diffChildren(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
    {
       difDetails = diffChildrenChild1(docDef, orgDef, difDetails);
       difDetails = diffChildrenChild1(docDef, orgDef, difDetails);
       return difDetails;
    }
 
 
 where diffChildrenChild1() uses DifferChildren's
 helper method diffChildrenList to diff the child defs.
 
diffChildren in interface DiffMergeabledocDef - the document-level definitionorgDef - the original definition.  It could be
   null if the definition did not exist originallydifDetails - the DifferDetails that accumulate
   the details of diff from the document-level (top-level) defDifferDetails that has all the details
   of diffpublic DifferDetails beginDiffObjects(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
DiffMergeableDiffMergeable's.  'this' object is the
 changed definition.
 beginDiffObjects in interface DiffMergeabledocDef - the document-level definitionorgDef - the original definition.  It could be
   null if the definition did not exist originallydifDetails - the DifferDetails that accumulate
   the details of diff from the document-level (top-level) defDifferDetails that has all the details
   of diffpublic DifferDetails diffObjects(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
DiffMergeablediffContents
 to diff scalar values and diffChildren to diff
 children objects.  The children objects themselves are expected
 to be DiffMergeable.  'this' object is the
 changed definition.
 diffObjects in interface DiffMergeabledocDef - the document-level definitionorgDef - the original definition.  It could be
   null if the definition did not exist originallydifDetails - the DifferDetails that accumulate
   the details of diff from the document-level (top-level) defDifferDetails that has all the details
   of diffpublic void applyDiffContents(DifferDetails dif, DiffResolver resolver)
DiffMergeable
 
    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.
 
applyDiffContents in interface DiffMergeabledif - changes to be applied to 'this' defresolver - the diff resolver used in diff/merge operationpublic void applyDiffChildren(DifferDetails dif, DiffResolver resolver)
DiffMergeabledif contains the
 changes to be applied to the children.  For each child def, this method
 should first retrieve the diff details for the child, which is of type
 DifferChildren.  Then, it should call
 DifferChildren.applyDiffChanges(oracle.jbo.mom.DiffChildrenMerge, oracle.jbo.mom.DiffResolver) to perform
 the change operation.
 
 applyChanges() requires a
 DiffChildrenMerge object, which has the insert,
 update, and remove methods.  'this' def object must
 provide implmementation of these operations.
 
Here is a sample:
    public void applyDiffChildren(DifferDetails dif, DiffResolver resolver)
    {
       DifferChangeMap detailMap = dif.getDetailMap();
       if (detailMap != null)
       {
          DifferChildren difChild1 = (DifferChildren) detailMap.getValue(<XML-tag-for-Child1>);
          if (difVCs != null)
          {
             DiffChildrenMerge dm = new DiffChildrenMerge()
             {
                public void insertChild(Object id, Object value)
                {
                   .. perform insert op for Child1 ..
                }
                public void updateChild(Object id, Object value, Object oldValue)
                {
                   .. perform update op for Child1 ..
                }
                public void removeChild(Object id)
                {
                   .. perform remove op for Child1 ..
                }
             };
             difChild1.applyDiffChanges(dm, resolver);
          }
          // Similarly for Child2
       }
    }
 applyDiffChildren in interface DiffMergeable