Examples of AmberTable


Examples of com.caucho.amber.table.AmberTable

      break;
    default:
      throw new IllegalStateException();
    }

    AmberTable table = entityType.getTable();

    // jpa/0gg0
    if (table == null)
      return;

    com.caucho.amber.table.AmberColumn column
      = table.createColumn(columnName, columnType);

    if (discriminatorAnn != null) {
//      column.setNotNull(! discriminatorAnn.nullable());

      column.setLength(discriminatorAnn.length());
View Full Code Here

Examples of com.caucho.amber.table.AmberTable

                               EntityType parentType)
  {
    // XXX: need better test
    boolean isEntity = ! (entityType instanceof MappedSuperclassType);
   
    AmberTable table = null;

    getInternalTableConfig(type, _annotationCfg);
    Table tableAnn = (Table) _annotationCfg.getAnnotation();
    TableConfig tableConfig = _annotationCfg.getTableConfig();
View Full Code Here

Examples of com.caucho.amber.table.AmberTable

  {
    getInternalSecondaryTableConfig(type, _annotationCfg);
    SecondaryTable secondaryTableAnn = (SecondaryTable) _annotationCfg.getAnnotation();
    SecondaryTableConfig secondaryTableConfig = _annotationCfg.getSecondaryTableConfig();

    AmberTable secondaryTable = null;

    if ((secondaryTableAnn != null) || (secondaryTableConfig != null)) {
      String secondaryName;

      if (secondaryTableAnn != null)
View Full Code Here

Examples of com.caucho.amber.table.AmberTable

    // XXX: also needs to check PersistenceContextType.TRANSACTION/EXTENDED.
    // jpa/0k10
    if (! isActiveTransaction())
      return;

    AmberTable table = entity.__caucho_getEntityType().getTable();

    Object key = entity.__caucho_getPrimaryKey();

    addCompletion(new RowInvalidateCompletion(table.getName(), key));

    // jpa/0ga8, jpa/0s2d if (! _txEntities.contains(entity)) {
    Entity oldEntity = getTransactionEntity(entity.getClass(), key);

    if (oldEntity == null) {
View Full Code Here

Examples of com.caucho.amber.table.AmberTable

    // XXX: not correct, since we need to keep the P_PERSIST state around
    // and P_PERSIST is a transactional state
    // setTransactionalState(entity);

    // jpa/0g0i
    AmberTable table = home.getEntityType().getTable();
    addCompletion(new RowInsertCompletion(table.getName()));
  }
View Full Code Here

Examples of com.caucho.amber.table.AmberTable

    if (_fromItem != null)
      return this;

    _fromItem = _parent.bindSubPath(parser);

    AmberTable sourceTable = _linkColumns.getSourceTable();
    _childFromItem = parser.addFromItem(sourceTable, id);

    JoinExpr joinExpr;
    joinExpr = new OneToManyJoinExpr(_linkColumns,
                                     _childFromItem,
View Full Code Here

Examples of com.caucho.amber.table.AmberTable

      return this;

    if (_fromItem == null)
      _fromItem = _parent.bindSubPath(parser);

    AmberTable targetTable = _linkColumns.getTargetTable();
    _childFromItem = parser.addFromItem(targetTable, id);

    JoinExpr joinExpr;
    joinExpr = new ManyToOneJoinExpr(_linkColumns,
                                     _fromItem,
View Full Code Here

Examples of com.caucho.amber.table.AmberTable

    CollectionTableConfig collectionTableConfig = _collectionTable;
    AmberPersistenceUnit persistenceUnit = _sourceType.getPersistenceUnit();

    String sqlTable = collectionTableConfig.getName();
    AmberTable mapTable = persistenceUnit.createTable(sqlTable);

    HashMap<String, JoinColumnConfig> joinColumnsConfig
      = collectionTableConfig.getJoinColumnMap();

    ArrayList<ForeignColumn> sourceColumns = null;
View Full Code Here

Examples of com.caucho.amber.table.AmberTable

    if (entityType == null) { // embeddable
      column = new AmberColumn(null, name, amberType);
    }
    else if (columnAnn != null && ! columnAnn.table().equals("")) {
      String tableName = columnAnn.table();
      AmberTable table;

      table = entityType.getSecondaryTable(tableName);

      if (table == null)
        throw error(field, L.l("{0} @Column(table='{1}') is an unknown secondary table.",
                               fieldName,
                               tableName));

      column = table.createColumn(name, amberType);
    }
    else if (entityType.getTable() != null)
      column = entityType.getTable().createColumn(name, amberType);
    else { // jpa/0ge2: MappedSuperclassType
      column = new AmberColumn(null, name, amberType);
View Full Code Here

Examples of com.caucho.amber.table.AmberTable

      _entityType.addField(embeddedField);

      // XXX: todo ...
      // validateAttributeOverrides(_field, attributeOverridesAnn, type);

      AmberTable sourceTable = _entityType.getTable();

      HashMap<String, AmberColumn> embeddedColumns = new HashMap<String, AmberColumn>();
      HashMap<String, String> fieldNameByColumn = new HashMap<String, String>();

      for (EmbeddedSubField subField : embeddedField.getSubFields()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.