public void setDateData(String dname, Date dvalue) { if (refScheme != null) { MetaDataField tmpField = refScheme.fieldInfo(dname); if (tmpField != null && tmpField.getDataType() == MetaDataScheme.DATA_TYPE_DATE) { this.dateDatas[tmpField.getIndex()] = dvalue; } } }
/** Load the group's fields. */ public void add(MetaDataField field) { String fieldName = field.getName(); if (isField(fieldName)) { MetaDataField oldField = getField(fieldName); oldField.addProtocol(field.getProtocol(0)); } else { fields.put(fieldName, field); } }
public Date getDateData(String dname) { if (refScheme != null) { MetaDataField tmpField = refScheme.fieldInfo(dname); if (tmpField != null && tmpField.getDataType() == MetaDataScheme.DATA_TYPE_DATE) { return this.dateDatas[tmpField.getIndex()]; } } return null; }
public int getIntData(String dname) { if (refScheme != null) { MetaDataField tmpField = refScheme.fieldInfo(dname); if (tmpField != null && tmpField.getDataType() == MetaDataScheme.DATA_TYPE_INT) { return this.intDatas[tmpField.getIndex()]; } } return 0; }
public String getData(String dname) { if (refScheme != null) { MetaDataField tmpField = refScheme.fieldInfo(dname); if (tmpField != null && tmpField.getDataType() == MetaDataScheme.DATA_TYPE_STRING) { return this.strDatas[tmpField.getIndex()]; } else if (tmpField != null && tmpField.getDataType() == MetaDataScheme.DATA_TYPE_INT) { return String.valueOf(intDatas[tmpField.getIndex()]); } else if (tmpField != null && tmpField.getDataType() == MetaDataScheme.DATA_TYPE_DATE) { return StrUtils.dateToStr(dateDatas[tmpField.getIndex()], DFT_DATE_FORMAT); } } return null; }
public void setData(String dname, String dvalue) { if (refScheme != null) { MetaDataField tmpField = refScheme.fieldInfo(dname); if (tmpField != null && tmpField.getDataType() == MetaDataScheme.DATA_TYPE_STRING) { this.strDatas[tmpField.getIndex()] = dvalue; } else if (tmpField != null && tmpField.getDataType() == MetaDataScheme.DATA_TYPE_INT) { this.intDatas[tmpField.getIndex()] = StrUtils.parseint(dvalue, 0); } else if (tmpField != null && tmpField.getDataType() == MetaDataScheme.DATA_TYPE_DATE) { this.dateDatas[tmpField.getIndex()] = StrUtils.parseDate(dvalue, DFT_DATE_FORMAT, new Date(0l)); } } }