reports-service: simple prototype fix
This commit is contained in:
parent
38e0bd5790
commit
ce1749fe83
2 changed files with 12 additions and 5 deletions
|
|
@ -26,6 +26,7 @@
|
||||||
<module>securities-service</module>
|
<module>securities-service</module>
|
||||||
<module>utility-service</module>
|
<module>utility-service</module>
|
||||||
<module>company-service</module>
|
<module>company-service</module>
|
||||||
|
<module>reports-service</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,9 @@ import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
|
||||||
import com.thoughtworks.xstream.annotations.XStreamConverter;
|
import com.thoughtworks.xstream.annotations.XStreamConverter;
|
||||||
import com.thoughtworks.xstream.annotations.XStreamOmitField;
|
import com.thoughtworks.xstream.annotations.XStreamOmitField;
|
||||||
import com.thoughtworks.xstream.converters.basic.BooleanConverter;
|
import com.thoughtworks.xstream.converters.basic.BooleanConverter;
|
||||||
|
import com.thoughtworks.xstream.converters.basic.DateConverter;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
// without aliases
|
// without aliases
|
||||||
public class ChildElementForWrite {
|
public class ChildElementForWrite {
|
||||||
|
|
@ -15,15 +18,18 @@ public class ChildElementForWrite {
|
||||||
@XStreamAsAttribute
|
@XStreamAsAttribute
|
||||||
private Integer testAttributeInt = Integer.MIN_VALUE;
|
private Integer testAttributeInt = Integer.MIN_VALUE;
|
||||||
|
|
||||||
|
// при использовании настраевомого встроенного конвертора, ему необходимо передать параметры в конструктор
|
||||||
|
// делается это посредством параметров strings, booleans, nulls.
|
||||||
|
// т.е. такая запись эквивалентна:
|
||||||
|
// new DateConverter("MM-yyyy-dd", null)
|
||||||
|
@XStreamConverter(value = DateConverter.class, strings = {"MM-yyyy-dd"}, nulls = {String[].class})
|
||||||
|
private Date testDate = new Date();
|
||||||
|
|
||||||
@XStreamAsAttribute
|
@XStreamAsAttribute
|
||||||
@XStreamAlias("isBoolean")
|
@XStreamAlias("isBoolean")
|
||||||
@XStreamConverter(value = BooleanConverter.class, booleans = {false}, strings = {"yes", "no"})
|
@XStreamConverter(value = BooleanConverter.class, booleans = {true}, strings = {"yes", "no"})
|
||||||
private Boolean testYesAttributeBool = Boolean.TRUE;
|
private Boolean testYesAttributeBool = Boolean.TRUE;
|
||||||
|
|
||||||
// @XStreamAlias("booleanField")
|
|
||||||
// @XStreamConverter(value = BooleanConverter.class, booleans = {true, false}, strings = {"yes", "no"})
|
|
||||||
// private Boolean testNoFieldBool = Boolean.FALSE;
|
|
||||||
|
|
||||||
private Integer testChildInt = Integer.MAX_VALUE;
|
private Integer testChildInt = Integer.MAX_VALUE;
|
||||||
|
|
||||||
@XStreamOmitField
|
@XStreamOmitField
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue