|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface Transaction.OptionMetadata
An interface that allows clients to query certain meta-data about transaction options.
This interface is not intended to be implemented by clients. Extend the
BasicTransactionOptionMetadata
class, instead.
BasicTransactionOptionMetadata
,
Transaction.OptionMetadata.Registry
Nested Class Summary | |
---|---|
static interface |
Transaction.OptionMetadata.Registry
A registry of metadata describing transaction options. |
Method Summary | |
---|---|
Object |
getDefaultValue()
Obtains the default value of an option. |
Object |
getOption()
Obtains the key of the option that I describe. |
Class<?> |
getType()
Obtains the type value of an option. |
Object |
getValue(Map<?,?> options)
Gets the value (implicit/default or explicit) of my option in the specified map. |
void |
inherit(Map<?,?> parentOptions,
Map<Object,Object> childOptions,
boolean force)
Updates the options map of a child transaction to inherit the setting in a parent transaction, if it is a hereditary option and the child does not already have a setting for it. |
boolean |
isHereditary()
Queries whether the option is inherited by nested transactions. |
boolean |
isSet(Map<?,?> options)
Queries whether the specified map has a setting for my option. |
boolean |
isTag()
Queries whether the option is a tag, meaning that it adorns a transaction with client-specific information but that it does not otherwise affect the semantics (or behaviour) of the transaction. |
boolean |
sameSetting(Map<?,?> options1,
Map<?,?> options2)
Queries whether the specified options maps have the same value of my option, whether that be implicit or explicit. |
Method Detail |
---|
Object getOption()
boolean isTag()
Queries whether the option is a tag, meaning that it adorns a transaction with client-specific information but that it does not otherwise affect the semantics (or behaviour) of the transaction.
Unrecognized options are assumed to be tags, because a transaction would not be able to interpret their meaning.
true
if the option key is a tag option or if it
is not recognized by this meta-data instance;
false
if it is recognized and is known not to be
a tagboolean isHereditary()
Queries whether the option is inherited by nested transactions.
Unrecognized options are assumed to be inherited.
true
if the option is inherited or if it is not
recognized; false
if it is not inheritedClass<?> getType()
Obtains the type value of an option.
The type of an unrecognized option is assumed to be Object
.
Object
if it
is not knownObject getDefaultValue()
Obtains the default value of an option.
The default value of an unrecognized option is assumed to be
null
.
null
if it
is not knownObject getValue(Map<?,?> options)
options
- an options map
boolean isSet(Map<?,?> options)
options
- an options map
boolean sameSetting(Map<?,?> options1, Map<?,?> options2)
Transaction.OPTION_VALIDATE_EDIT
in which values of two
different types may mean the same thing.
options1
- an options mapoptions2
- another options map
void inherit(Map<?,?> parentOptions, Map<Object,Object> childOptions, boolean force)
parentOptions
- the options map to inherit a value from. It is conceivable
that inheritance of an option may depend on more than one
option in this parent mapchildOptions
- the map that is to inherit the option settingforce
- whether to inherit the option anyway despite that it is
not hereditary. This is used for application of default
options, and can be ignored by the implementor if
necessary. Also, clients must not use this parameter to
attempt to override an existing child setting; a
well-behaved option will not do that
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |