/** * 根据标准字段获取标准类型 * @param standardField * @return */ private String getDataTpOfStdFiled(StandardField standardField) { BusinessType businessType = MetadataUtil.getBusinessType(standardField.getId(), getClass().getClassLoader()); return MetadataUtil.getStandardFieldType(businessType, getDatabaseType(), getClass().getClassLoader()); }
public static String getDataTpOfStdFiled(StandardField standardField, String language, ClassLoader loader) { BusinessType businessType = MetadataUtil.getBusinessType(standardField.getId(), loader); return MetadataUtil.getStandardFieldType(businessType, language, loader); } }
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()); } } } } }
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()); } } } } }
MetadataUtil.getBusinessType(standField.getId(), getClass().getClassLoader()); values = values.append(",").append(dealValue(value, standField));
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); } } } } }