![JAR search and dependency download from the Maven repository](/logo.png)
panda.tool.codegen.bean.Resource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of panda-tool Show documentation
Show all versions of panda-tool Show documentation
Panda Tool contains some commonly used tools and source code generator for Panda Mvc. Can generate Entity/Query/Dao/Action class, Freemarker (HTML) template file.
package panda.tool.codegen.bean;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
*
* Java class for Resource complex type.
*
* The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Resource">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="entity" type="{panda.tool.codegen}Entity" maxOccurs="unbounded" minOccurs="0"/>
* <element name="action" type="{panda.tool.codegen}Action" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* <attribute name="locale" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
* </complexType>
*
*/
@XmlAccessorType(XmlAccessType.NONE)
@XmlType(name = "Resource")
public class Resource {
@XmlElement(name = "entity")
protected List entityList;
@XmlElement(name = "action")
protected List actionList;
@XmlAttribute
private String locale;
/**
* Constructor
*/
public Resource() {
}
/**
* Constructor - copy properties from source
*
* @param resource source resource
*/
public Resource(Resource resource) {
this.locale = resource.locale;
entityList = new LinkedList();
for (Entity m : resource.getEntityList()) {
entityList.add(new Entity(m));
}
actionList = new LinkedList();
for (Action a : resource.getActionList()) {
actionList.add(new Action(a));
}
}
/**
* @return the entityList
*/
public List getEntityList() {
if (entityList == null) {
entityList = new ArrayList();
}
return this.entityList;
}
/**
* @return the actionList
*/
public List getActionList() {
if (actionList == null) {
actionList = new ArrayList();
}
return this.actionList;
}
/**
* @return the locale
*/
public String getLocale() {
return locale;
}
/**
* @param locale the locale to set
*/
public void setLocale(String locale) {
this.locale = locale;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy