Package org.byteliberi.easydriver.generator.model

Examples of org.byteliberi.easydriver.generator.model.FieldInit


    final LinkedList<FieldInit> found = new LinkedList<FieldInit>();   
       
    final HashSet<String> usedExtTables = new HashSet<String>();
    for (FieldPropertyAssociation fieldProp : fields) {
     
      FieldInit fpa=null;
      final String columnName = fieldProp.getFieldName();
       
      final List<RelationModel> relationModelList = findRelByColumn(relations, columnName);
      if (relationModelList == null)
        fpa = new FieldInit( Utils.getCamelNameFirstCapital(columnName) );
      else {
        final RelationModel relationModel = relationModelList.iterator().next();
        final String referencedTable = relationModel.getOneTable() + "ObjectModel";
        final String localColumnName = relationModel.getRfManyTable();
        if (!usedExtTables.contains(referencedTable)) {
          final LinkedList<String> columns = new LinkedList<String>();
          for (RelationModel rm : relationModelList)
            columns.add( Utils.getCamelNameFirstCapitalrm.getRfManyTable() ));         
         
          fpa = new FieldInit(columns,
                    Utils.getCamelNameFirstCapital(localColumnName),
                    Utils.getCamelNameFirstCapital(referencedTable));
         
          usedExtTables.add(referencedTable);
        }
View Full Code Here

TOP

Related Classes of org.byteliberi.easydriver.generator.model.FieldInit

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.