Tabnine Logo
Ejb3Column.getTable
Code IndexAdd Tabnine to your IDE (free)

How to use
getTable
method
in
org.hibernate.cfg.Ejb3Column

Best Java code snippets using org.hibernate.cfg.Ejb3Column.getTable (Showing top 20 results out of 315)

origin: hibernate/hibernate-orm

  @Override
  public String toString() {
    return "Ejb3Column" + "{table=" + getTable()
        + ", mappingColumn=" + mappingColumn.getName()
        + ", insertable=" + insertable
        + ", updatable=" + updatable
        + ", unique=" + unique + '}';
  }
}
origin: hibernate/hibernate-orm

public static void checkPropertyConsistency(Ejb3Column[] columns, String propertyName) {
  int nbrOfColumns = columns.length;
  if ( nbrOfColumns > 1 ) {
    for (int currentIndex = 1; currentIndex < nbrOfColumns; currentIndex++) {
      if (columns[currentIndex].isFormula() || columns[currentIndex - 1].isFormula()) {
        continue;
      }
      if ( columns[currentIndex].isInsertable() != columns[currentIndex - 1].isInsertable() ) {
        throw new AnnotationException(
            "Mixing insertable and non insertable columns in a property is not allowed: " + propertyName
        );
      }
      if ( columns[currentIndex].isNullable() != columns[currentIndex - 1].isNullable() ) {
        throw new AnnotationException(
            "Mixing nullable and non nullable columns in a property is not allowed: " + propertyName
        );
      }
      if ( columns[currentIndex].isUpdatable() != columns[currentIndex - 1].isUpdatable() ) {
        throw new AnnotationException(
            "Mixing updatable and non updatable columns in a property is not allowed: " + propertyName
        );
      }
      if ( !columns[currentIndex].getTable().equals( columns[currentIndex - 1].getTable() ) ) {
        throw new AnnotationException(
            "Mixing different tables in a property is not allowed: " + propertyName
        );
      }
    }
  }
}
origin: hibernate/hibernate-orm

public void addProperty(Property prop, Ejb3Column[] columns, XClass declaringClass) {
  //Ejb3Column.checkPropertyConsistency( ); //already called earlier
  /*
   * Check table matches between the component and the columns
   * if not, change the component table if no properties are set
   * if a property is set already the core cannot support that
   */
  if (columns != null) {
    Table table = columns[0].getTable();
    if ( !table.equals( component.getTable() ) ) {
      if ( component.getPropertySpan() == 0 ) {
        component.setTable( table );
      }
      else {
        throw new AnnotationException(
            "A component cannot hold properties split into 2 different tables: "
                + this.getPath()
        );
      }
    }
  }
  addProperty( prop, declaringClass );
}
origin: hibernate/hibernate-orm

this.table = column.getTable();
origin: hibernate/hibernate-orm

public SimpleValue make() {
  validate();
  LOG.debugf( "building SimpleValue for %s", propertyName );
  if ( table == null ) {
    table = columns[0].getTable();
  }
  simpleValue = new SimpleValue( buildingContext, table );
  if ( isVersion ) {
    simpleValue.makeVersion();
  }
  if ( isNationalized ) {
    simpleValue.makeNationalized();
  }
  if ( isLob ) {
    simpleValue.makeLob();
  }
  linkWithValue();
  boolean isInSecondPass = buildingContext.getMetadataCollector().isInSecondPass();
  if ( !isInSecondPass ) {
    //Defer this to the second pass
    buildingContext.getMetadataCollector().addSecondPass( new SetSimpleValueTypeSecondPass( this ) );
  }
  else {
    //We are already in second pass
    fillSimpleValue();
  }
  return simpleValue;
}
origin: org.hibernate/hibernate-annotations

  @Override
  public String toString() {
    final StringBuilder sb = new StringBuilder();
    sb.append( "Ejb3Column" );
    sb.append( "{table=" ).append( getTable() );
    sb.append( ", mappingColumn=" ).append( mappingColumn.getName() );
    sb.append( ", insertable=" ).append( insertable );
    sb.append( ", updatable=" ).append( updatable );
    sb.append( ", unique=" ).append( unique );
    sb.append( '}' );
    return sb.toString();
  }
}
origin: org.hibernate/hibernate-annotations

public void doSecondPass(Map persistentClasses) throws MappingException {
  if ( columns != null ) {
    for (String columnName : columns) {
      addConstraintToColumn( columnName );
    }
  }
  if ( column != null ) {
    this.table = column.getTable();
    addConstraintToColumn( mappings.getLogicalColumnName( column.getMappingColumn().getQuotedName(), table ) );
  }
}
origin: org.hibernate/hibernate-annotations

public void addProperty(Property prop, Ejb3Column[] columns, XClass declaringClass) {
  //Ejb3Column.checkPropertyConsistency( ); //already called earlier
  /*
   * Check table matches between the component and the columns
   * if not, change the component table if no properties are set
   * if a property is set already the core cannot support that
   */
  if (columns != null) {
    Table table = columns[0].getTable();
    if ( !table.equals( component.getTable() ) ) {
      if ( component.getPropertySpan() == 0 ) {
        component.setTable( table );
      }
      else {
        throw new AnnotationException(
            "A component cannot hold properties split into 2 different tables: "
                + this.getPath()
        );
      }
    }
  }
  addProperty( prop, declaringClass );
}
origin: org.hibernate/hibernate-annotations

public SimpleValue make() {
      
  validate();
  log.debug( "building SimpleValue for {}", propertyName );
  if ( table == null ) {
    table = columns[0].getTable();
  }
  simpleValue = new SimpleValue( table );
  linkWithValue();
  boolean isInSecondPass = mappings.isInSecondPass();
  SetSimpleValueTypeSecondPass secondPass = new SetSimpleValueTypeSecondPass(this);
  if (!isInSecondPass) {
    //Defer this to the second pass
    mappings.addSecondPass(secondPass);
  }
  else {
    //We are already in second pass
    fillSimpleValue();
  }
  return simpleValue;
}
origin: org.hibernate/hibernate-annotations

  );
