org.jboss.system.server.profileservice.persistence
Class AbstractValuePersistence

java.lang.Object
  extended by org.jboss.system.server.profileservice.persistence.AbstractValuePersistence

public class AbstractValuePersistence
extends Object

The AbstractValuePersistence creates a xml representation of MetaValues which are used for the ProfileService attachment persistence.

Version:
$Revision$
Author:
Emanuel Muckenhuber

Constructor Summary
AbstractValuePersistence(ManagedObjectPersistencePlugin callback, org.jboss.metatype.api.values.MetaValueFactory metaValueFactory)
           
 
Method Summary
protected  String convertSimple2String(org.jboss.metatype.api.values.SimpleValue value)
          Convert a simple meta value to a String.
protected  PersistedArrayValue createArrayValue(org.jboss.metatype.api.values.ArrayValue value, org.jboss.metatype.api.types.ArrayMetaType metaType)
          Create the persistence array value.
protected  PersistedCollectionValue createCollectionValue(org.jboss.metatype.api.values.CollectionValue value)
          Create the persistence collection value.
protected  PersistedCompositeValue createCompositeValue(org.jboss.metatype.api.values.CompositeValue value, org.jboss.metatype.api.types.CompositeMetaType metaType)
          Create the persistence composite value.
protected  PersistedEnumValue createEnumValue(org.jboss.metatype.api.values.EnumValue value)
          Create the persistence enum value.
protected  PersistedGenericValue createGenericValue(org.jboss.metatype.api.values.GenericValue value)
          Create the persistence generic value.
protected  PersistedGenericValue createGenericValue(org.jboss.metatype.api.values.GenericValue value, PersistedGenericValue generic)
          Create the persistence generic value.
protected  PersistedValue createPersistedValue(org.jboss.metatype.api.values.MetaValue value, org.jboss.metatype.api.types.MetaType metaType)
          Create the peristed xml meta data.
protected  PersistedValue createPersistedValue(org.jboss.metatype.api.values.MetaValue value, org.jboss.metatype.api.types.MetaType metaType, PersistedValue persisted)
          Create the peristed xml meta data.
protected  PersistedValue createPropertiesValue(org.jboss.metatype.api.values.PropertiesMetaValue value)
          Create the persistence properties value.
protected  PersistedSimpleValue createSimpleValue(org.jboss.metatype.api.values.SimpleValue value)
          Create the persistence simple value.
protected  PersistedTableValue createTableValue(org.jboss.metatype.api.values.TableValue value)
          Create the persistence table value.
protected static PersistedValue emtpyPersistedValue(org.jboss.metatype.api.types.MetaType metaType)
          Create a emtpy xml meta data, based on the meta type
 org.jboss.metatype.api.values.MetaValueFactory getMetaValueFactory()
          Get the meta value factory.
protected  ManagedObjectPersistencePlugin getPlugin()
           
protected  PersistedArrayValue unwrapArray(PersistedArrayValue array, Object element, org.jboss.metatype.api.types.MetaType type)
          Unwrap array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractValuePersistence

public AbstractValuePersistence(ManagedObjectPersistencePlugin callback,
                                org.jboss.metatype.api.values.MetaValueFactory metaValueFactory)
Method Detail

getMetaValueFactory

public org.jboss.metatype.api.values.MetaValueFactory getMetaValueFactory()
Get the meta value factory.

Returns:
the meta value factory

getPlugin

protected ManagedObjectPersistencePlugin getPlugin()

createPersistedValue

protected PersistedValue createPersistedValue(org.jboss.metatype.api.values.MetaValue value,
                                              org.jboss.metatype.api.types.MetaType metaType)
Create the peristed xml meta data.

Parameters:
value - the meta value
metaType - the meta type
Returns:
the xml value

createPersistedValue

protected PersistedValue createPersistedValue(org.jboss.metatype.api.values.MetaValue value,
                                              org.jboss.metatype.api.types.MetaType metaType,
                                              PersistedValue persisted)
Create the peristed xml meta data.

Parameters:
value - the meta value
metaType - the meta type
persisted -
Returns:
the xml value.

createEnumValue

protected PersistedEnumValue createEnumValue(org.jboss.metatype.api.values.EnumValue value)
Create the persistence enum value.

Parameters:
value - the enum value
Returns:
the enum xml meta data

createSimpleValue

protected PersistedSimpleValue createSimpleValue(org.jboss.metatype.api.values.SimpleValue value)
Create the persistence simple value.

Parameters:
value - the simple value
Returns:
the simple xml meta data

createCollectionValue

protected PersistedCollectionValue createCollectionValue(org.jboss.metatype.api.values.CollectionValue value)
Create the persistence collection value.

Parameters:
value - the collection value
Returns:
the collection xml meta data

createGenericValue

protected PersistedGenericValue createGenericValue(org.jboss.metatype.api.values.GenericValue value)
Create the persistence generic value.

Parameters:
value - the generic value
Returns:
the generic xml meta data

createGenericValue

protected PersistedGenericValue createGenericValue(org.jboss.metatype.api.values.GenericValue value,
                                                   PersistedGenericValue generic)
Create the persistence generic value.

Parameters:
value - the generic value
the - persisted generic value
Returns:
the generic xml meta data

createArrayValue

protected PersistedArrayValue createArrayValue(org.jboss.metatype.api.values.ArrayValue value,
                                               org.jboss.metatype.api.types.ArrayMetaType metaType)
Create the persistence array value.

Parameters:
value - the array value
Returns:

unwrapArray

protected PersistedArrayValue unwrapArray(PersistedArrayValue array,
                                          Object element,
                                          org.jboss.metatype.api.types.MetaType type)
Unwrap array.

Parameters:
array - the parent array
element - the array value
type - the element meta type
Returns:
the persistence xml meta data

createCompositeValue

protected PersistedCompositeValue createCompositeValue(org.jboss.metatype.api.values.CompositeValue value,
                                                       org.jboss.metatype.api.types.CompositeMetaType metaType)
Create the persistence composite value.

Parameters:
value - the composite value
metaType - the composite meta type
the - persisted composite value
Returns:
the persistence composite xml meta data

createTableValue

protected PersistedTableValue createTableValue(org.jboss.metatype.api.values.TableValue value)
Create the persistence table value.

Parameters:
value - the table value
the - persisted table
Returns:
the persistence table xml meta data

createPropertiesValue

protected PersistedValue createPropertiesValue(org.jboss.metatype.api.values.PropertiesMetaValue value)
Create the persistence properties value.

Parameters:
value - the properties value
the - persisted properties
Returns:
the persistence properties xml meta data

emtpyPersistedValue

protected static PersistedValue emtpyPersistedValue(org.jboss.metatype.api.types.MetaType metaType)
Create a emtpy xml meta data, based on the meta type

Parameters:
metaType - the meta type
Returns:
the peristence value

convertSimple2String

protected String convertSimple2String(org.jboss.metatype.api.values.SimpleValue value)
Convert a simple meta value to a String.

Parameters:
value - the simple meta value.
Returns:
the string.


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.