Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.openjpa.lib.conf
Class PluginValue

    java.lang.Object
      org.apache.openjpa.lib.conf.Value
          org.apache.openjpa.lib.conf.ObjectValue
              org.apache.openjpa.lib.conf.PluginValue

All Implemented Interfaces:
  Cloneable

Direct Known Subclasses:
  BrokerFactoryValue, BrokerValue, EntityManagerFactoryValue, MappingFactoryValue, MappingRepositoryValue, MetaDataRepositoryValue, QueryCompilationCacheValue, RemoteCommitProviderValue, SeqValue

    public class PluginValue

extends ObjectValue

A plugin `Value` consisting of plugin name and properties. Plugins should be specified in the form:
`<plugin-name>(<prop1>=<val1>, ...)`
Both the plugin name and prop list are optional, so that the following forms are also valid:
`<plugin-name>`
`<prop1>=<val1> ...` Defaults and aliases on plugin values apply only to the plugin name.

Author:
  Abe White

Field Summary

Fields inherited from class org.apache.openjpa.lib.conf.Value
`INVISIBLE`

Constructor Summary
`PluginValue(String prop, boolean singleton)`

Method Summary
`Object` | `configure(Object obj, Configuration conf, boolean fatal)` Configure the given object.
`String` | `getClassName()` The plugin class name.
`protected String` | `getInternalString()` Return the internal string form of this value.
`String` | `getProperties()` The plugin properties.
`String` | `getString()` Return a stringified version of this value.
`Class<Object>` | `getValueType()` Returns the type of the property that this Value represents.
`Object` | `instantiate(Class<?> type, Configuration conf, boolean fatal)` Instantiate the plugin as an instance of the given class.
`boolean` | `isSingleton()` Whether this value is a singleton.
`protected void` | `objectChanged()` Implement this method to synchronize internal data with the new object value.
`void` | `set(Object obj, boolean derived)` The internal value.
`void` | `setClassName(String name)` The plugin class name.
`protected void` | `setInternalString(String str)` Set this value from the given string.
`void` | `setProperties(String props)` The plugin properties.
`void` | `setString(String str)` Set this value from the given string.

Methods inherited from class org.apache.openjpa.lib.conf.ObjectValue
`configure, get, instantiate, newInstance, set, setInternalObject`

Methods inherited from class org.apache.openjpa.lib.conf.Value
`addEquivalentKey, addListener, alias, alias, assertChangeable, clone, containsReadOnlyConfigurationAsListener, equals, getAliases, getDefault, getEquivalentKeys, getInstantiatingGetter, getListeners, getLoadKey, getOriginalValue, getProperty, getPropertyKeys, getScope, hashCode, hide, isAliasListComprehensive, isDefault, isDynamic, isHidden, isPrivate, makePrivate, matches, removeListener, setAlias, setAlias, setAliases, setAliasListComprehensive, setDefault, setDynamic, setInstantiatingGetter, setLoadKey, setObject, setProperty, setScope, toString, unalias, unalias, valueChanged`

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

Constructor Detail

### PluginValue

    public PluginValue(String prop,
                       boolean singleton)

Method Detail

### isSingleton

    public boolean isSingleton()

  Whether this value is a singleton.

### getClassName

    public String getClassName()

  The plugin class name.

### setClassName

    public void setClassName(String name)

  The plugin class name.

### getProperties

    public String getProperties()

  The plugin properties.

### setProperties

    public void setProperties(String props)

  The plugin properties.

### instantiate

    public Object instantiate(Class<?> type,
                              Configuration conf,
                              boolean fatal)

  Instantiate the plugin as an instance of the given class.

  Overrides:
    `instantiate` in class `ObjectValue`

### configure

    public Object configure(Object obj,
                            Configuration conf,
                            boolean fatal)

  Configure the given object.

  Overrides:
    `configure` in class `ObjectValue`

### set

    public void set(Object obj,
                    boolean derived)

  Description copied from class: `ObjectValue`
  The internal value.

  Overrides:
    `set` in class `ObjectValue`
    `derived` - if true, this value was derived from other properties

### getString

    public String getString()

  Description copied from class: `Value`
  Return a stringified version of this value. If the current value has a short alias key, the alias key is returned.

  Overrides:
    `getString` in class `Value`

### setString

    public void setString(String str)

  Description copied from class: `Value`
  Set this value from the given string. If the given string is null or empty and a default is defined, the default is used. If the given string(or default) is an alias key, it will be converted to the corresponding value internally.
  If this Value is being set to a non-default value for the first time (as designated by `originalString` being null), then the value is remembered as original. This original value is used for equality and hashCode computation if this Value is `dynamic`.

  Overrides:
    `setString` in class `Value`

### getValueType

    public Class<Object> getValueType()

  Description copied from class: `Value`
  Returns the type of the property that this Value represents.

  Overrides:
    `getValueType` in class `ObjectValue`

### objectChanged

    protected void objectChanged()

  Description copied from class: `ObjectValue`
  Implement this method to synchronize internal data with the new object value.

  Overrides:
    `objectChanged` in class `ObjectValue`

### getInternalString

    protected String getInternalString()

  Description copied from class: `Value`
  Return the internal string form of this value.

  Overrides:
    `getInternalString` in class `ObjectValue`

### setInternalString

    protected void setInternalString(String str)

  Description copied from class: `Value`
  Set this value from the given string.

  Overrides:
    `setInternalString` in class `ObjectValue`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.