Examples of ImportedId


Examples of com.avaje.ebeaninternal.server.deploy.id.ImportedId

    }
   
    BeanPropertyAssocOne<?>[] oneImported = descriptor.propertiesOneImported();
    for (BeanPropertyAssocOne<?> assocOne : oneImported) {
     
      ImportedId importedId = assocOne.getImportedId();
      if (importedId == null){
        String m = descriptor.getFullName()+" importedId is null for associated: "+assocOne.getFullBeanName();
        logger.error(m);
       
      } else if (importedId.isScalar()){
        deployMap.put(importedId.getLogicalName(), importedId.getDbColumn());
      }
    }
   
    return deployMap;
  }   
View Full Code Here

Examples of com.avaje.ebeaninternal.server.deploy.id.ImportedId

  }

  @Override
  public void visitOneImported(BeanPropertyAssocOne<?> p) {

    ImportedId importedId = p.getImportedId();

    TableJoinColumn[] columns = p.getTableJoin().columns();
    if (columns.length == 0) {
      String msg = "No join columns for " + p.getFullBeanName();
      throw new RuntimeException(msg);
    }

    StringBuilder constraintExpr = createUniqueConstraintBuffer(p.getBeanDescriptor().getBaseTable(), columns[0].getLocalDbColumn());

    for (int i = 0; i < columns.length; i++) {

      String dbCol = columns[i].getLocalDbColumn();

      if (i > 0) {
        constraintExpr.append(", ");
      }
      constraintExpr.append(dbCol);

      if (parent.isDbColumnWritten(dbCol)) {
        continue;
      }

      parent.writeColumnName(dbCol, p);

      BeanProperty importedProperty = importedId.findMatchImport(dbCol);
      if (importedProperty != null) {

        String columnDefn = ctx.getColumnDefn(importedProperty);
        ctx.write(columnDefn);
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.