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

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

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

origin: hibernate/hibernate-orm

@Override
public Identifier determineUniqueKeyName(ImplicitUniqueKeyNameSource source) {
  Identifier userProvidedIdentifier = source.getUserProvidedIdentifier();
  return userProvidedIdentifier != null ? userProvidedIdentifier : toIdentifier(
      NamingHelper.withCharset( source.getBuildingContext().getBuildingOptions().getSchemaCharset() ).generateHashedConstraintName(
          "UK",
          source.getTableName(),
          source.getColumnNames()
      ),
      source.getBuildingContext()
  );
}
origin: v-ladynev/fluent-hibernate

/**
 * Generates a name for a unique constraint.
 */
@Override
public Identifier determineUniqueKeyName(ImplicitUniqueKeyNameSource source) {
  String result = generateHashedConstraintName(UNIQUE_CONSTRAINT_PREFIX,
      source.getTableName(), source.getColumnNames());
  return toIdentifier(result, source.getBuildingContext());
}
origin: Evolveum/midpoint

@Override
public Identifier determineUniqueKeyName(ImplicitUniqueKeyNameSource source) {
  Identifier i = super.determineUniqueKeyName(source);
  LOGGER.trace("determineUniqueKeyName {} {} -> {}", source.getTableName(), source.getColumnNames(), i);
  return i;
}
origin: org.ligoj.bootstrap/bootstrap-core

  @Override
  public Identifier determineUniqueKeyName(final ImplicitUniqueKeyNameSource source) {
    return toIdentifier(Constraint.generateName("UK_", new Table(source.getTableName().getText()), toColumns(source.getColumnNames())),
        source.getBuildingContext());
  }
}
origin: v-ladynev/fluent-hibernate

/**
 * Generates a name for a unique constraint.
 */
@Override
public Identifier determineUniqueKeyName(ImplicitUniqueKeyNameSource source) {
  List<Identifier> columnNames = source.getColumnNames();
  // constraints are supported for one column only
  if (InternalUtils.CollectionUtils.size(columnNames) != 1) {
    return super.determineUniqueKeyName(source);
  }
  String result = strategy.uniqueKeyConstraintName(source.getTableName().getText(),
      columnNames.get(0).getText());
  return toIdentifier(result, source);
}
origin: org.hibernate.orm/hibernate-core

@Override
public Identifier determineUniqueKeyName(ImplicitUniqueKeyNameSource source) {
  Identifier userProvidedIdentifier = source.getUserProvidedIdentifier();
  return userProvidedIdentifier != null ? userProvidedIdentifier : toIdentifier(
      NamingHelper.withCharset( source.getBuildingContext().getBuildingOptions().getSchemaCharset() ).generateHashedConstraintName(
          "UK",
          source.getTableName(),
          source.getColumnNames()
      ),
      source.getBuildingContext()
  );
}
org.hibernate.boot.model.namingImplicitUniqueKeyNameSource

Most used methods

  • getColumnNames
  • getTableName
  • getBuildingContext
  • getUserProvidedIdentifier

Popular in Java

  • Finding current android device location
  • onRequestPermissionsResult (Fragment)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • notifyDataSetChanged (ArrayAdapter)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • BoxLayout (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Best IntelliJ plugins
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