Tabnine Logo
org.hibernate.mapping
Code IndexAdd Tabnine to your IDE (free)

How to use org.hibernate.mapping

Best Java code snippets using org.hibernate.mapping (Showing top 20 results out of 576)

origin: hibernate/hibernate-orm

public void createAllKeys() throws MappingException {
  super.createAllKeys();
  if ( !isInverse() ) {
    getIndex().createForeignKey();
  }
}
origin: hibernate/hibernate-orm

void createPrimaryKey() {
  if ( !isOneToMany() ) {
    PrimaryKey pk = new PrimaryKey( getCollectionTable() );
    pk.addColumns( getIdentifier().getColumnIterator() );
    getCollectionTable().setPrimaryKey(pk);
  }
  // create an index on the key columns??
}
origin: hibernate/hibernate-orm

private void createForeignKeys() throws MappingException {
  // if ( !isInverse() ) { // for inverse collections, let the "other end" handle it
  if ( referencedPropertyName == null ) {
    getElement().createForeignKey();
    key.createForeignKeyOfEntity( getOwner().getEntityName() );
  }
  // }
}
origin: hibernate/hibernate-orm

public void createPrimaryKey() {
  //Primary key constraint
  final Table table = getTable();
  PrimaryKey pk = new PrimaryKey( table );
  pk.setName( PK_ALIAS.toAliasString( table.getName() ) );
  table.setPrimaryKey( pk );
  pk.addColumns( getKey().getColumnIterator() );
}
origin: hibernate/hibernate-orm

public void createPrimaryKey() {
  //Primary key constraint
  PrimaryKey pk = new PrimaryKey( table );
  pk.setName( PK_ALIAS.toAliasString( table.getName() ) );
  table.setPrimaryKey(pk);
  pk.addColumns( getKey().getColumnIterator() );
}
origin: hibernate/hibernate-orm

@Override
protected void augmentIdTableDefinition(Table idTable) {
  Column sessionIdColumn = new Column( Helper.SESSION_ID_COLUMN_NAME );
  sessionIdColumn.setSqlType( "CHAR(36)" );
  sessionIdColumn.setComment( "Used to hold the Hibernate Session identifier" );
  idTable.addColumn( sessionIdColumn );
}
origin: hibernate/hibernate-orm

@Override
public Identifier getOwningPhysicalTableName() {
  return collectionBinding.getOwner().getTable().getNameIdentifier();
}
origin: hibernate/hibernate-orm

public boolean isPhysicalConstraint() {
  return referencedTable.isPhysicalTable()
      && getTable().isPhysicalTable()
      && !referencedTable.hasDenormalizedTables();
}
origin: hibernate/hibernate-orm

@Test
public void testProperCallbacks() {
  PersistentClassVisitorValidator vv = new PersistentClassVisitorValidator();
  new RootClass( metadataBuildingContext ).accept( vv );
  new Subclass( new RootClass( metadataBuildingContext ), metadataBuildingContext ).accept( vv );
  new JoinedSubclass( new RootClass( metadataBuildingContext ), metadataBuildingContext ).accept( vv );
  new SingleTableSubclass( new RootClass( metadataBuildingContext ), metadataBuildingContext ).accept( vv );
  new UnionSubclass( new RootClass( metadataBuildingContext ), metadataBuildingContext ).accept( vv );
}
origin: hibernate/hibernate-orm

protected Iterator getDiscriminatorColumnIterator() {
  if ( isDiscriminatorInsertable() && !getDiscriminator().hasFormula() ) {
    return getDiscriminator().getColumnIterator();
  }
  else {
    return super.getDiscriminatorColumnIterator();
  }
}
origin: hibernate/hibernate-orm

/**
 * Checks if the collection element is of {@link ComponentType} type.
 */
private boolean isEmbeddableElementType() {
  return propertyValue.getElement().getType() instanceof ComponentType;
}
origin: hibernate/hibernate-orm

public KeyValue getIdentifier() {
  return getSuperclass().getIdentifier();
}
public boolean hasIdentifierProperty() {
origin: hibernate/hibernate-orm

@Override
public void addSubclass(Subclass subclass) throws MappingException {
  super.addSubclass( subclass );
  setPolymorphic( true );
}
origin: hibernate/hibernate-orm

public Class getEntityPersisterClass() {
  if (classPersisterClass==null) {
    return getSuperclass().getEntityPersisterClass();
  }
  else {
    return classPersisterClass;
  }
}
origin: hibernate/hibernate-orm

public static String buildSqlDropIndexString(
    Dialect dialect,
    Table table,
    String name,
    String defaultCatalog,
    String defaultSchema) {
  return buildSqlDropIndexString( name, table.getQualifiedName( dialect, defaultCatalog, defaultSchema ) );
}
origin: hibernate/hibernate-orm

public void setTable(Table table) {
  this.table = table;
  getSuperclass().addSubclassTable(table);
}
origin: hibernate/hibernate-orm

protected void addSubclassProperty(Property p) {
  super.addSubclassProperty(p);
  getSuperclass().addSubclassProperty(p);
}
protected void addSubclassJoin(Join j) {
origin: hibernate/hibernate-orm

@Override
public String getNaturalIdCacheRegionName() {
  return getSuperclass().getNaturalIdCacheRegionName();
}
origin: hibernate/hibernate-orm

public String getTuplizerImplClassName(EntityMode mode) {
  String impl = super.getTuplizerImplClassName( mode );
  if ( impl == null ) {
    impl = getSuperclass().getTuplizerImplClassName( mode );
  }
  return impl;
}
origin: hibernate/hibernate-orm

public boolean isSame(DependantValue other) {
  return super.isSame( other )
      && isSame( wrappedValue, other.wrappedValue );
}
org.hibernate.mapping

Most used classes

  • Table
    A relational table
  • PersistentClass
  • Column
    A column of a relational database table
  • Property
    Represents a property as part of an entity or a component.
  • Collection
    Mapping for a collection. Subclasses specialize to particular collection styles.
  • Component,
  • Index,
  • ForeignKey,
  • SimpleValue,
  • KeyValue,
  • PrimaryKey,
  • OneToMany,
  • UniqueKey,
  • RootClass,
  • ManyToOne,
  • Map,
  • OneToOne,
  • ToOne,
  • DependantValue
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