Tabnine Logo
IndexBackref
Code IndexAdd Tabnine to your IDE (free)

How to use
IndexBackref
in
org.hibernate.mapping

Best Java code snippets using org.hibernate.mapping.IndexBackref (Showing top 18 results out of 315)

origin: hibernate/hibernate-orm

private void createIndexBackRef(
    MappingDocument mappingDocument,
    IndexedPluralAttributeSource pluralAttributeSource,
    IndexedCollection collectionBinding) {
  if ( collectionBinding.isOneToMany()
      && !collectionBinding.getKey().isNullable()
      && !collectionBinding.isInverse() ) {
    final String entityName = ( (OneToMany) collectionBinding.getElement() ).getReferencedEntityName();
    final PersistentClass referenced = mappingDocument.getMetadataCollector().getEntityBinding( entityName );
    final IndexBackref ib = new IndexBackref();
    ib.setName( '_' + collectionBinding.getOwnerEntityName() + "." + pluralAttributeSource.getName() + "IndexBackref" );
    ib.setUpdateable( false );
    ib.setSelectable( false );
    ib.setCollectionRole( collectionBinding.getRole() );
    ib.setEntityName( collectionBinding.getOwner().getEntityName() );
    ib.setValue( collectionBinding.getIndex() );
    referenced.addProperty( ib );
  }
}
origin: hibernate/hibernate-orm

  @Override
  protected void createBackReferences() {
    super.createBackReferences();
    boolean indexIsFormula = false;
    Iterator itr = getCollectionBinding().getIndex().getColumnIterator();
    while ( itr.hasNext() ) {
      if ( ( (Selectable) itr.next() ).isFormula() ) {
        indexIsFormula = true;
      }
    }
    if ( getCollectionBinding().isOneToMany()
        && !getCollectionBinding().getKey().isNullable()
        && !getCollectionBinding().isInverse()
        && !indexIsFormula ) {
      final String entityName = ( (OneToMany) getCollectionBinding().getElement() ).getReferencedEntityName();
      final PersistentClass referenced = getMappingDocument().getMetadataCollector().getEntityBinding( entityName );
      final IndexBackref ib = new IndexBackref();
      ib.setName( '_' + getCollectionBinding().getOwnerEntityName() + "." + getPluralAttributeSource().getName() + "IndexBackref" );
      ib.setUpdateable( false );
      ib.setSelectable( false );
      ib.setCollectionRole( getCollectionBinding().getRole() );
      ib.setEntityName( getCollectionBinding().getOwner().getEntityName() );
      ib.setValue( getCollectionBinding().getIndex() );
      referenced.addProperty( ib );
    }
  }
}
origin: hibernate/hibernate-orm

String entityName = ( (OneToMany) list.getElement() ).getReferencedEntityName();
PersistentClass referenced = buildingContext.getMetadataCollector().getEntityBinding( entityName );
IndexBackref ib = new IndexBackref();
ib.setName( '_' + propertyName + "IndexBackref" );
ib.setUpdateable( false );
ib.setSelectable( false );
ib.setCollectionRole( list.getRole() );
ib.setEntityName( list.getOwner().getEntityName() );
ib.setValue( list.getIndex() );
referenced.addProperty( ib );
origin: org.hibernate/hibernate-annotations

String entityName = ( (OneToMany) list.getElement() ).getReferencedEntityName();
PersistentClass referenced = mappings.getClass( entityName );
IndexBackref ib = new IndexBackref();
ib.setName( '_' + propertyName + "IndexBackref" );
ib.setUpdateable( false );
ib.setSelectable( false );
ib.setCollectionRole( list.getRole() );
ib.setEntityName( list.getOwner().getEntityName() );
ib.setValue( list.getIndex() );
referenced.addProperty( ib );
origin: org.hibernate.orm/hibernate-core

private void createIndexBackRef(
    MappingDocument mappingDocument,
    IndexedPluralAttributeSource pluralAttributeSource,
    IndexedCollection collectionBinding) {
  if ( collectionBinding.isOneToMany()
      && !collectionBinding.getKey().isNullable()
      && !collectionBinding.isInverse() ) {
    final String entityName = ( (OneToMany) collectionBinding.getElement() ).getReferencedEntityName();
    final PersistentClass referenced = mappingDocument.getMetadataCollector().getEntityBinding( entityName );
    final IndexBackref ib = new IndexBackref( metadataBuildingContext );
    ib.setName( '_' + collectionBinding.getOwnerEntityName() + "." + pluralAttributeSource.getName() + "IndexBackref" );
    ib.setUpdateable( false );
    ib.setSelectable( false );
    ib.setCollectionRole( collectionBinding.getRole() );
    ib.setEntityName( collectionBinding.getOwner().getEntityName() );
    ib.setValue( collectionBinding.getIndex() );
    referenced.addProperty( ib );
  }
}
origin: org.hibernate/com.springsource.org.hibernate

String entityName = ( (OneToMany) list.getElement() ).getReferencedEntityName();
PersistentClass referenced = mappings.getClass( entityName );
IndexBackref ib = new IndexBackref();
ib.setName( '_' + list.getOwnerEntityName() + "." + node.attributeValue( "name" ) + "IndexBackref" );
ib.setUpdateable( false );
ib.setSelectable( false );
ib.setCollectionRole( list.getRole() );
ib.setEntityName( list.getOwner().getEntityName() );
ib.setValue( list.getIndex() );
origin: hibernate/hibernate

String entityName = ( (OneToMany) list.getElement() ).getReferencedEntityName();
PersistentClass referenced = mappings.getClass( entityName );
IndexBackref ib = new IndexBackref();
ib.setName( '_' + node.attributeValue( "name" ) + "IndexBackref" );
ib.setUpdateable( false );
ib.setSelectable( false );
ib.setCollectionRole( list.getRole() );
ib.setValue( list.getIndex() );
origin: org.hibernate/com.springsource.org.hibernate.core

String entityName = ( (OneToMany) list.getElement() ).getReferencedEntityName();
PersistentClass referenced = mappings.getClass( entityName );
IndexBackref ib = new IndexBackref();
ib.setName( '_' + list.getOwnerEntityName() + "." + node.attributeValue( "name" ) + "IndexBackref" );
ib.setUpdateable( false );
ib.setSelectable( false );
ib.setCollectionRole( list.getRole() );
ib.setEntityName( list.getOwner().getEntityName() );
ib.setValue( list.getIndex() );
origin: org.hibernate.orm/hibernate-core

  @Override
  protected void createBackReferences() {
    super.createBackReferences();
    boolean indexIsFormula = false;
    final List<MappedColumn> mappedColumns = getCollectionBinding().getIndex().getMappedColumns();
    for ( MappedColumn mappedColumn : mappedColumns ) {
      if ( mappedColumn.isFormula() ) {
        indexIsFormula = true;
      }
    }
    if ( getCollectionBinding().isOneToMany()
        && !getCollectionBinding().getKey().isNullable()
        && !getCollectionBinding().isInverse()
        && !indexIsFormula ) {
      final String entityName = ( (OneToMany) getCollectionBinding().getElement() ).getReferencedEntityName();
      final PersistentClass referenced = getMappingDocument().getMetadataCollector().getEntityBinding( entityName );
      final IndexBackref ib = new IndexBackref( metadataBuildingContext );
      ib.setName( '_' + getCollectionBinding().getOwnerEntityName() + "." + getPluralAttributeSource().getName() + "IndexBackref" );
      ib.setUpdateable( false );
      ib.setSelectable( false );
      ib.setCollectionRole( getCollectionBinding().getRole() );
      ib.setEntityName( getCollectionBinding().getOwner().getEntityName() );
      ib.setValue( getCollectionBinding().getIndex() );
      referenced.addProperty( ib );
    }
  }
}
origin: org.hibernate/com.springsource.org.hibernate

String entityName = ( (OneToMany) list.getElement() ).getReferencedEntityName();
PersistentClass referenced = mappings.getClass( entityName );
IndexBackref ib = new IndexBackref();
ib.setName( '_' + propertyName + "IndexBackref" );
ib.setUpdateable( false );
ib.setSelectable( false );
ib.setCollectionRole( list.getRole() );
ib.setEntityName( list.getOwner().getEntityName() );
ib.setValue( list.getIndex() );
referenced.addProperty( ib );
origin: jboss.jboss-embeddable-ejb3/hibernate-all

