Tabnine Logo
Mappings.addTypeDef
Code IndexAdd Tabnine to your IDE (free)

How to use
addTypeDef
method
in
org.hibernate.cfg.Mappings

Best Java code snippets using org.hibernate.cfg.Mappings.addTypeDef (Showing top 7 results out of 315)

origin: jboss.jboss-embeddable-ejb3/hibernate-all

private static void bindTypeDef(Element typedefNode, Mappings mappings) {
  String typeClass = typedefNode.attributeValue( "class" );
  String typeName = typedefNode.attributeValue( "name" );
  Iterator paramIter = typedefNode.elementIterator( "param" );
  Properties parameters = new Properties();
  while ( paramIter.hasNext() ) {
    Element param = (Element) paramIter.next();
    parameters.setProperty( param.attributeValue( "name" ), param.getTextTrim() );
  }
  mappings.addTypeDef( typeName, typeClass, parameters );
}
origin: org.hibernate/com.springsource.org.hibernate

private static void bindTypeDef(Element typedefNode, Mappings mappings) {
  String typeClass = typedefNode.attributeValue( "class" );
  String typeName = typedefNode.attributeValue( "name" );
  Iterator paramIter = typedefNode.elementIterator( "param" );
  Properties parameters = new Properties();
  while ( paramIter.hasNext() ) {
    Element param = (Element) paramIter.next();
    parameters.setProperty( param.attributeValue( "name" ), param.getTextTrim() );
  }
  mappings.addTypeDef( typeName, typeClass, parameters );
}
origin: org.hibernate/com.springsource.org.hibernate.core

private static void bindTypeDef(Element typedefNode, Mappings mappings) {
  String typeClass = typedefNode.attributeValue( "class" );
  String typeName = typedefNode.attributeValue( "name" );
  Iterator paramIter = typedefNode.elementIterator( "param" );
  Properties parameters = new Properties();
  while ( paramIter.hasNext() ) {
    Element param = (Element) paramIter.next();
    parameters.setProperty( param.attributeValue( "name" ), param.getTextTrim() );
  }
  mappings.addTypeDef( typeName, typeClass, parameters );
}
origin: org.hibernate/com.springsource.org.hibernate

private static void bindTypeDef(TypeDef defAnn, Mappings mappings) {
  Properties params = new Properties();
  for ( Parameter param : defAnn.parameters() ) {
    params.setProperty( param.name(), param.value() );
  }
  if ( BinderHelper.isEmptyAnnotationValue( defAnn.name() ) && defAnn.defaultForType().equals( void.class ) ) {
    throw new AnnotationException(
        "Either name or defaultForType (or both) attribute should be set in TypeDef having typeClass " +
            defAnn.typeClass().getName()
    );
  }
  final String typeBindMessageF = "Binding type definition: %s";
  if ( !BinderHelper.isEmptyAnnotationValue( defAnn.name() ) ) {
    if ( LOG.isDebugEnabled() ) {
      LOG.debugf( typeBindMessageF, defAnn.name() );
    }
    mappings.addTypeDef( defAnn.name(), defAnn.typeClass().getName(), params );
  }
  if ( !defAnn.defaultForType().equals( void.class ) ) {
    if ( LOG.isDebugEnabled() ) {
      LOG.debugf( typeBindMessageF, defAnn.defaultForType().getName() );
    }
    mappings.addTypeDef( defAnn.defaultForType().getName(), defAnn.typeClass().getName(), params );
  }
}
origin: org.hibernate/com.springsource.org.hibernate.core

private static void bindTypeDef(TypeDef defAnn, Mappings mappings) {
  Properties params = new Properties();
  for ( Parameter param : defAnn.parameters() ) {
    params.setProperty( param.name(), param.value() );
  }
  if ( BinderHelper.isEmptyAnnotationValue( defAnn.name() ) && defAnn.defaultForType().equals( void.class ) ) {
    throw new AnnotationException(
        "Either name or defaultForType (or both) attribute should be set in TypeDef having typeClass " +
            defAnn.typeClass().getName()
    );
  }
  final String typeBindMessageF = "Binding type definition: %s";
  if ( !BinderHelper.isEmptyAnnotationValue( defAnn.name() ) ) {
    if ( LOG.isDebugEnabled() ) {
      LOG.debugf( typeBindMessageF, defAnn.name() );
    }
    mappings.addTypeDef( defAnn.name(), defAnn.typeClass().getName(), params );
  }
  if ( !defAnn.defaultForType().equals( void.class ) ) {
    if ( LOG.isDebugEnabled() ) {
      LOG.debugf( typeBindMessageF, defAnn.defaultForType().getName() );
    }
    mappings.addTypeDef( defAnn.defaultForType().getName(), defAnn.typeClass().getName(), params );
  }
}
origin: hibernate/hibernate

mappings.addTypeDef( typeName, typeClass, parameters );
origin: apache/servicemix-bundles

mappings.addTypeDef(typeDef.getTypeName(), typeDef.getTypeClass(), typeDef.getParameters());
org.hibernate.cfgMappingsaddTypeDef

Javadoc

Adds a type definition to this metadata repository.

Popular methods of Mappings

  • addClass
    Add entity mapping metadata.
  • addImport
    Adds an import (HQL entity rename) to the repository.
  • addTable
    Adds table metadata to this repository returning the created metadata instance.
  • getCatalogName
    Returns the currently bound default catalog name.
  • getClass
    Retrieves the entity mapping metadata for the given entity name.
  • getSchemaName
    Returns the currently bound default schema name.
  • addCollection
    Add collection mapping metadata to this repository.
  • addSecondPass
    Adds a second pass.
  • addTableBinding
    Adds a table binding to this repository.
  • getDefaultAccess
    Get the current default property access style.
  • isAutoImport
    Determine whether auto importing of entity names is currently enabled.
  • addDenormalizedTable
    Adds a 'denormalized table' to this repository.
  • isAutoImport,
  • addDenormalizedTable,
  • addFilterDefinition,
  • addUniquePropertyReference,
  • getObjectNameNormalizer,
  • setAutoImport,
  • addColumnBinding,
  • addPropertyReference,
  • addQuery

Popular in Java

  • Reactive rest calls using spring rest template
  • startActivity (Activity)
  • addToBackStack (FragmentTransaction)
  • onRequestPermissionsResult (Fragment)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now