if ( !columns[currentIndex].getTable().equals( columns[currentIndex - 1].getTable() ) ) {
  throw new AnnotationException(
      "Mixing different tables in a property is not allowed: " + propertyName
origin: org.hibernate/hibernate-annotations

typeParameters = new Properties();
typeParameters.setProperty( EnumType.ENUM, returnedClassOrElement.getName() );
String schema = columns[0].getTable().getSchema();
schema = schema == null ? "" : schema;
String catalog = columns[0].getTable().getCatalog();
catalog = catalog == null ? "" : catalog;
typeParameters.setProperty( EnumType.SCHEMA, schema );
typeParameters.setProperty( EnumType.CATALOG, catalog );
typeParameters.setProperty( EnumType.TABLE, columns[0].getTable().getName() );
typeParameters.setProperty( EnumType.COLUMN, columns[0].getName() );
javax.persistence.EnumType enumType = getEnumType( property );
origin: hibernate/hibernate-orm

if ( joinColumns != null ) {
  for ( Ejb3Column column : joinColumns ) {
    String keyName = "UK_" + Constraint.hashedName( column.getTable().getName() + "_NaturalID" );
    column.addUniqueKey( keyName, inSecondPass );
    String keyName = "UK_" + Constraint.hashedName( column.getTable().getName() + "_NaturalID" );
    column.addUniqueKey( keyName, inSecondPass );
origin: org.hibernate/com.springsource.org.hibernate.core

  @Override
  public String toString() {
    final StringBuilder sb = new StringBuilder();
    sb.append( "Ejb3Column" );
    sb.append( "{table=" ).append( getTable() );
    sb.append( ", mappingColumn=" ).append( mappingColumn.getName() );
    sb.append( ", insertable=" ).append( insertable );
    sb.append( ", updatable=" ).append( updatable );
    sb.append( ", unique=" ).append( unique );
    sb.append( '}' );
    return sb.toString();
  }
}
origin: org.hibernate/com.springsource.org.hibernate

  @Override
  public String toString() {
    final StringBuilder sb = new StringBuilder();
    sb.append( "Ejb3Column" );
    sb.append( "{table=" ).append( getTable() );
    sb.append( ", mappingColumn=" ).append( mappingColumn.getName() );
    sb.append( ", insertable=" ).append( insertable );
    sb.append( ", updatable=" ).append( updatable );
    sb.append( ", unique=" ).append( unique );
    sb.append( '}' );
    return sb.toString();
  }
}
origin: jboss.jboss-embeddable-ejb3/hibernate-all

public SimpleValue make() {
  validate();
  log.debug( "building SimpleValue for " + propertyName );
  if (table == null) {
    table = columns[0].getTable();
  }
  SimpleValue simpleValue = new SimpleValue( table );
  return fillSimpleValue( simpleValue );
}
origin: jboss.jboss-embeddable-ejb3/hibernate-all

public void doSecondPass(Map persistentClasses) throws MappingException {
  if ( columns != null ) {
    for ( String columnName : columns ) {
      addIndexToColumn( columnName );
    }
  }
  if ( column != null ) {
    this.table = column.getTable();
    addIndexToColumn( mappings.getLogicalColumnName( column.getName(), table ) );
  }
}
origin: org.hibernate/com.springsource.org.hibernate.core

public void doSecondPass(Map persistentClasses) throws MappingException {
  if ( columns != null ) {
    for (String columnName : columns) {
      addConstraintToColumn( columnName );
    }
  }
  if ( column != null ) {
    this.table = column.getTable();
    addConstraintToColumn( mappings.getLogicalColumnName( column.getMappingColumn().getQuotedName(), table ) );
  }
}
origin: org.hibernate/com.springsource.org.hibernate

public void doSecondPass(Map persistentClasses) throws MappingException {
  if ( columns != null ) {
    for (String columnName : columns) {
      addConstraintToColumn( columnName );
    }
  }
  if ( column != null ) {
    this.table = column.getTable();
    addConstraintToColumn( mappings.getLogicalColumnName( column.getMappingColumn().getQuotedName(), table ) );
  }
}
origin: org.hibernate/com.springsource.org.hibernate.core

public SimpleValue make() {
  validate();
  LOG.debugf( "building SimpleValue for %s", propertyName );
  if ( table == null ) {
    table = columns[0].getTable();
  }
  simpleValue = new SimpleValue( mappings, table );
  linkWithValue();
  boolean isInSecondPass = mappings.isInSecondPass();
  SetSimpleValueTypeSecondPass secondPass = new SetSimpleValueTypeSecondPass( this );
  if ( !isInSecondPass ) {
    //Defer this to the second pass
    mappings.addSecondPass( secondPass );
  }
  else {
    //We are already in second pass
    fillSimpleValue();
  }
  return simpleValue;
}
origin: org.hibernate/com.springsource.org.hibernate

public SimpleValue make() {
  validate();
  LOG.debugf( "building SimpleValue for %s", propertyName );
  if ( table == null ) {
    table = columns[0].getTable();
  }
  simpleValue = new SimpleValue( mappings, table );
  linkWithValue();
  boolean isInSecondPass = mappings.isInSecondPass();
  SetSimpleValueTypeSecondPass secondPass = new SetSimpleValueTypeSecondPass( this );
  if ( !isInSecondPass ) {
    //Defer this to the second pass
    mappings.addSecondPass( secondPass );
  }
  else {
    //We are already in second pass
    fillSimpleValue();
  }
  return simpleValue;
}
org.hibernate.cfgEjb3ColumngetTable

Javadoc

Find appropriate table of the column. It can come from a secondary table or from the main table of the persistent class

Popular methods of Ejb3Column

  • <init>
  • bind
  • buildColumnFromAnnotation
  • buildImplicitColumn
  • checkPropertyConsistency
  • forceNotNull
  • getJoin
  • getMappingColumn
  • initMappingColumn
  • isInsertable
  • isNullable
  • isSecondary
  • isNullable,
  • isSecondary,
  • isUpdatable,
  • linkWithValue,
  • redefineColumnName,
  • setFormula,
  • setImplicit,
  • setInsertable,
  • setJoins

Popular in Java

  • Finding current android device location
  • compareTo (BigDecimal)
  • getExternalFilesDir (Context)
  • getSupportFragmentManager (FragmentActivity)
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • JTextField (javax.swing)
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now