Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.5.0)

E13403-06


oracle.jdeveloper.deploy.dt
Class AbstractHashDependable

java.lang.Object
  extended by oracle.javatools.data.HashStructureAdapter
      extended by oracle.jdeveloper.deploy.dt.AbstractHashDependable

All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, Dependable, SubDirtyable, Dirtyable, Copyable, LinkedDirtyable

public abstract class AbstractHashDependable
extends HashStructureAdapter
implements Dependable, LinkedDirtyable, java.lang.Comparable, Copyable, java.lang.Cloneable

Base class for creating Dependable(s). Using a HashStructure for storage is necessary in order to be able to persist the Dependable in the Project or Workspace without pulling in the entire HashStructure to which the Dependable points.


Field Summary
static java.lang.String ADAPTER_CLASS_KEY
           
static java.lang.String OWNER_URL_KEY
           
static java.lang.String SOURCE_URL_KEY
           

 

Fields inherited from class oracle.javatools.data.HashStructureAdapter
_hash

 

Constructor Summary
AbstractHashDependable()
           
AbstractHashDependable(HashStructure hash)
           
AbstractHashDependable(HashStructure hash, java.lang.Class clazz)
           

 

Method Summary
abstract  boolean cache()
          Cache the target, (source and owner) of this Dependable.
 AbstractHashDependable clone()
          Clones the HashDependable by using the default (no-arg) constructor.
 int compareTo(java.lang.Object o)
           
 java.lang.Object copyTo(java.lang.Object target)
          Copy support.
protected  void copyToImpl(AbstractHashDependable copy)
          Default implementation copies only the hash structure.
static Dependable createDependable(HashStructure hash)
          Creates a typed Dependable based on a HashStructure.
 java.util.Iterator getDependencies()
          Returns all other dependables this dependable depends on.
 HashStructure getHashStructure()
          Returns the HashStructure this adapter is adapting.
 Element getSource()
          Read persisted pointer-data and get the actual source.
protected abstract  Element getSourceImpl()
          Return the Source.
 Folder getSourceOwner()
          Read persisted pointer-data and get actual source owner.
protected abstract  Folder getSourceOwnerImpl()
           
 boolean isDirty()
          True if the data in the object has been modified.
protected  boolean isReload()
           
 void linkContainingDirtyable(Dirtyable dirtyable)
           
 void linkEmbeddedDirtyable(Dirtyable dirtyable)
           
 void markDirty(boolean dirty)
          Marks the data with the specified dirty state.
protected  void maybeSetReload(java.lang.Object first, java.lang.Object second)
           
 void setOwner(Dirtyable owner)
          This method should be called to set the document in which a SubDirtyable implementation will be persisted.
protected  void setReload(boolean value)
           
 java.lang.String toString()
           
 void unlinkContainingDirtyable(Dirtyable dirtyable)
           
 void unlinkEmbeddedDirtyable(Dirtyable dirtyable)
           

 

Methods inherited from class oracle.javatools.data.HashStructureAdapter
addStructureChangeListener, containsKey, copyToImpl, equals, equalsImpl, findOrCreate, forcedCopyTo, removeStructureChangeListener, useObjectEquals

 

Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Field Detail

ADAPTER_CLASS_KEY

public static final java.lang.String ADAPTER_CLASS_KEY
See Also:
Constant Field Values

SOURCE_URL_KEY

public static final java.lang.String SOURCE_URL_KEY
See Also:
Constant Field Values

OWNER_URL_KEY

public static final java.lang.String OWNER_URL_KEY
See Also:
Constant Field Values

Constructor Detail

AbstractHashDependable

public AbstractHashDependable()

AbstractHashDependable

public AbstractHashDependable(HashStructure hash)

AbstractHashDependable

public AbstractHashDependable(HashStructure hash,
                              java.lang.Class clazz)

Method Detail

getHashStructure

public HashStructure getHashStructure()
Description copied from class: HashStructureAdapter
Returns the HashStructure this adapter is adapting.
Overrides:
getHashStructure in class HashStructureAdapter
Returns:
the HashStructure this adapter is adapting.

getSource

public Element getSource()
Read persisted pointer-data and get the actual source.
Specified by:
getSource in interface Dependable
Returns:

