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());
  }
  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());
  }
 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();
 }
  protected String calculateJavaModelPackage() {
    JavaModelGeneratorConfiguration config = context.getJavaModelGeneratorConfiguration();

    StringBuilder sb = new StringBuilder();
    sb.append(config.getTargetPackage());
    sb.append(fullyQualifiedTable.getSubPackage(isSubPackagesEnabled(config)));

    return sb.toString();
  }
  protected String calculateSqlMapPackage() {
    StringBuilder sb = new StringBuilder();
    SqlMapGeneratorConfiguration config = context.getSqlMapGeneratorConfiguration();

    // config can be null if the Java client does not require XML
    if (config != null) {
      sb.append(config.getTargetPackage());
      sb.append(fullyQualifiedTable.getSubPackage(isSubPackagesEnabled(config)));
    }

    return sb.toString();
  }
  protected String calculateJavaClientInterfacePackage() {
    JavaClientGeneratorConfiguration config = context.getJavaClientGeneratorConfiguration();
    if (config == null) {
      return null;
    }

    StringBuilder sb = new StringBuilder();
    sb.append(config.getTargetPackage());

    sb.append(fullyQualifiedTable.getSubPackage(isSubPackagesEnabled(config)));

    return sb.toString();
  }
 protected String calculateSqlMapAliasedFullyQualifiedRuntimeTableName() {
   return fullyQualifiedTable.getAliasedFullyQualifiedTableNameAtRuntime();
 }
 protected String calculateIbatis2SqlMapNamespace() {
   return fullyQualifiedTable.getIbatis2SqlMapNamespace();
 }
 protected String calculateMyBatis3XmlMapperFileName() {
   StringBuilder sb = new StringBuilder();
   sb.append(fullyQualifiedTable.getDomainObjectName());
   sb.append("Mapper.xml"); // $NON-NLS-1$
   return sb.toString();
 }
 protected String calculateIbatis2SqlMapFileName() {
   StringBuilder sb = new StringBuilder();
   sb.append(fullyQualifiedTable.getIbatis2SqlMapNamespace());
   sb.append("_SqlMap.xml"); // $NON-NLS-1$
   return sb.toString();
 }
  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());
  }