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

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

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

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

TypeDef typeDef = mappings.getTypeDef( typeName );
if ( typeDef != null ) {
  typeName = typeDef.getTypeClass();
origin: hibernate/hibernate

private static void bindSimpleValueType(Element node, SimpleValue simpleValue, Mappings mappings)
    throws MappingException {
  String typeName = null;
  Properties parameters = new Properties();
  Attribute typeNode = node.attribute( "type" );
  if ( typeNode == null ) typeNode = node.attribute( "id-type" ); // for an any
  if ( typeNode != null ) typeName = typeNode.getValue();
  Element typeChild = node.element( "type" );
  if ( typeName == null && typeChild != null ) {
    typeName = typeChild.attribute( "name" ).getValue();
    Iterator typeParameters = typeChild.elementIterator( "param" );
    while ( typeParameters.hasNext() ) {
      Element paramElement = (Element) typeParameters.next();
      parameters.setProperty( paramElement.attributeValue( "name" ), paramElement
        .getTextTrim() );
    }
  }
  TypeDef typeDef = mappings.getTypeDef( typeName );
  if ( typeDef != null ) {
    typeName = typeDef.getTypeClass();
    // parameters on the property mapping should
    // override parameters in the typedef
    Properties allParameters = new Properties();
    allParameters.putAll( typeDef.getParameters() );
    allParameters.putAll( parameters );
    parameters = allParameters;
  }
  if ( !parameters.isEmpty() ) simpleValue.setTypeParameters( parameters );
  if ( typeName != null ) simpleValue.setTypeName( typeName );
}
origin: org.hibernate/com.springsource.org.hibernate.core

TypeDef typeDef = mappings.getTypeDef( typeName );
if ( typeDef != null ) {
  typeName = typeDef.getTypeClass();
origin: org.hibernate/com.springsource.org.hibernate

TypeDef typeDef = mappings.getTypeDef( typeName );
if ( typeDef != null ) {
  typeName = typeDef.getTypeClass();
origin: org.hibernate/com.springsource.org.hibernate.core

public void fillSimpleValue() {
  LOG.debugf( "Setting SimpleValue typeName for %s", propertyName );
  String type = BinderHelper.isEmptyAnnotationValue( explicitType ) ? returnedClassName : explicitType;
  org.hibernate.mapping.TypeDef typeDef = mappings.getTypeDef( type );
  if ( typeDef != null ) {
    type = typeDef.getTypeClass();
    simpleValue.setTypeParameters( typeDef.getParameters() );
  }
  if ( typeParameters != null && typeParameters.size() != 0 ) {
    //explicit type params takes precedence over type def params
    simpleValue.setTypeParameters( typeParameters );
  }
  simpleValue.setTypeName( type );
  if ( persistentClassName != null ) {
    simpleValue.setTypeUsingReflection( persistentClassName, propertyName );
  }
  if ( !simpleValue.isTypeSpecified() && isVersion() ) {
    simpleValue.setTypeName( "integer" );
  }
  // HHH-5205
  if ( timeStampVersionType != null ) {
    simpleValue.setTypeName( timeStampVersionType );
  }
}
origin: org.hibernate/com.springsource.org.hibernate

public void fillSimpleValue() {
  LOG.debugf( "Setting SimpleValue typeName for %s", propertyName );
  String type = BinderHelper.isEmptyAnnotationValue( explicitType ) ? returnedClassName : explicitType;
  org.hibernate.mapping.TypeDef typeDef = mappings.getTypeDef( type );
  if ( typeDef != null ) {
    type = typeDef.getTypeClass();
    simpleValue.setTypeParameters( typeDef.getParameters() );
  }
  if ( typeParameters != null && typeParameters.size() != 0 ) {
    //explicit type params takes precedence over type def params
    simpleValue.setTypeParameters( typeParameters );
  }
  simpleValue.setTypeName( type );
  if ( persistentClassName != null ) {
    simpleValue.setTypeUsingReflection( persistentClassName, propertyName );
  }
  if ( !simpleValue.isTypeSpecified() && isVersion() ) {
    simpleValue.setTypeName( "integer" );
  }
  // HHH-5205
  if ( timeStampVersionType != null ) {
    simpleValue.setTypeName( timeStampVersionType );
  }
}
origin: org.hibernate/com.springsource.org.hibernate

if ( typeNode != null ) {
  String typeName = typeNode.getValue();
  TypeDef typeDef = mappings.getTypeDef( typeName );
  if ( typeDef != null ) {
    collection.setTypeName( typeDef.getTypeClass() );
origin: org.hibernate/com.springsource.org.hibernate.core

if ( typeNode != null ) {
  String typeName = typeNode.getValue();
  TypeDef typeDef = mappings.getTypeDef( typeName );
  if ( typeDef != null ) {
    collection.setTypeName( typeDef.getTypeClass() );
org.hibernate.cfgMappingsgetTypeDef

Javadoc

Retrieve a type definition by name.

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,
  • addTypeDef,
  • addUniquePropertyReference,
  • getObjectNameNormalizer,
  • setAutoImport,
  • addColumnBinding,
  • addPropertyReference,
  • addQuery

Popular in Java

  • Making http post requests using okhttp
  • startActivity (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getExternalFilesDir (Context)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Menu (java.awt)
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Github Copilot alternatives
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