// ============================================================
 // <T>保存设置信息。</T>
 //
 // @param config 设置信息
 // @param type 类型
 // ============================================================
 public void saveConfig(FXmlNode config, EXmlConfig type) {
   config.setName(NAME);
   super.saveConfig(config, type);
   if (EXmlConfig.Full == type) {
     if (RString.isNotEmpty(getName())) {
       config.set(PTY_NAME, getName());
     }
     if (RString.isNotEmpty(getAlias())) {
       config.set(PTY_ALIAS, getAlias());
     }
     String label = _label.pack().toString();
     if (RString.isNotEmpty(label)) {
       config.set(PTY_LABEL, label);
     }
     if (RBoolean.parse(getIsValid())) {
       config.set(PTY_IS_VALID, RBoolean.toString(getIsValid()));
     }
     if (RString.isNotEmpty(getAttributes())) {
       config.set(PTY_ATTRIBUTES, getAttributes());
     }
     String note = _note.pack().toString();
     if (RString.isNotEmpty(note)) {
       config.set(PTY_NOTE, note);
     }
     if (RString.isNotEmpty(getAccessQuery())) {
       config.set(PTY_ACCESS_QUERY, getAccessQuery());
     }
     if (RBoolean.parse(getAccessInsert())) {
       config.set(PTY_ACCESS_INSERT, RBoolean.toString(getAccessInsert()));
     }
     if (RBoolean.parse(getAccessUpdate())) {
       config.set(PTY_ACCESS_UPDATE, RBoolean.toString(getAccessUpdate()));
     }
     if (RBoolean.parse(getAccessDelete())) {
       config.set(PTY_ACCESS_DELETE, RBoolean.toString(getAccessDelete()));
     }
     if (RBoolean.parse(getIsKey())) {
       config.set(PTY_IS_KEY, RBoolean.toString(getIsKey()));
     }
     if (RBoolean.parse(getIsNull())) {
       config.set(PTY_IS_NULL, RBoolean.toString(getIsNull()));
     }
     if (RBoolean.parse(getIsUnique())) {
       config.set(PTY_IS_UNIQUE, RBoolean.toString(getIsUnique()));
     }
     if (RString.isNotEmpty(getIsStore())) {
       config.set(PTY_IS_STORE, getIsStore());
     }
     if (RString.isNotEmpty(getIsAbstract())) {
       config.set(PTY_IS_ABSTRACT, getIsAbstract());
     }
     if (RString.isNotEmpty(getIsEncrypt())) {
       config.set(PTY_IS_ENCRYPT, getIsEncrypt());
     }
     if (RString.isNotEmpty(getDataName())) {
       config.set(PTY_DATA_NAME, getDataName());
     }
     if (RString.isNotEmpty(getDataFormat())) {
       config.set(PTY_DATA_FORMAT, getDataFormat());
     }
     if (RString.isNotEmpty(getDataAlias())) {
       config.set(PTY_DATA_ALIAS, getDataAlias());
     }
     if (RString.isNotEmpty(getDataType())) {
       config.set(PTY_DATA_TYPE, getDataType());
     }
     if (RString.isNotEmpty(getDataSize())) {
       config.set(PTY_DATA_SIZE, getDataSize());
     }
     if (RString.isNotEmpty(getDataRefer())) {
       config.set(PTY_DATA_REFER, getDataRefer());
     }
     if (RString.isNotEmpty(getDataCode())) {
       config.set(PTY_DATA_CODE, getDataCode());
     }
     if (RString.isNotEmpty(getDataUniques())) {
       config.set(PTY_DATA_UNIQUES, getDataUniques());
     }
     if (RString.isNotEmpty(getGroup())) {
       config.set(PTY_GROUP, getGroup());
     }
     if (RString.isNotEmpty(getDataDefault())) {
       config.set(PTY_DATA_DEFAULT, getDataDefault());
     }
     if (RString.isNotEmpty(getDataInsert())) {
       config.set(PTY_DATA_INSERT, getDataInsert());
     }
     if (RString.isNotEmpty(getDataUpdate())) {
       config.set(PTY_DATA_UPDATE, getDataUpdate());
     }
     if (RString.isNotEmpty(getIndexNames())) {
       config.set(PTY_INDEX_NAMES, getIndexNames());
     }
   } else if (EXmlConfig.Simple == type) {
     if (RString.isNotEmpty(getName())) {
       config.set(PTY_NAME, getName());
     }
     if (RString.isNotEmpty(getAlias())) {
       config.set(PTY_ALIAS, getAlias());
     }
     if (RString.isNotEmpty(getLabel())) {
       config.set(PTY_LABEL, getLabel());
     }
     if (RBoolean.parse(getIsValid())) {
       config.set(PTY_IS_VALID, RBoolean.toString(getIsValid()));
     }
     if (RString.isNotEmpty(getAttributes())) {
       config.set(PTY_ATTRIBUTES, getAttributes());
     }
     if (RString.isNotEmpty(getNote())) {
       config.set(PTY_NOTE, getNote());
     }
     if (RString.isNotEmpty(getAccessQuery())) {
       config.set(PTY_ACCESS_QUERY, getAccessQuery());
     }
     if (RBoolean.parse(getAccessInsert())) {
       config.set(PTY_ACCESS_INSERT, RBoolean.toString(getAccessInsert()));
     }
     if (RBoolean.parse(getAccessUpdate())) {
       config.set(PTY_ACCESS_UPDATE, RBoolean.toString(getAccessUpdate()));
     }
     if (RBoolean.parse(getAccessDelete())) {
       config.set(PTY_ACCESS_DELETE, RBoolean.toString(getAccessDelete()));
     }
     if (RBoolean.parse(getIsKey())) {
       config.set(PTY_IS_KEY, RBoolean.toString(getIsKey()));
     }
     if (RBoolean.parse(getIsNull())) {
       config.set(PTY_IS_NULL, RBoolean.toString(getIsNull()));
     }
     if (RBoolean.parse(getIsUnique())) {
       config.set(PTY_IS_UNIQUE, RBoolean.toString(getIsUnique()));
     }
     if (RString.isNotEmpty(getIsStore())) {
       config.set(PTY_IS_STORE, getIsStore());
     }
     if (RString.isNotEmpty(getIsAbstract())) {
       config.set(PTY_IS_ABSTRACT, getIsAbstract());
     }
     if (RString.isNotEmpty(getIsEncrypt())) {
       config.set(PTY_IS_ENCRYPT, getIsEncrypt());
     }
     if (RString.isNotEmpty(getDataName())) {
       config.set(PTY_DATA_NAME, getDataName());
     }
     if (RString.isNotEmpty(getDataFormat())) {
       config.set(PTY_DATA_FORMAT, getDataFormat());
     }
     if (RString.isNotEmpty(getDataAlias())) {
       config.set(PTY_DATA_ALIAS, getDataAlias());
     }
     if (RString.isNotEmpty(getDataType())) {
       config.set(PTY_DATA_TYPE, getDataType());
     }
     if (RString.isNotEmpty(getDataSize())) {
       config.set(PTY_DATA_SIZE, getDataSize());
     }
     if (RString.isNotEmpty(getDataRefer())) {
       config.set(PTY_DATA_REFER, getDataRefer());
     }
     if (RString.isNotEmpty(getDataCode())) {
       config.set(PTY_DATA_CODE, getDataCode());
     }
     if (RString.isNotEmpty(getDataUniques())) {
       config.set(PTY_DATA_UNIQUES, getDataUniques());
     }
     if (RString.isNotEmpty(getGroup())) {
       config.set(PTY_GROUP, getGroup());
     }
     if (RString.isNotEmpty(getDataDefault())) {
       config.set(PTY_DATA_DEFAULT, getDataDefault());
     }
     if (RString.isNotEmpty(getDataInsert())) {
       config.set(PTY_DATA_INSERT, getDataInsert());
     }
     if (RString.isNotEmpty(getDataUpdate())) {
       config.set(PTY_DATA_UPDATE, getDataUpdate());
     }
     if (RString.isNotEmpty(getIndexNames())) {
       config.set(PTY_INDEX_NAMES, getIndexNames());
     }
   } else if (EXmlConfig.Value == type) {
     String sName = getName();
     if (RString.isNotEmpty(sName)) {
       config.set(PTY_NAME, sName);
     }
     String sAlias = getAlias();
     if (RString.isNotEmpty(sAlias)) {
       config.set(PTY_ALIAS, sAlias);
     }
     String sLabel = getLabel();
     if (RString.isNotEmpty(sLabel)) {
       config.set(PTY_LABEL, sLabel);
     }
     Boolean bIsValid = getIsValid();
     if (RBoolean.parse(bIsValid)) {
       config.set(PTY_IS_VALID, RBoolean.toString(bIsValid));
     }
     String sAttributes = getAttributes();
     if (RString.isNotEmpty(sAttributes)) {
       config.set(PTY_ATTRIBUTES, sAttributes);
     }
     String sNote = getNote();
     if (RString.isNotEmpty(sNote)) {
       config.set(PTY_NOTE, sNote);
     }
     String sAccessQuery = getAccessQuery();
     if (RString.isNotEmpty(sAccessQuery)) {
       config.set(PTY_ACCESS_QUERY, sAccessQuery);
     }
     Boolean bAccessInsert = getAccessInsert();
     if (RBoolean.parse(bAccessInsert)) {
       config.set(PTY_ACCESS_INSERT, RBoolean.toString(bAccessInsert));
     }
     Boolean bAccessUpdate = getAccessUpdate();
     if (RBoolean.parse(bAccessUpdate)) {
       config.set(PTY_ACCESS_UPDATE, RBoolean.toString(bAccessUpdate));
     }
     Boolean bAccessDelete = getAccessDelete();
     if (RBoolean.parse(bAccessDelete)) {
       config.set(PTY_ACCESS_DELETE, RBoolean.toString(bAccessDelete));
     }
     Boolean bIsKey = getIsKey();
     if (RBoolean.parse(bIsKey)) {
       config.set(PTY_IS_KEY, RBoolean.toString(bIsKey));
     }
     Boolean bIsNull = getIsNull();
     if (RBoolean.parse(bIsNull)) {
       config.set(PTY_IS_NULL, RBoolean.toString(bIsNull));
     }
     Boolean bIsUnique = getIsUnique();
     if (RBoolean.parse(bIsUnique)) {
       config.set(PTY_IS_UNIQUE, RBoolean.toString(bIsUnique));
     }
     String sIsStore = getIsStore();
     if (RString.isNotEmpty(sIsStore)) {
       config.set(PTY_IS_STORE, sIsStore);
     }
     String sIsAbstract = getIsAbstract();
     if (RString.isNotEmpty(sIsAbstract)) {
       config.set(PTY_IS_ABSTRACT, sIsAbstract);
     }
     String sIsEncrypt = getIsEncrypt();
     if (RString.isNotEmpty(sIsEncrypt)) {
       config.set(PTY_IS_ENCRYPT, sIsEncrypt);
     }
     String sDataName = getDataName();
     if (RString.isNotEmpty(sDataName)) {
       config.set(PTY_DATA_NAME, sDataName);
     }
     String sDataFormat = getDataFormat();
     if (RString.isNotEmpty(sDataFormat)) {
       config.set(PTY_DATA_FORMAT, sDataFormat);
     }
     String sDataAlias = getDataAlias();
     if (RString.isNotEmpty(sDataAlias)) {
       config.set(PTY_DATA_ALIAS, sDataAlias);
     }
     String sDataType = getDataType();
     if (RString.isNotEmpty(sDataType)) {
       config.set(PTY_DATA_TYPE, sDataType);
     }
     String sDataSize = getDataSize();
     if (RString.isNotEmpty(sDataSize)) {
       config.set(PTY_DATA_SIZE, sDataSize);
     }
     String sDataRefer = getDataRefer();
     if (RString.isNotEmpty(sDataRefer)) {
       config.set(PTY_DATA_REFER, sDataRefer);
     }
     String sDataCode = getDataCode();
     if (RString.isNotEmpty(sDataCode)) {
       config.set(PTY_DATA_CODE, sDataCode);
     }
     String sDataUniques = getDataUniques();
     if (RString.isNotEmpty(sDataUniques)) {
       config.set(PTY_DATA_UNIQUES, sDataUniques);
     }
     String sGroup = getGroup();
     if (RString.isNotEmpty(sGroup)) {
       config.set(PTY_GROUP, sGroup);
     }
     String sDataDefault = getDataDefault();
     if (RString.isNotEmpty(sDataDefault)) {
       config.set(PTY_DATA_DEFAULT, sDataDefault);
     }
     String sDataInsert = getDataInsert();
     if (RString.isNotEmpty(sDataInsert)) {
       config.set(PTY_DATA_INSERT, sDataInsert);
     }
     String sDataUpdate = getDataUpdate();
     if (RString.isNotEmpty(sDataUpdate)) {
       config.set(PTY_DATA_UPDATE, sDataUpdate);
     }
     String sIndexNames = getIndexNames();
     if (RString.isNotEmpty(sIndexNames)) {
       config.set(PTY_INDEX_NAMES, sIndexNames);
     }
   } else if (EXmlConfig.Default == type) {
     String sDataFormat = getDataFormat();
     if (RString.isNotEmpty(sDataFormat)) {
       config.set(PTY_DATA_FORMAT, sDataFormat);
     }
     String sGroup = getGroup();
     if (RString.isNotEmpty(sGroup)) {
       config.set(PTY_GROUP, sGroup);
     }
     String sDataInsert = getDataInsert();
     if (RString.isNotEmpty(sDataInsert)) {
       config.set(PTY_DATA_INSERT, sDataInsert);
     }
     String sIndexNames = getIndexNames();
     if (RString.isNotEmpty(sIndexNames)) {
       config.set(PTY_INDEX_NAMES, sIndexNames);
     }
   }
 }
