|
|
@ -2,9 +2,12 @@ package com.fr.plugin.tabledata.build; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.data.impl.Connection; |
|
|
|
import com.fr.data.impl.Connection; |
|
|
|
import com.fr.data.impl.DBTableData; |
|
|
|
import com.fr.data.impl.DBTableData; |
|
|
|
|
|
|
|
import com.fr.general.DateUtils; |
|
|
|
import com.fr.stable.xml.XMLPrintWriter; |
|
|
|
import com.fr.stable.xml.XMLPrintWriter; |
|
|
|
import com.fr.stable.xml.XMLableReader; |
|
|
|
import com.fr.stable.xml.XMLableReader; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.Date; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @author rinoux |
|
|
|
* @author rinoux |
|
|
|
* @version 10.0 |
|
|
|
* @version 10.0 |
|
|
@ -12,10 +15,10 @@ import com.fr.stable.xml.XMLableReader; |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class DemoTableData extends DBTableData { |
|
|
|
public class DemoTableData extends DBTableData { |
|
|
|
|
|
|
|
|
|
|
|
private static final String DemoTag = "ExtraInfo"; |
|
|
|
private static final String DemoTag = "LastUpdateDataTime"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private String extraInfo; |
|
|
|
private String lastUpdateDataTime; |
|
|
|
|
|
|
|
|
|
|
|
public DemoTableData() { |
|
|
|
public DemoTableData() { |
|
|
|
} |
|
|
|
} |
|
|
@ -28,12 +31,12 @@ public class DemoTableData extends DBTableData { |
|
|
|
super(database, query); |
|
|
|
super(database, query); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String getExtraInfo() { |
|
|
|
public String getLastUpdateDataTime() { |
|
|
|
return extraInfo; |
|
|
|
return lastUpdateDataTime; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setExtraInfo(String extraInfo) { |
|
|
|
public void setLastUpdateDataTime(String lastUpdateDataTime) { |
|
|
|
this.extraInfo = extraInfo; |
|
|
|
this.lastUpdateDataTime = lastUpdateDataTime; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -42,7 +45,7 @@ public class DemoTableData extends DBTableData { |
|
|
|
if (reader.isChildNode()) { |
|
|
|
if (reader.isChildNode()) { |
|
|
|
String tagName = reader.getTagName(); |
|
|
|
String tagName = reader.getTagName(); |
|
|
|
if (DemoTag.equals(tagName)) { |
|
|
|
if (DemoTag.equals(tagName)) { |
|
|
|
setExtraInfo(reader.getContent()); |
|
|
|
setLastUpdateDataTime(reader.getElementValue()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -51,7 +54,7 @@ public class DemoTableData extends DBTableData { |
|
|
|
public void writeXML(XMLPrintWriter writer) { |
|
|
|
public void writeXML(XMLPrintWriter writer) { |
|
|
|
super.writeXML(writer); |
|
|
|
super.writeXML(writer); |
|
|
|
writer.startTAG(DemoTag); |
|
|
|
writer.startTAG(DemoTag); |
|
|
|
writer.textNode("some demo extra info"); |
|
|
|
writer.textNode(DateUtils.DATETIMEFORMAT2.format(new Date())); |
|
|
|
writer.end(); |
|
|
|
writer.end(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|