congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Making http post requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setScale (BigDecimal)
  • setContentView (Activity)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • JList (javax.swing)
  • Option (scala)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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