cache

public abstract boolean cache()
Cache the target, (source and owner) of this Dependable. AbstractHashDependable tracks if a reload is required, so there is no need to check if the target is already cached. If a sub-class does not intend to cache the loaded target, it should return true everytime this method is invoked and then do the actual load-and-return in getSourceImpl() and getSourceOwnerImpl();
Returns:
true if the target (source and owner) was successfully cached.

getSourceImpl

protected abstract Element getSourceImpl()
Return the Source. This method should be overridden by sub-classes.
Returns:

getDependencies

public java.util.Iterator getDependencies()
Description copied from interface: Dependable
Returns all other dependables this dependable depends on.
Specified by:
getDependencies in interface Dependable

getSourceOwner

public Folder getSourceOwner()
Read persisted pointer-data and get actual source owner.
Specified by:
getSourceOwner in interface Dependable
Returns:

getSourceOwnerImpl

protected abstract Folder getSourceOwnerImpl()

setReload

protected void setReload(boolean value)

isReload

protected boolean isReload()

maybeSetReload

protected void maybeSetReload(java.lang.Object first,
                              java.lang.Object second)

linkContainingDirtyable

public void linkContainingDirtyable(Dirtyable dirtyable)
Specified by:
linkContainingDirtyable in interface LinkedDirtyable

unlinkContainingDirtyable

public void unlinkContainingDirtyable(Dirtyable dirtyable)
Specified by:
unlinkContainingDirtyable in interface LinkedDirtyable

linkEmbeddedDirtyable

public void linkEmbeddedDirtyable(Dirtyable dirtyable)
Specified by:
linkEmbeddedDirtyable in interface LinkedDirtyable

unlinkEmbeddedDirtyable

public void unlinkEmbeddedDirtyable(Dirtyable dirtyable)
Specified by:
unlinkEmbeddedDirtyable in interface LinkedDirtyable

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setOwner

public void setOwner(Dirtyable owner)
Description copied from interface: SubDirtyable
This method should be called to set the document in which a SubDirtyable implementation will be persisted.
Specified by:
setOwner in interface SubDirtyable
Parameters:
owner - The Dirtyable object in which this SubDirtyable will be saved.

isDirty

public boolean isDirty()
Description copied from interface: Dirtyable
True if the data in the object has been modified.
Specified by:
isDirty in interface Dirtyable
Returns:
true if the data in the object has been modified.

markDirty

public void markDirty(boolean dirty)
Description copied from interface: Dirtyable
Marks the data with the specified dirty state. This method is called markDirty(...) instead of setDirty(...) so that the JavaBeans Introspector will not mistakenly identify "dirty" as a JavaBean property.
Specified by:
markDirty in interface Dirtyable
Parameters:
dirty - If true, sets the object as being dirty; if false, sets the object as being up-to-date.

copyTo

public java.lang.Object copyTo(java.lang.Object target)
Description copied from class: HashStructureAdapter
Copy support. The specified target must not be null and must be the exact same type as this instance.
Specified by:
copyTo in interface Copyable
Overrides:
copyTo in class HashStructureAdapter
Parameters:
target - The target object to which the state of this object should be copied. If target is null, then the copyTo method will return a new instance of this class.
Returns:
The object to which the state of this object was copied. If the target was non-null, then the return value is the same as the target object that was passed in; otherwise, the return value is a new instance of this class.

copyToImpl

protected void copyToImpl(AbstractHashDependable copy)
Default implementation copies only the hash structure. If the hash does not represent the true state, those other variables should be copied separately in an overridden method.
Parameters:
copy -

clone

public AbstractHashDependable clone()
Clones the HashDependable by using the default (no-arg) constructor.
Overrides:
clone in class java.lang.Object
Returns:

createDependable

public static Dependable createDependable(HashStructure hash)
                                   throws java.lang.InstantiationException,
                                          java.lang.ClassNotFoundException
Creates a typed Dependable based on a HashStructure. This assumes that this Dependable is a sub-class of AbstractHashDependable.
Parameters:
hash -
Returns:
Throws:
java.lang.InstantiationException
java.lang.ClassNotFoundException

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.5.0)

E13403-06


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