Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.9.0)
E15995-08


oracle.wcps.property.model
Class PreferenceSet

java.lang.Object
  extended by oracle.wcps.property.model.Timestamped
      extended by oracle.wcps.property.model.AbstractMap<IPreferenceName,Preference<java.io.Serializable>>
          extended by oracle.wcps.property.model.PreferenceSet

All Implemented Interfaces:
java.io.Serializable, java.util.Map<java.lang.String,java.io.Serializable>, IPreferenceSet, ITimestamped

public class PreferenceSet
extends AbstractMap<IPreferenceName,Preference<java.io.Serializable>>
implements IPreferenceSet, java.io.Serializable

An implementation of IPreferenceSet. Use the builder builder() to create an instance of this.

See Also:
Serialized Form

Nested Class Summary
static class PreferenceSet.Builder
          The builder used for creating a PropertySet.

 

Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>

 

Field Summary

 

Fields inherited from class oracle.wcps.property.model.AbstractMap
desc, map, namespaceName, propertySetDefinitionName

 

Method Summary
static PreferenceSet.Builder builder()
          Returns an instance of Builder to create a PropertySet.
 boolean containsKey(IPreferenceName key)
          Returns true if this preferenceset contains a mapping for the specified property name key.
protected  IPreferenceName createKey(java.lang.Object o)
           
protected  Preference<java.io.Serializable> createValue(java.lang.String k, java.io.Serializable v)
           
 boolean equals(java.lang.Object o)
           
<T extends java.io.Serializable>
T
get(IPreferenceName name, java.lang.Class<T> c)
          Returns the value (casted to the given class c) associated with the given preference name if mapped or null if this preferenceset contains no mapping for the given preference name.
protected  IPreferenceName getKey(Preference<java.io.Serializable> serializableIPreference)
           
 IPreferenceSetName getName()
          Returns name of this preference set.
<T extends java.io.Serializable>
IPreference<T>
getPreference(IPreferenceName name)
          Returns the preference with the given name if found otherwise null.
 java.util.List<IPreference<java.io.Serializable>> getPreferences()
          Returns the list of preferences of this preferenceset.
 IPropertySetName getPropertySetName()
          Returns the propertyset name of this.
 java.lang.Object getRPreferenceSet()
           
 int hashCode()
           
 void iterate(IPredicate<IPreference> predicate)
          Calls the given predicates IPredicate.apply(Object) method for each preference found in this preferenceset.
 java.lang.String name()
          Returns the string representation of the composite name of this.
<T extends java.io.Serializable>
T
put(IPreferenceName key, T value, java.lang.Class<T> c)
          Same as IPreferenceSet.put(IPreferenceName, java.io.Serializable) except it returns previously mapped value as a type of the given class c.
 java.io.Serializable put(java.lang.String key, java.io.Serializable value)
           
<T extends java.io.Serializable>
IPreference<T>
putPreference(IPreferenceName key, IPreference<T> value)
          Associates the specified value with the given preference name.
<T extends java.io.Serializable>
IPreference<T>
removePreference(IPreferenceName name)
          Removes the preference associated with the given preference name.
 void setName(IPreferenceSetName preferenceSetName)
          Sets the given preferenceSetName for this.
protected  void setNewValue(Preference<java.io.Serializable> serializableIPreference, java.io.Serializable newValue)
           
 void setPropertySetName(IPropertySetName propertySetName)
          Sets the given propertySetName for this.
 void setRPreferenceSet(java.lang.Object rPreferenceSet)
           
 java.lang.String toString()
           

 

Methods inherited from class oracle.wcps.property.model.AbstractMap
clear, containsKey, containsValue, entrySet, get, get, getDescription, getNamespaceName, getPropertySetDefinitionName, isEmpty, keySet, put, putAll, remove, setDescription, setNamespaceName, setPropertySetDefinitionName, size, values

 

Methods inherited from class oracle.wcps.property.model.Timestamped
getCreatedOn, getUpdatedOn, setCreatedOn, setUpdatedOn

 

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

 

Methods inherited from interface oracle.wcps.property.IPreferenceSet
get, getDescription, getNamespaceName, getPropertySetDefinitionName, put, setDescription, setNamespaceName, setPropertySetDefinitionName

 

Methods inherited from interface oracle.wcps.property.ITimestamped
getCreatedOn, getUpdatedOn, setCreatedOn, setUpdatedOn

 

Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, putAll, remove, size, values

 

Method Detail

put

public java.io.Serializable put(java.lang.String key,
                                java.io.Serializable value)
Specified by:
put in interface java.util.Map<java.lang.String,java.io.Serializable>
Specified by:
put in class AbstractMap<IPreferenceName,Preference<java.io.Serializable>>

createKey

protected IPreferenceName createKey(java.lang.Object o)
Specified by:
createKey in class AbstractMap<IPreferenceName,Preference<java.io.Serializable>>

getKey

protected IPreferenceName getKey(Preference<java.io.Serializable> serializableIPreference)
Specified by:
getKey in class AbstractMap<IPreferenceName,Preference<java.io.Serializable>>

setNewValue

protected void setNewValue(Preference<java.io.Serializable> serializableIPreference,
                           java.io.Serializable newValue)
Specified by:
setNewValue in class AbstractMap<IPreferenceName,Preference<java.io.Serializable>>

createValue

protected Preference<java.io.Serializable> createValue(java.lang.String k,
                                                       java.io.Serializable v)
Specified by:
createValue in class AbstractMap<IPreferenceName,Preference<java.io.Serializable>>

name

public java.lang.String name()
Description copied from interface: IPreferenceSet
Returns the string representation of the composite name of this. It is created by combining "[string representation of the namespace name of this]: [string representation of the propertysetdefinition name of this]:[propertyset name]:[string representation of the name of this]".
Specified by:
name in interface IPreferenceSet
Specified by:
name in class AbstractMap<IPreferenceName,Preference<java.io.Serializable>>
Returns:
the string representation of the composite name.

getName

public IPreferenceSetName getName()
Description copied from interface: IPreferenceSet
Returns name of this preference set.
Specified by:
getName in interface IPreferenceSet
Returns:
the name of this.

setName

public void setName(IPreferenceSetName preferenceSetName)
Description copied from interface: IPreferenceSet
Sets the given preferenceSetName for this.
Specified by:
setName in interface IPreferenceSet
Parameters:
preferenceSetName - a preference set name for this.

getPropertySetName

public IPropertySetName getPropertySetName()
Description copied from interface: IPreferenceSet
Returns the propertyset name of this.
Specified by:
getPropertySetName in interface IPreferenceSet
Returns:
the propertyset name of this.

setPropertySetName

public void setPropertySetName(IPropertySetName propertySetName)
Description copied from interface: IPreferenceSet
Sets the given propertySetName for this.
Specified by:
setPropertySetName in interface IPreferenceSet
Parameters:
propertySetName - a property set name for this.

get

public <T extends java.io.Serializable> T get(IPreferenceName name,
                                              java.lang.Class<T> c)
Description copied from interface: IPreferenceSet
Returns the value (casted to the given class c) associated with the given preference name if mapped or null if this preferenceset contains no mapping for the given preference name.
Specified by:
get in interface IPreferenceSet
Type Parameters:
T - type of a class.
Parameters:
name - a preference name.
c - the class to which the value is casted to.
Returns:
the mapped value if found otherwise null.

put

public <T extends java.io.Serializable> T put(IPreferenceName key,
                                              T value,
                                              java.lang.Class<T> c)
Description copied from interface: IPreferenceSet
Same as IPreferenceSet.put(IPreferenceName, java.io.Serializable) except it returns previously mapped value as a type of the given class c.
Specified by:
put in interface IPreferenceSet
Type Parameters:
T - type of a class.
Parameters:
key - preference name with which the specified value is to be associated.
value - value to be associated with specified key.
c - the class to which the previously mapped value is casted to.
Returns:
the previous value associated with the key, or null if there was no mapping for key.

containsKey

public boolean containsKey(IPreferenceName key)
Description copied from interface: IPreferenceSet
Returns true if this preferenceset contains a mapping for the specified property name key.
Specified by:
containsKey in interface IPreferenceSet
Parameters:
key - proeprty name whose presence in this propertyset is to be tested.
Returns:
true if this propertyset contains a mapping for the specified property name key

getPreferences

public java.util.List<IPreference<java.io.Serializable>> getPreferences()
Description copied from interface: IPreferenceSet
Returns the list of preferences of this preferenceset.
Specified by:
getPreferences in interface IPreferenceSet
Returns:
a list of preferences.

getPreference

public <T extends java.io.Serializable> IPreference<T> getPreference(IPreferenceName name)
Description copied from interface: IPreferenceSet
Returns the preference with the given name if found otherwise null.
Specified by:
getPreference in interface IPreferenceSet
Type Parameters:
T - the preference value's type.
Parameters:
name - a preference's name
Returns:
the preference with the given name if found in this preferenceset, otherwise null.

putPreference

public <T extends java.io.Serializable> IPreference<T> putPreference(IPreferenceName key,
                                                                     IPreference<T> value)
Description copied from interface: IPreferenceSet
Associates the specified value with the given preference name.
Specified by:
putPreference in interface IPreferenceSet
Type Parameters:
T - type for the value
Parameters:
key - a preference name.
value - the preference to be associated with the given preference name.
Returns:
the preference if mapped previously otherwise null.

removePreference

public <T extends java.io.Serializable> IPreference<T> removePreference(IPreferenceName name)
Description copied from interface: IPreferenceSet
Removes the preference associated with the given preference name.
Specified by:
removePreference in interface IPreferenceSet
Type Parameters:
T - the preference value's type.
Parameters:
name - a preference name
Returns:
the removed preference if the given name previously mapped otherwise null

iterate

public void iterate(IPredicate<IPreference> predicate)
Description copied from interface: IPreferenceSet
Calls the given predicates IPredicate.apply(Object) method for each preference found in this preferenceset.
Specified by:
iterate in interface IPreferenceSet
Parameters:
predicate - a predicate object.

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface java.util.Map<java.lang.String,java.io.Serializable>
Overrides:
equals in class AbstractMap<IPreferenceName,Preference<java.io.Serializable>>

hashCode

public int hashCode()
Specified by:
hashCode in interface java.util.Map<java.lang.String,java.io.Serializable>
Overrides:
hashCode in class AbstractMap<IPreferenceName,Preference<java.io.Serializable>>

toString

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

getRPreferenceSet

public java.lang.Object getRPreferenceSet()

setRPreferenceSet

public void setRPreferenceSet(java.lang.Object rPreferenceSet)

builder

public static PreferenceSet.Builder builder()
Returns an instance of Builder to create a PropertySet.
Returns:
an instance of Builder

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.9.0)
E15995-08


Copyright © 2009, 2014, Oracle and/or its affiliates. All rights reserved.