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

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

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

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

@Override
public void addPropertyReference(String referencedClass, String propertyName) {
  super.addPropertyReference( referencedClass, propertyName );
}
origin: org.hibernate/com.springsource.org.hibernate.core

( (Collection) value ).setReferencedPropertyName( syntheticPropertyName );
mappings.addPropertyReference( ownerEntity.getEntityName(), syntheticPropertyName );
origin: jboss.jboss-embeddable-ejb3/hibernate-all

mappings.addPropertyReference( coll.getOwnerEntityName(), propertyRef );
origin: org.hibernate/com.springsource.org.hibernate

( (Collection) value ).setReferencedPropertyName( syntheticPropertyName );
mappings.addPropertyReference( ownerEntity.getEntityName(), syntheticPropertyName );
origin: org.hibernate/com.springsource.org.hibernate

mappings.addPropertyReference( coll.getOwnerEntityName(), propertyRef );
origin: org.hibernate/com.springsource.org.hibernate.core

mappings.addPropertyReference( coll.getOwnerEntityName(), propertyRef );
origin: hibernate/hibernate

private static Property createProperty(final Value value, final String propertyName,
    final String className, final Element subnode, final Mappings mappings,
    java.util.Map inheritedMetas) throws MappingException {
  value.setTypeUsingReflection( className, propertyName );
  // this is done here 'cos we might only know the type here (ugly!)
  // TODO: improve this a lot:
  if ( value instanceof ToOne ) {
    ToOne toOne = (ToOne) value;
    String propertyRef = toOne.getReferencedPropertyName();
    if ( propertyRef != null ) {
      mappings.addUniquePropertyReference( toOne.getReferencedEntityName(), propertyRef );
    }
  }
  else if ( value instanceof Collection ) {
    Collection coll = (Collection) value;
    String propertyRef = coll.getReferencedPropertyName();
    // not necessarily a *unique* property reference
    if ( propertyRef != null ) {
      mappings.addPropertyReference( coll.getOwnerEntityName(), propertyRef );
    }
  }
  value.createForeignKey();
  Property prop = new Property();
  prop.setValue( value );
  bindProperty( subnode, prop, mappings, inheritedMetas );
  return prop;
}
origin: org.hibernate/com.springsource.org.hibernate

if ( propRef != null ) {
  collValue.setReferencedPropertyName( propRef );
  mappings.addPropertyReference( collValue.getOwnerEntityName(), propRef );
origin: org.hibernate/com.springsource.org.hibernate.core

if ( propRef != null ) {
  collValue.setReferencedPropertyName( propRef );
  mappings.addPropertyReference( collValue.getOwnerEntityName(), propRef );
org.hibernate.cfgMappingsaddPropertyReference

Javadoc

Adds a property reference binding to this 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,
  • addTypeDef,
  • addUniquePropertyReference,
  • getObjectNameNormalizer,
  • setAutoImport,
  • addColumnBinding,
  • addQuery

Popular in Java

  • Reading from database using SQL prepared statement
  • getSystemService (Context)
  • startActivity (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • ImageIO (javax.imageio)
  • Top plugins for WebStorm
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