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

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

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

origin: org.hibernate/com.springsource.org.hibernate

  static PropertyData getPropertyOverriddenByMapperOrMapsId(
      boolean isId,
      PropertyHolder propertyHolder,
      String propertyName,
      Mappings mappings) {
    final XClass persistentXClass;
    try {
       persistentXClass = mappings.getReflectionManager()
          .classForName( propertyHolder.getPersistentClass().getClassName(), AnnotationBinder.class );
    }
    catch ( ClassNotFoundException e ) {
      throw new AssertionFailure( "PersistentClass name cannot be converted into a Class", e);
    }
    if ( propertyHolder.isInIdClass() ) {
      PropertyData pd = mappings.getPropertyAnnotatedWithIdAndToOne( persistentXClass, propertyName );
      if ( pd == null && mappings.isSpecjProprietarySyntaxEnabled() ) {
        pd = mappings.getPropertyAnnotatedWithMapsId( persistentXClass, propertyName );
      }
      return pd;
    }
    String propertyPath = isId ? "" : propertyName;
    return mappings.getPropertyAnnotatedWithMapsId(persistentXClass, propertyPath);
  }
}
origin: org.hibernate/com.springsource.org.hibernate.core

  static PropertyData getPropertyOverriddenByMapperOrMapsId(
      boolean isId,
      PropertyHolder propertyHolder,
      String propertyName,
      Mappings mappings) {
    final XClass persistentXClass;
    try {
       persistentXClass = mappings.getReflectionManager()
          .classForName( propertyHolder.getPersistentClass().getClassName(), AnnotationBinder.class );
    }
    catch ( ClassNotFoundException e ) {
      throw new AssertionFailure( "PersistentClass name cannot be converted into a Class", e);
    }
    if ( propertyHolder.isInIdClass() ) {
      PropertyData pd = mappings.getPropertyAnnotatedWithIdAndToOne( persistentXClass, propertyName );
      if ( pd == null && mappings.isSpecjProprietarySyntaxEnabled() ) {
        pd = mappings.getPropertyAnnotatedWithMapsId( persistentXClass, propertyName );
      }
      return pd;
    }
    String propertyPath = isId ? "" : propertyName;
    return mappings.getPropertyAnnotatedWithMapsId(persistentXClass, propertyPath);
  }
}
org.hibernate.cfgMappingsgetPropertyAnnotatedWithIdAndToOne

Javadoc

Return the property annotated with @ToOne and @Id if any. Null otherwise

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
  • setScale (BigDecimal)
  • addToBackStack (FragmentTransaction)
  • onCreateOptionsMenu (Activity)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Top 12 Jupyter Notebook extensions
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