String entityName = ( (OneToMany) list.getElement() ).getReferencedEntityName();
PersistentClass referenced = mappings.getClass( entityName );
IndexBackref ib = new IndexBackref();
ib.setName( '_' + propertyName + "IndexBackref" );
ib.setUpdateable( false );
ib.setSelectable( false );
ib.setCollectionRole( list.getRole() );
ib.setEntityName( list.getOwner().getEntityName() );
ib.setValue( list.getIndex() );
referenced.addProperty( ib );
origin: org.hibernate.orm/hibernate-core

String entityName = ( (OneToMany) list.getElement() ).getReferencedEntityName();
PersistentClass referenced = buildingContext.getMetadataCollector().getEntityBinding( entityName );
IndexBackref ib = new IndexBackref( buildingContext );
ib.setName( '_' + propertyName + "IndexBackref" );
ib.setUpdateable( false );
ib.setSelectable( false );
ib.setCollectionRole( list.getRole() );
ib.setEntityName( list.getOwner().getEntityName() );
ib.setValue( list.getIndex() );
referenced.addProperty( ib );
origin: hibernate/hibernate

String entityName = ( (OneToMany) map.getElement() ).getReferencedEntityName();
PersistentClass referenced = mappings.getClass( entityName );
IndexBackref ib = new IndexBackref();
ib.setName( '_' + node.attributeValue( "name" ) + "IndexBackref" );
ib.setUpdateable( false );
ib.setSelectable( false );
ib.setCollectionRole( map.getRole() );
ib.setValue( map.getIndex() );
origin: org.hibernate/com.springsource.org.hibernate

String entityName = ( (OneToMany) map.getElement() ).getReferencedEntityName();
PersistentClass referenced = mappings.getClass( entityName );
IndexBackref ib = new IndexBackref();
ib.setName( '_' + map.getOwnerEntityName() + "." + node.attributeValue( "name" ) + "IndexBackref" );
ib.setUpdateable( false );
ib.setSelectable( false );
ib.setCollectionRole( map.getRole() );
ib.setEntityName( map.getOwner().getEntityName() );
ib.setValue( map.getIndex() );
origin: org.hibernate/com.springsource.org.hibernate.core

String entityName = ( (OneToMany) list.getElement() ).getReferencedEntityName();
PersistentClass referenced = mappings.getClass( entityName );
IndexBackref ib = new IndexBackref();
ib.setName( '_' + propertyName + "IndexBackref" );
ib.setUpdateable( false );
ib.setSelectable( false );
ib.setCollectionRole( list.getRole() );
ib.setEntityName( list.getOwner().getEntityName() );
ib.setValue( list.getIndex() );
referenced.addProperty( ib );
origin: org.hibernate/com.springsource.org.hibernate.core

String entityName = ( (OneToMany) map.getElement() ).getReferencedEntityName();
PersistentClass referenced = mappings.getClass( entityName );
IndexBackref ib = new IndexBackref();
ib.setName( '_' + map.getOwnerEntityName() + "." + node.attributeValue( "name" ) + "IndexBackref" );
ib.setUpdateable( false );
ib.setSelectable( false );
ib.setCollectionRole( map.getRole() );
ib.setEntityName( map.getOwner().getEntityName() );
ib.setValue( map.getIndex() );
origin: org.grails/grails-datastore-gorm-hibernate-core

IndexBackref ib = new IndexBackref();
ib.setName(UNDERSCORE + property.getName() + "IndexBackref");
ib.setUpdateable(false);
ib.setSelectable(false);
if (isManyToMany) {
  ib.setInsertable(false);
ib.setCollectionRole(list.getRole());
ib.setEntityName(list.getOwner().getEntityName());
ib.setValue(list.getIndex());
referenced.addProperty(ib);
origin: org.grails/grails-hibernate

IndexBackref ib = new IndexBackref();
ib.setName(UNDERSCORE + property.getName() + "IndexBackref");
ib.setUpdateable(false);
ib.setSelectable(false);
if (isManyToMany) {
  ib.setInsertable(false);
ib.setCollectionRole(list.getRole());
ib.setEntityName(list.getOwner().getEntityName());
ib.setValue(list.getIndex());
referenced.addProperty(ib);
org.hibernate.mappingIndexBackref

Most used methods

  • <init>
  • setCollectionRole
  • setName
  • setSelectable
  • setUpdateable
  • setValue
  • setEntityName
  • setInsertable

Popular in Java

  • Running tasks concurrently on multiple threads
  • putExtra (Intent)
  • setRequestProperty (URLConnection)
  • compareTo (BigDecimal)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Best plugins for Eclipse
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