Package org.byteliberi.easydriver.generator.model

Examples of org.byteliberi.easydriver.generator.model.ClassModel.addProperty()


      final Set<Entry<String,String>> fksEntries = fks.entrySet();
      for (Entry<String, String> fksEntry : fksEntries) {
        final String examinedClass = Utils.getCamelNameFirstCapital( fksEntry.getValue() ) + "ObjectModel";
        if (!usedClasses.contains(examinedClass)) {
          usedClasses.add(examinedClass);
          classModel.addProperty(new PropertyModel(Visibility.PRIVATE, examinedClass, fksEntry.getKey()));
        }
      }
     
      // Let's add the properties for the columns
      for (PropertyModel prop : tableInfo.getProperties()) {
View Full Code Here


      }
     
      // Let's add the properties for the columns
      for (PropertyModel prop : tableInfo.getProperties()) {
        if (!fks.containsKey(prop.getName()))
          classModel.addProperty(prop);
      }
     
      final List<PropertyModel> primaryKeys = new LinkedList<PropertyModel>();
      final List<PropertyModel> presentProps = classModel.getProperties();
      for(PropertyModel primaryKey : tableInfo.getPrimaryKey()) {
View Full Code Here

      classModel.setEnumList("INSTANCE");
      classModel.setPackageName(this.packageName);
      classModel.addImport("org.byteliberi.easydriver.*")
      classModel.addImport("org.byteliberi.easydriver.fields.*");
     
      classModel.addProperty(new PropertyModel(Visibility.PRIVATE, DBTable.class.getSimpleName(), "table"));

      // Let's look for the fields       
      final List<FieldPropertyAssociation> fieldAssoc = tableInfo.getFields();
      final HashSet<String> usedFields = new HashSet<String>();
     
View Full Code Here

      final HashSet<String> usedFields = new HashSet<String>();
     
      for (FieldPropertyAssociation fa : fieldAssoc) {
        final String fieldName = fa.getFieldName();
        if (!usedFields.contains(fieldName)) {
          classModel.addProperty(fa.getProp());
          usedFields.add(fieldName);
        }
      }
       
      // Let's look for the relationships
View Full Code Here

          }
        }       
      } 
     
      for (String name : ext) {
        classModel.addProperty(new PropertyModel(Visibility.PRIVATE,
                             ManyToOne.class.getSimpleName(),
                             "fk" + Utils.getCamelNameFirstCapital(name)));
      }
       
      classModel.setConstructorGenerator(new TableStructureConstructor(tableName, fieldAssoc, rels, tableInfo.getPrimaryKey()));
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.