Package net.sf.minuteProject.configuration.bean.model.data.impl.DDLUtils

Examples of net.sf.minuteProject.configuration.bean.model.data.impl.DDLUtils.ForeignKeyDDLUtils


    if (field.getLinkToTargetEntity()!=null && field.getLinkToTargetField()!=null) {
      Reference reference = ReferenceUtils.getReference(field, database);
      if (reference!=null) {
        org.apache.ddlutils.model.ForeignKey foreignKeyMp = new org.apache.ddlutils.model.ForeignKey();
        foreignKeyMp.setName(field.getName());
        ForeignKey foreignKey = new ForeignKeyDDLUtils (foreignKeyMp);
        foreignKey.setForeignTableName(field.getLinkToTargetEntity());
        foreignKey.setReference (reference);
        // bidirection
        if (field.getBidirectional()!=null && field.getBidirectional().equals("false"))
          foreignKey.setBidirectional(false);
        return foreignKey;
      }
      logger.info("no correct fk found for "+field.getEntity().getName()+" - "+field.getName()+" - pointing towards "+field.getLinkToTargetEntity()+" - "+field.getLinkToTargetField());
    }
    return null;
View Full Code Here

TOP

Related Classes of net.sf.minuteProject.configuration.bean.model.data.impl.DDLUtils.ForeignKeyDDLUtils

Copyright © 2018 www.massapicom. 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.