/*
* This class was automatically generated with
* <a href="http://castor.exolab.org">Castor 0.9.3</a>, using an
* XML Schema.
* $Id$
*/
package javajaxb.generated.hr;
//---------------------------------/
//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.mapping.AccessMode;
import org.exolab.castor.mapping.ClassDescriptor;
import org.exolab.castor.mapping.FieldDescriptor;
import org.exolab.castor.xml.*;
import org.exolab.castor.xml.FieldValidator;
import org.exolab.castor.xml.TypeValidator;
import org.exolab.castor.xml.XMLFieldDescriptor;
import org.exolab.castor.xml.handlers.*;
import org.exolab.castor.xml.util.XMLFieldDescriptorImpl;
import org.exolab.castor.xml.validators.*;
/**
*
* @version $Revision$ $Date$
**/
public class EmployeesDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
private java.lang.String nsPrefix;
private java.lang.String nsURI;
private java.lang.String xmlName;
private org.exolab.castor.xml.XMLFieldDescriptor identity;
//----------------/
//- Constructors -/
//----------------/
public EmployeesDescriptor() {
super();
nsURI = "http://www.oreilly.com/catalog/javajaxb";
xmlName = "employees";
XMLFieldDescriptorImpl desc = null;
XMLFieldHandler handler = null;
FieldValidator fieldValidator = null;
//-- set grouping compositor
setCompositorAsSequence();
//-- initialize attribute descriptors
//-- initialize element descriptors
//-- _employeeList
desc = new XMLFieldDescriptorImpl(Employee.class, "_employeeList", "employee", NodeType.Element);
handler = (new XMLFieldHandler() {
public Object getValue( Object object )
throws IllegalStateException
{
Employees target = (Employees) object;
return target.getEmployee();
}
public void setValue( Object object, Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
Employees target = (Employees) object;
target.addEmployee( (Employee) value);
}
catch (Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
public Object newInstance( Object parent ) {
return new Employee();
}
} );
desc.setHandler(handler);
desc.setNameSpaceURI("http://www.oreilly.com/catalog/javajaxb");
desc.setRequired(true);
desc.setMultivalued(true);
addFieldDescriptor(desc);
//-- validation code for: _employeeList
fieldValidator = new FieldValidator();
fieldValidator.setMinOccurs(1);
desc.setValidator(fieldValidator);
} //-- javajaxb.generated.hr.EmployeesDescriptor()
//-----------/
//- Methods -/
//-----------/
/**
**/
public org.exolab.castor.mapping.AccessMode getAccessMode()
{
return null;
} //-- org.exolab.castor.mapping.AccessMode getAccessMode()
/**
**/
public org.exolab.castor.mapping.ClassDescriptor getExtends()
{
return null;
} //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
/**
**/
public org.exolab.castor.mapping.FieldDescriptor getIdentity()
{
return identity;
} //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
/**
**/
public java.lang.Class getJavaClass()
{
return javajaxb.generated.hr.Employees.class;
} //-- java.lang.Class getJavaClass()
/**
**/
public java.lang.String getNameSpacePrefix()
{
return nsPrefix;
} //-- java.lang.String getNameSpacePrefix()
/**
**/
public java.lang.String getNameSpaceURI()
{
return nsURI;
} //-- java.lang.String getNameSpaceURI()
/**
**/
public org.exolab.castor.xml.TypeValidator getValidator()
{
return this;
} //-- org.exolab.castor.xml.TypeValidator getValidator()
/**
**/
public java.lang.String getXMLName()
{
return xmlName;
} //-- java.lang.String getXMLName()
}
|