Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

oracle.javatools.data
Class HashStructureAdapter

java.lang.Object
  extended by oracle.javatools.data.HashStructureAdapter
Direct Known Subclasses:
AcceleratorDefinitions, ApplicationCacheSettings, ApplicationContent, ApplicationContent, AuditPreferences, ChangeEventSource, CheckForUpdatesPreferences, ConnectionInfo, ContentSet, DataTypeSettings, DDLOptions, DependencyConfiguration, EditorsOptions, ExternalProgramToolProperties, ExternalToolBaseProperties, GlobalSettings, HelpDefinitions, HelpMacros, HTMLGeneratorOptions, J2eeSettings, JProjectLibraries, JProjectLibraryList, LazyClassAdapter, LazyResourceAdapter, Libraries, LibraryAdapter, LibraryReference, NodeMigrationTracker, OfflineDBProjectSettings, OwnerMap, PathsConfiguration, PatternFilters, PlSqlCompilerOptions, Preferences, PrintOptions, ProjectContent, ProjectVersion, ProviderDefaultTemplateSettings, ProviderDependencySettings, ProviderSettings, RecentFile, RegisteredBundleAdapter, ResourceBundleOptions, ResourceBundlePreferences, ResourceBundleSelectionValidators, ResourcePaths, RunConfiguration, RunConfigurations, RunnerOptions, SettingsCustomizations, SettingsFieldCustomizations, TechnologyScopeConfiguration, TransferDescriptor, UsageData, UserPropertyDefn, VCSCommentTemplatesPrefs, VCSPreferences, WizardWelcomeSettings, WorkingSet, WorkingSets

public class HashStructureAdapter
extends java.lang.Object

This class serves as a base implementation of an adapter pattern to bridge JavaBeans-style getter and setter methods with HashStructure storage. This base implementation provides a standard implementation of equals(..) and copyTo(..) that most subclasses can inherit without overriding.


Field Summary
protected  HashStructure _hash
           
 
Constructor Summary
protected HashStructureAdapter(HashStructure hash)
          The specified HashStructure must not be null.
 
Method Summary
 void addStructureChangeListener(StructureChangeListener sl)
          Adds a listener that will be notified when the hash structure this object is adapting is modified.
 boolean containsKey(java.lang.String key)
          Convenience method for testing if the specified key, which is relative to the HashStructure that this HashStructureAdapter attaches to, currently exists in the HashStructure.
 java.lang.Object copyTo(java.lang.Object target)
          Copy support.
protected  void copyToImpl(HashStructureAdapter copy)
          This method implements the copy operation.
 boolean equals(java.lang.Object o)
          Equals support.
protected  boolean equalsImpl(HashStructureAdapter other)
          This method implements the equals operation.
protected static HashStructure findOrCreate(PropertyStorage storage, java.lang.String name)
          This method tries to find an existing instance of a HashStructure by the specified name.
 void forcedCopyTo(HashStructureAdapter copy)
          Copies the HashStructure of this adapter to the HashStructure of the specified copy.
protected  HashStructure getHashStructure()
          Returns the HashStructure this adapter is adapting.
 void removeStructureChangeListener(StructureChangeListener sl)
          Removes a listener from the hash structure this object is adapting.
protected  void useObjectEquals()
          Deprecated. Do not use this method. It's only a transition mechansim that will not be supported in production.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_hash

protected final HashStructure _hash
Constructor Detail

HashStructureAdapter

protected HashStructureAdapter(HashStructure hash)
The specified HashStructure must not be null.

Throws:
java.lang.IllegalArgumentException - if the specified HashStructure is null.
Method Detail

findOrCreate

protected static HashStructure findOrCreate(PropertyStorage storage,
                                            java.lang.String name)
This method tries to find an existing instance of a HashStructure by the specified name. If none can be found, this method will create a new HashStructure, first attempting to wire that into the specified name in the PropertyStorage or, failing that, leave the new HashStructure disconnected.

This method is guaranteed to return a non-null.


useObjectEquals

protected final void useObjectEquals()
Deprecated. Do not use this method. It's only a transition mechansim that will not be supported in production.


copyTo

public java.lang.Object copyTo(java.lang.Object target)
Copy support. The specified target must not be null and must be the exact same type as this instance.

Throws:
java.lang.IllegalArgumentException - if the specified target is null or not the exact same type as this instance.

forcedCopyTo

public final void forcedCopyTo(HashStructureAdapter copy)
Copies the HashStructure of this adapter to the HashStructure of the specified copy. No type-match check is made; the contents of the originating HashStructure are simply bulk copied to the target.

Parameters:
copy - The target of the copy operation.

copyToImpl

protected final void copyToImpl(HashStructureAdapter copy)
This method implements the copy operation. A subclass that overrides the copyTo(Object) method can call this method to skip the validation logic implemented in copyTo(Object).


containsKey

public boolean containsKey(java.lang.String key)
Convenience method for testing if the specified key, which is relative to the HashStructure that this HashStructureAdapter attaches to, currently exists in the HashStructure.

Parameters:
key - The key to test for existence.
Returns:
true if the key exists, false otherwise.

addStructureChangeListener

public void addStructureChangeListener(StructureChangeListener sl)
Adds a listener that will be notified when the hash structure this object is adapting is modified.

If the listener is already attached, this method will do nothing.

Parameters:
sl - a listener to attach to the hash structure.
Throws:
java.lang.IllegalArgumentException - if sl is null.
Since:
11.1.1

removeStructureChangeListener

public void removeStructureChangeListener(StructureChangeListener sl)
Removes a listener from the hash structure this object is adapting.

Parameters:
sl - a listener to remove from the hash structure.
Since:
11.1.1

getHashStructure

protected HashStructure getHashStructure()
Returns the HashStructure this adapter is adapting.

Returns:
the HashStructure this adapter is adapting.
Since:
11.1.1

equals

public boolean equals(java.lang.Object o)
Equals support. As long as the subclass stores all data in the _hash, this base equals implementation should be sufficient and not need to be overridden.

Overrides:
equals in class java.lang.Object

equalsImpl

protected final boolean equalsImpl(HashStructureAdapter other)
This method implements the equals operation. A subclass that overrides equals(Object) can call this method to skip the validation logic in equals(Object).


Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

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