congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
StandardField
Code IndexAdd Tabnine to your IDE (free)

How to use
StandardField
in
org.tinygroup.metadata.config.stdfield

Best Java code snippets using org.tinygroup.metadata.config.stdfield.StandardField (Showing top 20 results out of 315)

origin: org.tinygroup/ientity

/**
 * 
 * 
 * @param 标准字段
 * @return
 */
public static String getDbFieldName(String standardFieldId) {
  return MetadataUtil.getStandardField(standardFieldId).getName();
}
origin: org.tinygroup/org.tinygroup.metadata

public void addStandardFields(StandardFields standardFields) {
  if (standardFields != null
      && standardFields.getStandardFieldList() != null) {
    for (StandardField field : standardFields.getStandardFieldList()) {
      if (standardFieldMap.containsKey(field.getId())) {
        if (ConfigUtil.isCheckStrict()) {
          //重复id
          throw new MetadataRuntimeException(STDFIELD_ADD_ALREADY_ERROR, field.getId());
        } else {
          LOGGER.error(new MetadataRuntimeException(STDFIELD_ADD_ALREADY_ERROR, field.getId()));
          continue;
        }
      }
      standardFieldMap.put(field.getId(), field);
      if (field.getNickNames() != null) {
        for (NickName name : field.getNickNames()) {
          StandardField newStandardField = new StandardField();
          newStandardField.setId(name.getId());
          newStandardField.setName(name.getName());
          newStandardField.setTitle(name.getTitle());
          newStandardField.setDefaultValue(field.getDefaultValue());
          newStandardField.setDescription(field.getDescription());
          newStandardField.setTypeId(field.getTypeId());
          standardFieldMap.put(name.getId(), newStandardField);
        }
      }
    }
  }
}
origin: org.tinygroup/org.tinygroup.database

protected String getComment(StandardField standardField) {
  String title = standardField.getTitle();
  String description = standardField.getDescription();
  String comment =
      StringUtil.isBlank(title) ? description :
          (StringUtil.isBlank(description) ? title : (title + " " + description));
  return comment == null ? "" : comment;
}
origin: org.tinygroup/metadata

public void addStandardFields(StandardFields standardFields) {
  if (standardFields != null
      && standardFields.getStandardFieldList() != null) {
    for (StandardField field : standardFields.getStandardFieldList()) {
      standardFieldMap.put(field.getId(), field);
      if(field.getNickNames()!=null){
        for(NickName name:field.getNickNames()){
          nickIdMap.put(name.getId(), field.getId());
        }
      }
    }
  }
}
origin: org.tinygroup/org.tinygroup.ientity

/**
 * 
 * 创建新的标准字段信息带有name和title属性
 * @param relationField
 * @param stdField
 * @return
 */
public StandardField createNewStandardField(RelationField relationField,
    StandardField stdField) {
  String aliasName = relationField.getAliseName();
  String title= relationField.getTitle();
  String refFieldId=relationField.getRefFieldId();
  if(!StringUtil.isBlank(refFieldId)){
    if(StringUtil.isBlank(aliasName)){//如果 ref-field-id值不为空且没有设置别名,那么别名值取自field-id的值
      aliasName=relationField.getFieldId();
    }
  }
  StandardField newStdField = new StandardField();
  if (StringUtil.isBlank(aliasName)) {//如果没有设置aliasName属性则取自标准字段
    aliasName=stdField.getName();
  }
  if(StringUtil.isBlank(title)){//如果为设置title属性则取自标准字段
    title=stdField.getTitle();
  }
  newStdField.setName(aliasName);
  newStdField.setTitle(title);
  return newStdField;
}
origin: org.tinygroup/org.tinygroup.database

    valuePair.getTableFieldId(), table, this.getClass()
        .getClassLoader());
standField.getName();
String standFieldName = DataBaseUtil.getDataBaseName(standField
    .getName());
MetadataUtil.getBusinessType(standField.getId(), getClass().getClassLoader());
values = values.append(",").append(dealValue(value, standField));
origin: org.tinygroup/metadata

public String getType(String id, String language) {
  StandardField standardField = getStandardField(id);
  String type = businessTypeProcessor.getType(standardField.getTypeId(),
      language);
  if (type != null) {
    return type;
  }
  throw new RuntimeException(String.format(
      "找不到ID:[%s]的标准字段对应的Language:[%s]类型。", id, language));
}
origin: org.tinygroup/org.tinygroup.database

/**
 * 根据标准字段获取标准类型
 * @param standardField
 * @return
 */
private String getDataTpOfStdFiled(StandardField standardField) {
  BusinessType businessType = MetadataUtil.getBusinessType(standardField.getId(), getClass().getClassLoader());
  return MetadataUtil.getStandardFieldType(businessType, getDatabaseType(),
      getClass().getClassLoader());
}
origin: org.tinygroup/org.tinygroup.database

private String getDefaultId(TableField field, StandardField standardField) {
  String fieldDefaultId = standardField.getDefaultValue();
  if (StringUtil.isEmpty(fieldDefaultId)) {
    StandardType standardType = MetadataUtil.getStandardType(standardField, getClass().getClassLoader());
    fieldDefaultId = standardType.getDefaultValueId();
  }
  return fieldDefaultId;
}
origin: org.tinygroup/ientity

/**
 * 
 * 创建新的标准字段信息带有name和title属性
 * @param relationField
 * @param stdField
 * @return
 */
public StandardField createNewStandardField(RelationField relationField,
    StandardField stdField) {
  String aliasName = relationField.getAliseName();
  String title= relationField.getTitle();
  String refFieldId=relationField.getRefFieldId();
  if(!StringUtil.isBlank(refFieldId)){
    if(StringUtil.isBlank(aliasName)){//如果 ref-field-id值不为空且没有设置别名,那么别名值取自field-id的值
      aliasName=relationField.getFieldId();
    }
  }
  StandardField newStdField = new StandardField();
  if (StringUtil.isBlank(aliasName)) {//如果没有设置aliasName属性则取自标准字段
    aliasName=stdField.getName();
  }
  if(StringUtil.isBlank(title)){//如果为设置title属性则取自标准字段
    title=stdField.getTitle();
  }
  newStdField.setName(aliasName);
  newStdField.setTitle(title);
  return newStdField;
}
origin: org.tinygroup/org.tinygroup.metadata

public void removeStandardFields(StandardFields standardFields) {
  if (standardFields != null
      && standardFields.getStandardFieldList() != null) {
    for (StandardField field : standardFields.getStandardFieldList()) {
      standardFieldMap.remove(field.getId());
      if (field.getNickNames() != null) {
        for (NickName name : field.getNickNames()) {
          standardFieldMap.remove(name.getId());
        }
      }
    }
  }
}
origin: org.tinygroup/org.tinygroup.metadata

public static BusinessType getBusinessType(String fieldId,
                      ClassLoader loader) {
  StandardField field = getStandardField(fieldId, loader);
  BusinessTypeProcessor businessTypeProcessor = getBusinessTypeProcessor(loader);
  BusinessType businessType = businessTypeProcessor
      .getBusinessTypes(field.getTypeId());
  return businessType;
}
origin: org.tinygroup/org.tinygroup.metadata

  public static String getDataTpOfStdFiled(StandardField standardField, String language, ClassLoader loader) {
    BusinessType businessType = MetadataUtil.getBusinessType(standardField.getId(), loader);
    return MetadataUtil.getStandardFieldType(businessType, language,
        loader);
  }
}
origin: org.tinygroup/org.tinygroup.ientity

/**
 * 
 * 
 * @param 标准字段
 * @return
 */
public static String getDbFieldName(String standardFieldId) {
  return MetadataUtil.getStandardField(standardFieldId).getName();
}
origin: org.tinygroup/org.tinygroup.metadata

public static StandardType getStandardType(StandardField standardField,
                      ClassLoader loader) {
  BusinessTypeProcessor businessTypeProcessor = getBusinessTypeProcessor(loader);
  BusinessType businessType = businessTypeProcessor
      .getBusinessTypes(standardField.getTypeId());
  return getStandardType(businessType, loader);
}
origin: org.tinygroup/ientity

/**
 * 
 * 
 * @param 找不到标准字段则返回参数
 * @return
 */
public String getDbFieldName(String standardFieldId) {
  try {
    StandardField standardField=getStandardField(standardFieldId);
    return standardField.getName();
  } catch (Exception e) {
  }
  return standardFieldId;
}
origin: org.tinygroup/org.tinygroup.metadata

public String getType(String id, String language) {
  StandardField standardField = getStandardField(id);
  String type = businessTypeProcessor.getType(standardField.getTypeId(),
      language);
  if (type != null) {
    return type;
  }
  throw new MetadataRuntimeException(STDFIELD_LANGUAGE_TYPE_NOT_EXISTS_ERROR, id, language);
}
origin: org.tinygroup/org.tinygroup.ientity

/**
 * 
 * 
 * @param 找不到标准字段则返回参数
 * @return
 */
public String getDbFieldName(String standardFieldId) {
  try {
    StandardField standardField=getStandardField(standardFieldId);
    return standardField.getName();
  } catch (Exception e) {
  }
  return standardFieldId;
}
origin: org.tinygroup/metadata

  public static StandardType getStandardType(StandardField field) {
    BusinessTypeProcessor businessTypeProcessor = SpringUtil
        .getBean(MetadataUtil.BUSINESSTYPEPROCESSOR_BEAN);
    BusinessType businessType = businessTypeProcessor
        .getBusinessTypes(field.getTypeId());
    StandardTypeProcessor standardTypeProcessor = SpringUtil
        .getBean(MetadataUtil.STANDARDTYPEPROCESSOR_BEAN);
    return standardTypeProcessor.getStandardType(businessType.getTypeId());
  }
}
origin: org.tinygroup/org.tinygroup.database

private void appendFooterColumnComment(Table table, StandardField standardField, String standardComment, List list) {
  String schema = StringUtil.defaultIfBlank(table.getSchema(), "dbo");
  String comment = String.format("execute sp_addextendedproperty N'MS_Description', N'%s', N'SCHEMA', N'%s', N'TABLE', N'%s', N'COLUMN', N'%s'"
      , standardComment, schema, table.getNameWithOutSchema(), standardField.getName());
  list.add(comment);
}
org.tinygroup.metadata.config.stdfieldStandardField

Most used methods

  • getName
  • <init>
  • getId
  • getTitle
  • setName
  • setTitle
  • getDefaultValue
  • getDescription
  • getNickNames
  • getTypeId
  • setDefaultValue
  • setDescription
  • setDefaultValue,
  • setDescription,
  • setId,
  • setTypeId

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSharedPreferences (Context)
  • onRequestPermissionsResult (Fragment)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • JTextField (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now