FileDocCategorySizeDatePackage
Movies.javaAPI DocExample6112Sun Jul 07 09:31:54 BST 2002javajaxb.generated.movies

Movies

public class Movies extends javax.xml.bind.MarshallableRootElement implements javax.xml.bind.RootElement

Fields Summary
private String
_Version
private List
_Movie
private javax.xml.bind.PredicatedLists.Predicate
pred_Movie
Constructors Summary
Methods Summary
public voiddeleteMovie()

        _Movie = null;
        invalidate();
    
public voidemptyMovie()

        _Movie = PredicatedLists.createInvalidating(this, pred_Movie, new ArrayList());
    
public booleanequals(java.lang.Object ob)

        if (this == ob) {
            return true;
        }
        if (!(ob instanceof Movies)) {
            return false;
        }
        Movies tob = ((Movies) ob);
        if (_Version!= null) {
            if (tob._Version == null) {
                return false;
            }
            if (!_Version.equals(tob._Version)) {
                return false;
            }
        } else {
            if (tob._Version!= null) {
                return false;
            }
        }
        if (_Movie!= null) {
            if (tob._Movie == null) {
                return false;
            }
            if (!_Movie.equals(tob._Movie)) {
                return false;
            }
        } else {
            if (tob._Movie!= null) {
                return false;
            }
        }
        return true;
    
public java.util.ListgetMovie()

        return _Movie;
    
public java.lang.StringgetVersion()


       
        return _Version;
    
public inthashCode()

        int h = 0;
        h = ((127 *h)+((_Version!= null)?_Version.hashCode(): 0));
        h = ((127 *h)+((_Movie!= null)?_Movie.hashCode(): 0));
        return h;
    
public voidmarshal(javax.xml.bind.Marshaller m)

        XMLWriter w = m.writer();
        w.start("movies");
        w.attribute("version", _Version.toString());
        for (Iterator i = _Movie.iterator(); i.hasNext(); ) {
            m.marshal(((MarshallableObject) i.next()));
        }
        w.end("movies");
    
public static javax.xml.bind.DispatchernewDispatcher()

        return Actor.newDispatcher();
    
public voidsetVersion(java.lang.String _Version)

        this._Version = _Version;
        if (_Version == null) {
            invalidate();
        }
    
public java.lang.StringtoString()

        StringBuffer sb = new StringBuffer("<<movies");
        if (_Version!= null) {
            sb.append(" version=");
            sb.append(_Version.toString());
        }
        if (_Movie!= null) {
            sb.append(" movie=");
            sb.append(_Movie.toString());
        }
        sb.append(">>");
        return sb.toString();
    
public static javajaxb.generated.movies.Moviesunmarshal(java.io.InputStream in)

        return unmarshal(XMLScanner.open(in));
    
public static javajaxb.generated.movies.Moviesunmarshal(javax.xml.marshal.XMLScanner xs)

        return unmarshal(xs, newDispatcher());
    
public static javajaxb.generated.movies.Moviesunmarshal(javax.xml.marshal.XMLScanner xs, javax.xml.bind.Dispatcher d)

        return ((Movies) d.unmarshal(xs, (Movies.class)));
    
public voidunmarshal(javax.xml.bind.Unmarshaller u)

        XMLScanner xs = u.scanner();
        Validator v = u.validator();
        xs.takeStart("movies");
        while (xs.atAttribute()) {
            String an = xs.takeAttributeName();
            if (an.equals("version")) {
                if (_Version!= null) {
                    throw new DuplicateAttributeException(an);
                }
                _Version = xs.takeAttributeValue();
                continue;
            }
            throw new InvalidAttributeException(an);
        }
        {
            List l = PredicatedLists.create(this, pred_Movie, new ArrayList());
            while (xs.atStart("movie")) {
                l.add(((Movie) u.unmarshal()));
            }
            _Movie = PredicatedLists.createInvalidating(this, pred_Movie, l);
        }
        xs.takeEnd("movies");
    
public voidvalidate(javax.xml.bind.Validator v)

        for (Iterator i = _Movie.iterator(); i.hasNext(); ) {
            v.validate(((ValidatableObject) i.next()));
        }
    
public voidvalidateThis()

        if (_Version == null) {
            throw new MissingAttributeException("version");
        }
        if (_Movie == null) {
            throw new MissingContentException("movie");
        }