/**
 * Copyright 2008-2009. Chongqing Communications Industry Services Co.,Ltd Information Technology Branch. All rights reserved. <a>http://www.crunii.com</a>
 */
package com.crunii.micro.common.xml.jaxb.demo;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import org.eclipse.persistence.oxm.annotations.XmlCDATA;

import com.crunii.micro.common.xml.jaxb.JaxbDateSerializer;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * <pre></pre>
 * 
 * @author 田平 create 2016年9月29日下午3:12:44
 */
@Setter
@Getter
@ToString
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "b")
public class B {

	@XmlTransient
	private String user;

	@XmlAttribute(name = "basename", required = true)
	private String basename;

	@XmlElement
	private String name;

	@XmlElement
	private String age;

	@XmlElement
	@XmlCDATA
	private String content;

	@XmlElement
	private int size;

	@XmlElement
	private Long id;

	@XmlElement
	private String addr;

	@XmlJavaTypeAdapter(JaxbDateSerializer.class)
	@XmlElement(name = "time")
	private Date createTime;

	@XmlElement(required = true)
	private A a;

	@XmlElementWrapper(name = "cs", required = true)
	@XmlElement(name = "c")
	private List<C> cs = new ArrayList<C>();

	@XmlElementWrapper(name = "os", required = true)
	@XmlAnyElement(lax = true)
	private List<Object> os = new ArrayList<Object>();

	@XmlElement(name = "c", required = true)
	private List<C> cs2 = new ArrayList<C>();
}
