wt.prefs
Class UndefinedPrefEntry

java.lang.Object
  extended bywt.prefs.AbstractPrefEntry
      extended bywt.prefs.UndefinedPrefEntry
All Implemented Interfaces:
Externalizable, PrefEntry, Serializable

public class UndefinedPrefEntry
extends AbstractPrefEntry
implements PrefEntry, Serializable

The UndefinedPrefEntry class is used as a place holder data structure within the Preference package. This class represents a Preference entry that is undefined. This means that given a hierarchy of

It is possible that only the User and or Default may be defined. When caching PrefEntries, the Policy and Division level preferences are also checked for and if not present, a hit is made to the database. In this case a single check is required to check whether they are in the database. From that point, the Preference is not found can be cached as a UndefinedPrefEntry. If an UndefinedPrefEntry is the successful match in the cache, it will be ignored as if it does not exist in the cache. Performing a put operation on the cache will override the value contained in the cache. This PrefEntry is not persistable and only lives the duration of the life of the MethodServer for which it is instantiated in.

Supported API: false

Extendable: false

See Also:
PrefEntry, Serialized Form

Field Summary
private static String CLASSNAME
           
private  String context
           
private  String name
           
private  String node
           
private  String parent
           
(package private) static long serialVersionUID
           
private  String value
           
 
Fields inherited from class wt.prefs.AbstractPrefEntry
EXTERNALIZATION_VERSION_UID, OLD_FORMAT_VERSION_UID
 
Fields inherited from interface wt.prefs.PrefEntry
CONTEXT, NAME, NODE, PARENT, VALUE
 
Constructor Summary
UndefinedPrefEntry()
          Empty constructor
UndefinedPrefEntry(String parent, String node, String context, String name, String value)
          This is the constructor for the UndefinedPrefEntry following the constructors of PrefEntries.
 
Method Summary
 String[] children(String[] contexts)
          Returns the children of this PrefEntry.
 void delete()
          Since this PrefEntry is not persistable the delete does nothing
 String getConceptualClassname()
          Deprecated.  
 String getContext()
          Returns the context.
 String getName()
          Gets the value of the attribute: name.
 String getNode()
          Gets the node of the PrefEntry.
 String getParent()
          Will return the parent of the Preference Entry
 String getValue()
          Gets the value of the attribute: value.
 void persist()
          Since this PrefEntry is not persistable the persist does nothing
 PrefEntry retrieve()
          Since this PrefEntry is not persistable the retrieve does nothing and returns this.
 PrefEntry[] retrieveAll()
          Since this PrefEntry is not persistable the retrievalAll returns the current object.
 ArrayList search(String search, String[] contexts, boolean isLike)
          This will search the Preference Entry for the search string.
 void setContext(String a_Context)
          Sets the context
 void setName(String a_Name)
          Sets the value of the attribute: name.
 void setNode(String a_Node)
          Sets the node to the input node value
 void setParent(String a_Parent)
          Sets the value of the attribute: parent.
 void setValue(String a_Value)
          Sets the value of the attribute: value.
 void update()
          Since this PrefEntry is not persistable the update does nothing
 
Methods inherited from class wt.prefs.AbstractPrefEntry
readExternal, readVersion, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASSNAME

private static final String CLASSNAME

parent

private String parent

name

private String name

value

private String value

node

private String node

context

private String context

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

UndefinedPrefEntry

public UndefinedPrefEntry()
                   throws WTException
Empty constructor


UndefinedPrefEntry

public UndefinedPrefEntry(String parent,
                          String node,
                          String context,
                          String name,
                          String value)
                   throws WTException
This is the constructor for the UndefinedPrefEntry following the constructors of PrefEntries. The values passed in are stored within the object.

Method Detail

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Returns:
String

getParent

public String getParent()
Will return the parent of the Preference Entry

Specified by:
getParent in interface PrefEntry
Overrides:
getParent in class AbstractPrefEntry
Returns:
String The parent of the Preference Entry

setParent

public void setParent(String a_Parent)
               throws WTPropertyVetoException
Sets the value of the attribute: parent.

Specified by:
setParent in interface PrefEntry
Overrides:
setParent in class AbstractPrefEntry
Parameters:
a_Parent -
Throws:
WTPropertyVetoException

getName

public String getName()
Gets the value of the attribute: name.

Specified by:
getName in interface PrefEntry
Overrides:
getName in class AbstractPrefEntry
Returns:
String

setName

public void setName(String a_Name)
             throws WTPropertyVetoException
Sets the value of the attribute: name.

Specified by:
setName in interface PrefEntry
Overrides:
setName in class AbstractPrefEntry
Parameters:
a_Name -
Throws:
WTPropertyVetoException

getValue

public String getValue()
Gets the value of the attribute: value.

Specified by:
getValue in interface PrefEntry
Overrides:
getValue in class AbstractPrefEntry
Returns:
String

setValue

public void setValue(String a_Value)
              throws WTPropertyVetoException
Sets the value of the attribute: value.

Specified by:
setValue in interface PrefEntry
Overrides:
setValue in class AbstractPrefEntry
Parameters:
a_Value -
Throws:
WTPropertyVetoException

getNode

public String getNode()
Gets the node of the PrefEntry.

Specified by:
getNode in interface PrefEntry
Overrides:
getNode in class AbstractPrefEntry
Returns:
String

setNode

public void setNode(String a_Node)
             throws WTPropertyVetoException
Sets the node to the input node value

Specified by:
setNode in interface PrefEntry
Overrides:
setNode in class AbstractPrefEntry
Parameters:
a_Node - The node to set
Throws:
WTPropertyVetoException

getContext

public String getContext()
Returns the context.

Specified by:
getContext in interface PrefEntry
Overrides:
getContext in class AbstractPrefEntry
Returns:
String

setContext

public void setContext(String a_Context)
                throws WTPropertyVetoException
Sets the context

Specified by:
setContext in interface PrefEntry
Overrides:
setContext in class AbstractPrefEntry
Parameters:
a_Context -
Throws:
WTPropertyVetoException

delete

public void delete()
Since this PrefEntry is not persistable the delete does nothing

Specified by:
delete in interface PrefEntry
Specified by:
delete in class AbstractPrefEntry

retrieve

public PrefEntry retrieve()
Since this PrefEntry is not persistable the retrieve does nothing and returns this.

Specified by:
retrieve in interface PrefEntry
Specified by:
retrieve in class AbstractPrefEntry
Returns:
PrefEntry

update

public void update()
Since this PrefEntry is not persistable the update does nothing

Specified by:
update in interface PrefEntry
Specified by:
update in class AbstractPrefEntry

persist

public void persist()
Since this PrefEntry is not persistable the persist does nothing

Specified by:
persist in interface PrefEntry
Specified by:
persist in class AbstractPrefEntry

retrieveAll

public PrefEntry[] retrieveAll()
Since this PrefEntry is not persistable the retrievalAll returns the current object.

Specified by:
retrieveAll in interface PrefEntry
Specified by:
retrieveAll in class AbstractPrefEntry
Returns:
PrefEntry[]

children

public String[] children(String[] contexts)
Returns the children of this PrefEntry. Always will return an empty String.

Specified by:
children in interface PrefEntry
Specified by:
children in class AbstractPrefEntry
Parameters:
contexts -
Returns:
String[]

search

public ArrayList search(String search,
                        String[] contexts,
                        boolean isLike)
                 throws WTException
This will search the Preference Entry for the search string. The string will be enclosed with '%' as a wildcard. Also '%' may appear elsewhere in the string indicating a wildcard. if two '%%' appear this represents an actual '%' character. This method will return an empty array list.

Supported API: false

Specified by:
search in interface PrefEntry
Specified by:
search in class AbstractPrefEntry
Parameters:
search - The string to search for
contexts - The list of search contexts to use for the search.
isLike - Whether the search is a LIKE search or exact match
Returns:
ArrayList
Throws:
WTException