org.hibernate.metamodel.source.hbm
Class Helper

java.lang.Object
  extended by org.hibernate.metamodel.source.hbm.Helper

public class Helper
extends Object


Nested Class Summary
static class Helper.ValueSourcesAdapter
           
 
Field Summary
static ExplicitHibernateTypeSource TO_ONE_ATTRIBUTE_TYPE_SOURCE
           
 
Constructor Summary
Helper()
           
 
Method Summary
static CustomSQL buildCustomSql(CustomSqlElement customSqlElement)
          Given a user-specified description of how to perform custom SQL, build the CustomSQL representation.
static Iterable<MetaAttributeSource> buildMetaAttributeSources(List<JaxbMetaElement> metaElements)
           
static List<RelationalValueSource> buildValueSources(Helper.ValueSourcesAdapter valueSourcesAdapter, LocalBindingContext bindingContext)
           
static Class classForName(String className, ServiceRegistry serviceRegistry)
           
static Schema.Name determineDatabaseSchemaName(String explicitSchemaName, String explicitCatalogName, LocalBindingContext bindingContext)
           
static String determineEntityName(EntityElement entityElement, String unqualifiedClassPackage)
          Given the user-specified entity mapping, determine the appropriate entity name
static MetaAttributeContext extractMetaAttributeContext(List<JaxbMetaElement> metaElementList, boolean onlyInheritable, MetaAttributeContext parentContext)
           
static Map<String,String> extractParameters(List<JaxbParamElement> xmlParamElements)
           
static boolean getBooleanValue(Boolean value, boolean defaultValue)
           
static int getIntValue(String value, int defaultValue)
           
static long getLongValue(String value, long defaultValue)
           
static String getPropertyAccessorName(String access, boolean isEmbedded, String defaultAccess)
           
static String getStringValue(String value, String defaultValue)
           
static Iterable<CascadeStyle> interpretCascadeStyles(String cascades, LocalBindingContext bindingContext)
           
static InheritanceType interpretInheritanceType(EntityElement entityElement)
           
static String qualifyIfNeeded(String name, String unqualifiedClassPackage)
          Qualify a (supposed class) name with the unqualified-class package name if it is not already qualified
static Identifier resolveIdentifier(String explicitName, String defaultName, boolean globalQuoting)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TO_ONE_ATTRIBUTE_TYPE_SOURCE

public static final ExplicitHibernateTypeSource TO_ONE_ATTRIBUTE_TYPE_SOURCE
Constructor Detail

Helper

public Helper()
Method Detail

interpretInheritanceType

public static InheritanceType interpretInheritanceType(EntityElement entityElement)

buildCustomSql

public static CustomSQL buildCustomSql(CustomSqlElement customSqlElement)
Given a user-specified description of how to perform custom SQL, build the CustomSQL representation.

Parameters:
customSqlElement - User-specified description of how to perform custom SQL
Returns:
The CustomSQL representation

determineEntityName

public static String determineEntityName(EntityElement entityElement,
                                         String unqualifiedClassPackage)
Given the user-specified entity mapping, determine the appropriate entity name

Parameters:
entityElement - The user-specified entity mapping
unqualifiedClassPackage - The package to use for unqualified class names
Returns:
The appropriate entity name

qualifyIfNeeded

public static String qualifyIfNeeded(String name,
                                     String unqualifiedClassPackage)
Qualify a (supposed class) name with the unqualified-class package name if it is not already qualified

Parameters:
name - The name
unqualifiedClassPackage - The unqualified-class package name
Returns:
null if the incoming name was null; or the qualified name.

getPropertyAccessorName

public static String getPropertyAccessorName(String access,
                                             boolean isEmbedded,
                                             String defaultAccess)

extractMetaAttributeContext

public static MetaAttributeContext extractMetaAttributeContext(List<JaxbMetaElement> metaElementList,
                                                               boolean onlyInheritable,
                                                               MetaAttributeContext parentContext)

getStringValue

public static String getStringValue(String value,
                                    String defaultValue)

getIntValue

public static int getIntValue(String value,
                              int defaultValue)

getLongValue

public static long getLongValue(String value,
                                long defaultValue)

getBooleanValue

public static boolean getBooleanValue(Boolean value,
                                      boolean defaultValue)

interpretCascadeStyles

public static Iterable<CascadeStyle> interpretCascadeStyles(String cascades,
                                                            LocalBindingContext bindingContext)

extractParameters

public static Map<String,String> extractParameters(List<JaxbParamElement> xmlParamElements)

buildMetaAttributeSources

public static Iterable<MetaAttributeSource> buildMetaAttributeSources(List<JaxbMetaElement> metaElements)

determineDatabaseSchemaName

public static Schema.Name determineDatabaseSchemaName(String explicitSchemaName,
                                                      String explicitCatalogName,
                                                      LocalBindingContext bindingContext)

resolveIdentifier

public static Identifier resolveIdentifier(String explicitName,
                                           String defaultName,
                                           boolean globalQuoting)

buildValueSources

public static List<RelationalValueSource> buildValueSources(Helper.ValueSourcesAdapter valueSourcesAdapter,
                                                            LocalBindingContext bindingContext)

classForName

public static Class classForName(String className,
                                 ServiceRegistry serviceRegistry)


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.