Tabnine Logo
UnionSubclass.getRootClass
Code IndexAdd Tabnine to your IDE (free)

How to use
getRootClass
method
in
org.hibernate.mapping.UnionSubclass

Best Java code snippets using org.hibernate.mapping.UnionSubclass.getRootClass (Showing top 3 results out of 315)

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

public static void bindUnionSubclass(Element node, UnionSubclass unionSubclass,
    Mappings mappings, java.util.Map inheritedMetas) throws MappingException {
  bindClass( node, unionSubclass, mappings, inheritedMetas );
  inheritedMetas = getMetas( node, inheritedMetas, true ); // get meta's from <subclass>
  if ( unionSubclass.getEntityPersisterClass() == null ) {
    unionSubclass.getRootClass().setEntityPersisterClass(
      UnionSubclassEntityPersister.class );
  }
  Attribute schemaNode = node.attribute( "schema" );
  String schema = schemaNode == null ?
      mappings.getSchemaName() : schemaNode.getValue();
  Attribute catalogNode = node.attribute( "catalog" );
  String catalog = catalogNode == null ?
      mappings.getCatalogName() : catalogNode.getValue();
  Table denormalizedSuperTable = unionSubclass.getSuperclass().getTable();
  Table mytable = mappings.addDenormalizedTable(
      schema,
      catalog,
      getClassTableName(unionSubclass, node, schema, catalog, denormalizedSuperTable, mappings ),
      unionSubclass.isAbstract() != null && unionSubclass.isAbstract().booleanValue(),
      getSubselect( node ),
      denormalizedSuperTable
    );
  unionSubclass.setTable( mytable );
  log.info(
      "Mapping union-subclass: " + unionSubclass.getEntityName() +
      " -> " + unionSubclass.getTable().getName()
    );
  createClassProperties( node, unionSubclass, mappings, inheritedMetas );
}
origin: hibernate/hibernate

public static void bindUnionSubclass(Element node, UnionSubclass unionSubclass,
    Mappings mappings, java.util.Map inheritedMetas) throws MappingException {
  bindClass( node, unionSubclass, mappings, inheritedMetas );
  inheritedMetas = getMetas( node, inheritedMetas, true ); // get meta's from <subclass>
  if ( unionSubclass.getEntityPersisterClass() == null ) {
    unionSubclass.getRootClass().setEntityPersisterClass(
      UnionSubclassEntityPersister.class );
  }
  Attribute schemaNode = node.attribute( "schema" );
  String schema = schemaNode == null ? mappings.getSchemaName() : schemaNode.getValue();
  Attribute catalogNode = node.attribute( "catalog" );
  String catalog = catalogNode == null ? mappings.getCatalogName() : catalogNode.getValue();
  Table mytable = mappings.addDenormalizedTable( 
      schema, 
      catalog, 
      getClassTableName(unionSubclass, node, mappings ), 
      unionSubclass.isAbstract(), 
      getSubselect( node ), 
      unionSubclass.getSuperclass().getTable() );
  unionSubclass.setTable( mytable );
  log.info( "Mapping union-subclass: "
    + unionSubclass.getEntityName()
    + " -> "
    + unionSubclass.getTable().getName() );
  createClassProperties( node, unionSubclass, mappings, inheritedMetas );
}
origin: org.grails/grails-datastore-gorm-hibernate-core

public void bindUnionSubclass(HibernatePersistentEntity subClass, UnionSubclass unionSubclass,
                   Mappings mappings, String sessionFactoryBeanName) throws MappingException {
  Mapping subMapping = getMapping(subClass.getJavaClass());
  if ( unionSubclass.getEntityPersisterClass() == null ) {
    unionSubclass.getRootClass().setEntityPersisterClass(
        UnionSubclassEntityPersister.class );
  }
  String schema = subMapping != null && subMapping.getTable().getSchema() != null ?
      subMapping.getTable().getSchema() : null;
  String catalog = subMapping != null && subMapping.getTable().getCatalog() != null ?
      subMapping.getTable().getCatalog() : null;
  Table denormalizedSuperTable = unionSubclass.getSuperclass().getTable();
  Table mytable = mappings.addDenormalizedTable(
      schema,
      catalog,
      getTableName(subClass, sessionFactoryBeanName),
      unionSubclass.isAbstract() != null && unionSubclass.isAbstract(),
      null,
      denormalizedSuperTable
  );
  unionSubclass.setTable( mytable );
  unionSubclass.setClassName(subClass.getName());
  LOG.info(
      "Mapping union-subclass: " + unionSubclass.getEntityName() +
          " -> " + unionSubclass.getTable().getName()
  );
  createClassProperties(subClass, unionSubclass, mappings, sessionFactoryBeanName);
}
/**
org.hibernate.mappingUnionSubclassgetRootClass

Popular methods of UnionSubclass

  • <init>
  • getEntityName
  • getSuperclass
  • getPropertyClosureIterator
  • getTable
  • setTable
  • isAbstract
  • getEntityPersisterClass
  • accept
  • getCustomSQLUpdate
  • getCustomSQLUpdateCheckStyle
  • getMappedTable
  • getCustomSQLUpdateCheckStyle,
  • getMappedTable,
  • getSuperManagedTypeMapping,
  • isCustomUpdateCallable,
  • setClassName,
  • setMappedTable

Popular in Java

  • Start an intent from android
  • getSupportFragmentManager (FragmentActivity)
  • getExternalFilesDir (Context)
  • startActivity (Activity)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • ImageIO (javax.imageio)
  • JFileChooser (javax.swing)
  • From CI to AI: The AI layer in your organization
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