Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * This class was automatically generated with 
   * <a href="http://www.castor.org">Castor 1.3.1</a>, using an XML
   * Schema.
   * $Id$
   */
  
  package org.twinkql.model;

Class AliasDefinition.

Version:
$Revision$ $Date$
 
 @SuppressWarnings("serial")
 public class AliasDefinition implements java.io.Serializable {
 
 
       //--------------------------/
      //- Class/Member Variables -/
     //--------------------------/
 
    
Field _id.
 
     private java.lang.String _id;

    
Field _type.
 
     private java.lang.String _type;
 
 
       //----------------/
      //- Constructors -/
     //----------------/
 
     public AliasDefinition() {
         super();
     }
 
 
       //-----------/
      //- Methods -/
     //-----------/
 
    
Overrides the java.lang.Object.equals method.

Parameters:
obj
Returns:
true if the objects are equal.
 
     @Override()
     public boolean equals(
             final java.lang.Object obj) {
         if ( this == obj )
             return true;
 
         if (obj instanceof AliasDefinition) {
 
             AliasDefinition temp = (AliasDefinition)obj;
             boolean thcycle;
             boolean tmcycle;
             if (this. != null) {
                 if (temp._id == nullreturn false;
                 if (this. != temp._id) {
                     thcycle=org.castor.core.util.CycleBreaker.startingToCycle(this.);
                     tmcycle=org.castor.core.util.CycleBreaker.startingToCycle(temp._id);
                     if (thcycle!=tmcycle) {
                         if (!thcycle) { org.castor.core.util.CycleBreaker.releaseCycleHandle(this.); };
                         if (!tmcycle) { org.castor.core.util.CycleBreaker.releaseCycleHandle(temp._id); };
                         return false;
                     }
                     if (!thcycle) {
                         if (!this..equals(temp._id)) {
                             org.castor.core.util.CycleBreaker.releaseCycleHandle(this.);
                             org.castor.core.util.CycleBreaker.releaseCycleHandle(temp._id);
                             return false;
                         }
                         org.castor.core.util.CycleBreaker.releaseCycleHandle(this.);
                         org.castor.core.util.CycleBreaker.releaseCycleHandle(temp._id);
                     }
                 }
             } else if (temp._id != null)
                 return false;
             if (this. != null) {
                 if (temp._type == nullreturn false;
                 if (this. != temp._type) {
                     thcycle=org.castor.core.util.CycleBreaker.startingToCycle(this.);
                     tmcycle=org.castor.core.util.CycleBreaker.startingToCycle(temp._type);
                     if (thcycle!=tmcycle) {
                         if (!thcycle) { org.castor.core.util.CycleBreaker.releaseCycleHandle(this.); };
                         if (!tmcycle) { org.castor.core.util.CycleBreaker.releaseCycleHandle(temp._type); };
                         return false;
                     }
                     if (!thcycle) {
                         if (!this..equals(temp._type)) {
                             org.castor.core.util.CycleBreaker.releaseCycleHandle(this.);
                             org.castor.core.util.CycleBreaker.releaseCycleHandle(temp._type);
                            return false;
                        }
                        org.castor.core.util.CycleBreaker.releaseCycleHandle(this.);
                        org.castor.core.util.CycleBreaker.releaseCycleHandle(temp._type);
                    }
                }
            } else if (temp._type != null)
                return false;
            return true;
        }
        return false;
    }

    
Returns the value of field 'id'.

Returns:
the value of field 'Id'.
    public java.lang.String getId(
    ) {
        return this.;
    }

    
Returns the value of field 'type'.

Returns:
the value of field 'Type'.
    public java.lang.String getType(
    ) {
        return this.;
    }

    
Overrides the java.lang.Object.hashCode method.

The following steps came from Effective Java Programming Language Guide by Joshua Bloch, Chapter 3

Returns:
a hash code value for the object.
    public int hashCode(
    ) {
        int result = 17;
        long tmp;
        if ( != null
               && !org.castor.core.util.CycleBreaker.startingToCycle()) {
           result = 37 * result + .hashCode();
           org.castor.core.util.CycleBreaker.releaseCycleHandle();
        }
        if ( != null
               && !org.castor.core.util.CycleBreaker.startingToCycle()) {
           result = 37 * result + .hashCode();
           org.castor.core.util.CycleBreaker.releaseCycleHandle();
        }
        return result;
    }

    
Method isValid.

Returns:
true if this object is valid according to the schema
    public boolean isValid(
    ) {
        try {
            validate();
        } catch (org.exolab.castor.xml.ValidationException vex) {
            return false;
        }
        return true;
    }

    

Parameters:
out
Throws:
org.exolab.castor.xml.MarshalException if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException if this object is an invalid instance according to the schema
    public void marshal(
            final java.io.Writer out)
        org.exolab.castor.xml.Marshaller.marshal(thisout);
    }

    

Parameters:
handler
Throws:
java.io.IOException if an IOException occurs during marshaling
org.exolab.castor.xml.ValidationException if this object is an invalid instance according to the schema
org.exolab.castor.xml.MarshalException if object is null or if any SAXException is thrown during marshaling
    public void marshal(
            final org.xml.sax.ContentHandler handler)
        org.exolab.castor.xml.Marshaller.marshal(thishandler);
    }

    
Sets the value of field 'id'.

Parameters:
id the value of field 'id'.
    public void setId(
            final java.lang.String id) {
        this. = id;
    }

    
Sets the value of field 'type'.

Parameters:
type the value of field 'type'.
    public void setType(
            final java.lang.String type) {
        this. = type;
    }

    
Method unmarshalAliasDefinition.

Parameters:
reader
Returns:
the unmarshaled org.twinkql.model.AliasDefinition
Throws:
org.exolab.castor.xml.MarshalException if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException if this object is an invalid instance according to the schema
            final java.io.Reader reader)
        return (org.twinkql.model.AliasDefinition) org.exolab.castor.xml.Unmarshaller.unmarshal(org.twinkql.model.AliasDefinition.classreader);
    }

    

Throws:
org.exolab.castor.xml.ValidationException if this object is an invalid instance according to the schema
    public void validate(
    )
        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
        validator.validate(this);
    }
New to GrepCode? Check out our FAQ X