Пример #1
1
  protected void calculateModelAttributes() {
    String pakkage = calculateJavaModelPackage();

    StringBuilder sb = new StringBuilder();
    sb.append(pakkage);
    sb.append('.');
    sb.append(fullyQualifiedTable.getDomainObjectName());
    sb.append("Key"); // $NON-NLS-1$
    setPrimaryKeyType(sb.toString());

    sb.setLength(0);
    sb.append(pakkage);
    sb.append('.');
    sb.append(fullyQualifiedTable.getDomainObjectName());
    setBaseRecordType(sb.toString());

    sb.setLength(0);
    sb.append(pakkage);
    sb.append('.');
    sb.append(fullyQualifiedTable.getDomainObjectName());
    sb.append("WithBLOBs"); // $NON-NLS-1$
    setRecordWithBLOBsType(sb.toString());

    sb.setLength(0);
    sb.append(pakkage);
    sb.append('.');
    sb.append(fullyQualifiedTable.getDomainObjectName());
    sb.append("Example"); // $NON-NLS-1$
    setExampleType(sb.toString());
  }
Пример #2
1
  protected void calculateJavaClientAttributes() {
    if (context.getJavaClientGeneratorConfiguration() == null) {
      return;
    }

    StringBuilder sb = new StringBuilder();
    sb.append(calculateJavaClientImplementationPackage());
    sb.append('.');
    sb.append(fullyQualifiedTable.getDomainObjectName());
    sb.append("DAOImpl"); // $NON-NLS-1$
    setDAOImplementationType(sb.toString());

    sb.setLength(0);
    sb.append(calculateJavaClientInterfacePackage());
    sb.append('.');
    sb.append(fullyQualifiedTable.getDomainObjectName());
    sb.append("DAO"); // $NON-NLS-1$
    setDAOInterfaceType(sb.toString());

    sb.setLength(0);
    sb.append(calculateJavaClientInterfacePackage());
    sb.append('.');
    sb.append(fullyQualifiedTable.getDomainObjectName());
    sb.append("Mapper"); // $NON-NLS-1$
    setMyBatis3JavaMapperType(sb.toString());

    sb.setLength(0);
    sb.append(calculateJavaClientInterfacePackage());
    sb.append('.');
    sb.append(fullyQualifiedTable.getDomainObjectName());
    sb.append("SqlProvider"); // $NON-NLS-1$
    setMyBatis3SqlProviderType(sb.toString());
  }
Пример #3
0
 protected String calculateMyBatis3FallbackSqlMapNamespace() {
   StringBuilder sb = new StringBuilder();
   sb.append(calculateSqlMapPackage());
   sb.append('.');
   sb.append(fullyQualifiedTable.getDomainObjectName());
   sb.append("Mapper"); // $NON-NLS-1$
   return sb.toString();
 }
Пример #4
0
 protected String calculateMyBatis3XmlMapperFileName() {
   StringBuilder sb = new StringBuilder();
   sb.append(fullyQualifiedTable.getDomainObjectName());
   sb.append("Mapper.xml"); // $NON-NLS-1$
   return sb.toString();
 }
Пример #5
0
  protected void calculateExtjsAttributes() {
    String appName = calculateExtjsAppName();
    String pakkage = calculateExtjsPackage();
    if (null == appName || appName.trim().isEmpty()) {
      return;
    }
    if (null == pakkage || pakkage.trim().isEmpty()) {
      return;
    }
    //
    String domainObjectName = fullyQualifiedTable.getDomainObjectName();

    // TODO 添加
    //
    StringBuilder sb = new StringBuilder();
    // model
    sb.setLength(0);
    sb.append(appName);
    sb.append(".");
    sb.append("model");
    sb.append(".");
    sb.append(pakkage);
    sb.append('.');
    sb.append(domainObjectName);
    setExtjsModel(sb.toString());

    // store
    sb.setLength(0);
    sb.append(appName);
    sb.append(".");
    sb.append("store");
    sb.append(".");
    sb.append(pakkage);
    sb.append('.');
    sb.append(domainObjectName);
    sb.append("Store"); // $NON-NLS-1$
    setExtjsStore(sb.toString());

    // grid
    sb.setLength(0);
    sb.append(appName);
    sb.append(".");
    sb.append("view");
    sb.append(".");
    sb.append(pakkage);
    sb.append('.');
    sb.append(domainObjectName);
    sb.append("Grid"); // $NON-NLS-1$
    setExtjsGrid(sb.toString());

    // controller
    sb.setLength(0);
    sb.append(appName);
    sb.append(".");
    sb.append("controller");
    sb.append(".");
    sb.append(pakkage);
    sb.append('.');
    sb.append(domainObjectName);
    sb.append("Controller"); // $NON-NLS-1$
    setExtjsController(sb.toString());
  }