Codota Logo
ImplicitCollectionTableNameSource
Code IndexAdd Codota to your IDE (free)

How to use
ImplicitCollectionTableNameSource
in
org.hibernate.boot.model.naming

Best Java code snippets using org.hibernate.boot.model.naming.ImplicitCollectionTableNameSource (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: hibernate/hibernate-orm

@Override
public Identifier determineCollectionTableName(ImplicitCollectionTableNameSource source) {
  Identifier identifier = toIdentifier(
      source.getOwningPhysicalTableName().getText() + "_" + transformAttributePath( source.getOwningAttributePath() ),
      source.getBuildingContext()
  );
  if ( source.getOwningPhysicalTableName().isQuoted() ) {
    identifier = Identifier.quote( identifier );
  }
  return identifier;
}
origin: hibernate/hibernate-orm

@Override
public Identifier determineCollectionTableName(ImplicitCollectionTableNameSource source) {
  // JPA states we should use the following as default:
  //      "The concatenation of the name of the containing entity and the name of the
  //       collection attribute, separated by an underscore.
  // aka:
  //     if owning entity has a JPA entity name: {OWNER JPA ENTITY NAME}_{COLLECTION ATTRIBUTE NAME}
  //     otherwise: {OWNER ENTITY NAME}_{COLLECTION ATTRIBUTE NAME}
  final String entityName = transformEntityName( source.getOwningEntityNaming() );
  final String name = entityName
      + '_'
      + transformAttributePath( source.getOwningAttributePath() );
  return toIdentifier( name, source.getBuildingContext() );
}
origin: Evolveum/midpoint

@Override
public Identifier determineCollectionTableName(ImplicitCollectionTableNameSource source) {
  Identifier i = super.determineCollectionTableName(source);
  LOGGER.trace("determineCollectionTableName {} {} {} -> {}", source.getOwningEntityNaming(),
      source.getOwningPhysicalTableName(), source.getOwningAttributePath(), i);
  return i;
}
origin: hibernate/hibernate-orm

@Override
public Identifier determineCollectionTableName(ImplicitCollectionTableNameSource source) {
  // This impl uses the owner entity table name instead of the JPA entity name when
  // generating the implicit name.
  final String name = source.getOwningPhysicalTableName().getText()
      + '_'
      + transformAttributePath( source.getOwningAttributePath() );
  return toIdentifier( name, source.getBuildingContext() );
}
origin: org.hibernate.orm/hibernate-core

@Override
public Identifier determineCollectionTableName(ImplicitCollectionTableNameSource source) {
  // JPA states we should use the following as default:
  //      "The concatenation of the name of the containing entity and the name of the
  //       collection attribute, separated by an underscore.
  // aka:
  //     if owning entity has a JPA entity name: {OWNER JPA ENTITY NAME}_{COLLECTION ATTRIBUTE NAME}
  //     otherwise: {OWNER ENTITY NAME}_{COLLECTION ATTRIBUTE NAME}
  final String entityName = transformEntityName( source.getOwningEntityNaming() );
  final String name = entityName
      + '_'
      + transformAttributePath( source.getOwningAttributePath() );
  return toIdentifier( name, source.getBuildingContext() );
}
origin: org.hibernate.orm/hibernate-core

@Override
public Identifier determineCollectionTableName(ImplicitCollectionTableNameSource source) {
  Identifier identifier = toIdentifier(
      source.getOwningPhysicalTableName().getText() + "_" + transformAttributePath( source.getOwningAttributePath() ),
      source.getBuildingContext()
  );
  if ( source.getOwningPhysicalTableName().isQuoted() ) {
    identifier = Identifier.quote( identifier );
  }
  return identifier;
}
origin: v-ladynev/fluent-hibernate

@Override
public Identifier determineCollectionTableName(ImplicitCollectionTableNameSource source) {
  String ownerEntity = source.getOwningEntityNaming().getEntityName();
  String ownerEntityTable = NamingStrategyUtils.unqualifyEntityName(ownerEntity);
  String associatedEntity = null;
  String associatedEntityTable = null;
  String propertyName = getPropertyName(source.getOwningAttributePath());
  String result = hibernate4Strategy.collectionTableName(ownerEntity, ownerEntityTable,
      associatedEntity, associatedEntityTable, propertyName);
  return toIdentifier(result, source.getBuildingContext());
}
org.hibernate.boot.model.namingImplicitCollectionTableNameSource

Javadoc

Context for determining the implicit name for a collection table.

Most used methods

  • getOwningAttributePath
    Access to the name of the attribute, from the owning side, that defines the association.
  • getBuildingContext
  • getOwningEntityNaming
    Access to entity naming information for the owning side.
  • getOwningPhysicalTableName
    Access to the physical name of the owning entity's table.

Popular in Java

  • Creating JSON documents from java classes using gson
  • getResourceAsStream (ClassLoader)
  • getSupportFragmentManager (FragmentActivity)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • TreeMap (java.util)
    A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
  • JOptionPane (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now