Example #2
0
 // ============================================================
 // <T>保存设置信息。</T>
 //
 // @param config 设置信息
 // @param type 类型
 // ============================================================
 public void saveConfig(FXmlNode config, EXmlConfig type) {
   config.setName(NAME);
   super.saveConfig(config, type);
   if (EXmlConfig.Full == type) {
     if (RString.isNotEmpty(getName())) {
       config.set(PTY_NAME, getName());
     }
     String label = _label.pack().toString();
     if (RString.isNotEmpty(label)) {
       config.set(PTY_LABEL, label);
     }
     if (RBoolean.parse(getIsValid())) {
       config.set(PTY_IS_VALID, RBoolean.toString(getIsValid()));
     }
     String note = _note.pack().toString();
     if (RString.isNotEmpty(note)) {
       config.set(PTY_NOTE, note);
     }
     if (RString.isNotEmpty(getFont())) {
       config.set(PTY_FONT, getFont());
     }
     if (RString.isNotEmpty(getFontsize())) {
       config.set(PTY_FONTSIZE, getFontsize());
     }
     if (RString.isNotEmpty(getFontcolor())) {
       config.set(PTY_FONTCOLOR, getFontcolor());
     }
   } else if (EXmlConfig.Simple == type) {
     if (RString.isNotEmpty(getName())) {
       config.set(PTY_NAME, getName());
     }
     if (RString.isNotEmpty(getLabel())) {
       config.set(PTY_LABEL, getLabel());
     }
     if (RString.isNotEmpty(getNote())) {
       config.set(PTY_NOTE, getNote());
     }
     if (RString.isNotEmpty(getFont())) {
       config.set(PTY_FONT, getFont());
     }
     if (RString.isNotEmpty(getFontsize())) {
       config.set(PTY_FONTSIZE, getFontsize());
     }
     if (RString.isNotEmpty(getFontcolor())) {
       config.set(PTY_FONTCOLOR, getFontcolor());
     }
   } else if (EXmlConfig.Value == type) {
     String sName = getName();
     if (RString.isNotEmpty(sName)) {
       config.set(PTY_NAME, sName);
     }
     String sLabel = getLabel();
     if (RString.isNotEmpty(sLabel)) {
       config.set(PTY_LABEL, sLabel);
     }
     Boolean bIsValid = getIsValid();
     if (RBoolean.parse(bIsValid)) {
       config.set(PTY_IS_VALID, RBoolean.toString(bIsValid));
     }
     String sNote = getNote();
     if (RString.isNotEmpty(sNote)) {
       config.set(PTY_NOTE, sNote);
     }
     String sFont = getFont();
     if (RString.isNotEmpty(sFont)) {
       config.set(PTY_FONT, sFont);
     }
     String sFontsize = getFontsize();
     if (RString.isNotEmpty(sFontsize)) {
       config.set(PTY_FONTSIZE, sFontsize);
     }
     String sFontcolor = getFontcolor();
     if (RString.isNotEmpty(sFontcolor)) {
       config.set(PTY_FONTCOLOR, sFontcolor);
     }
   } else if (EXmlConfig.Default == type) {
     String sFont = getFont();
     if (RString.isNotEmpty(sFont)) {
       config.set(PTY_FONT, sFont);
     }
     String sFontsize = getFontsize();
     if (RString.isNotEmpty(sFontsize)) {
       config.set(PTY_FONTSIZE, sFontsize);
     }
     String sFontcolor = getFontcolor();
     if (RString.isNotEmpty(sFontcolor)) {
       config.set(PTY_FONTCOLOR, sFontcolor);
     }
   }
 }