org.datanucleus.metadata
Class MetaDataHelper

java.lang.Object
  extended by org.datanucleus.metadata.MetaDataHelper

public class MetaDataHelper
extends java.lang.Object

Helper class to search and access MetaData.

For longer term this should probably be refactored to a well designed interface that provides "power users" with access to the metadata that the PMF manages.

Version:
$Revision: 1.1 $

Method Summary
static java.lang.String getValueForExtensionRecursively(org.datanucleus.metadata.MetaData metadata, java.lang.String key)
          Searches the meta data tree upwards starting with the given leaf, stops as soon as it finds an extension with the given key.
static java.lang.String[] getValuesForExtensionRecursively(org.datanucleus.metadata.MetaData metadata, java.lang.String key)
          Searches the meta data tree upwards starting with the given leaf, stops as soon as it finds an extension with the given key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getValueForExtensionRecursively

public static java.lang.String getValueForExtensionRecursively(org.datanucleus.metadata.MetaData metadata,
                                                               java.lang.String key)
Searches the meta data tree upwards starting with the given leaf, stops as soon as it finds an extension with the given key.

Parameters:
metadata - Leaf of the meta data tree, where the search should start
key - The key of the extension
Returns:
The value of the extension (null if not existing)

getValuesForExtensionRecursively

public static java.lang.String[] getValuesForExtensionRecursively(org.datanucleus.metadata.MetaData metadata,
                                                                  java.lang.String key)
Searches the meta data tree upwards starting with the given leaf, stops as soon as it finds an extension with the given key.

Parameters:
metadata - Leaf of the meta data tree, where the search should start
key - The key of the extension
Returns:
The values of the extension (null if not existing)


Copyright © 2009. All Rights Reserved.