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 Case.

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

    
Field _resultMapping.
 
     private java.lang.String _resultMapping;
 
 
       //----------------/
      //- Constructors -/
     //----------------/
 
     public Case() {
         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 Case) {
 
             Case temp = (Case)obj;
             boolean thcycle;
             boolean tmcycle;
             if (this. != null) {
                 if (temp._value == nullreturn false;
                 if (this. != temp._value) {
                     thcycle=org.castor.core.util.CycleBreaker.startingToCycle(this.);
                     tmcycle=org.castor.core.util.CycleBreaker.startingToCycle(temp._value);
                     if (thcycle!=tmcycle) {
                         if (!thcycle) { org.castor.core.util.CycleBreaker.releaseCycleHandle(this.); };
                         if (!tmcycle) { org.castor.core.util.CycleBreaker.releaseCycleHandle(temp._value); };
                         return false;
                     }
                     if (!thcycle) {
                         if (!this..equals(temp._value)) {
                             org.castor.core.util.CycleBreaker.releaseCycleHandle(this.);
                             org.castor.core.util.CycleBreaker.releaseCycleHandle(temp._value);
                             return false;
                         }
                         org.castor.core.util.CycleBreaker.releaseCycleHandle(this.);
                         org.castor.core.util.CycleBreaker.releaseCycleHandle(temp._value);
                     }
                 }
             } else if (temp._value != null)
                 return false;
             if (this. != null) {
                 if (temp._resultMapping == nullreturn false;
                 if (this. != temp._resultMapping) {
                     thcycle=org.castor.core.util.CycleBreaker.startingToCycle(this.);
                     tmcycle=org.castor.core.util.CycleBreaker.startingToCycle(temp._resultMapping);
                     if (thcycle!=tmcycle) {
                         if (!thcycle) { org.castor.core.util.CycleBreaker.releaseCycleHandle(this.); };
                         if (!tmcycle) { org.castor.core.util.CycleBreaker.releaseCycleHandle(temp._resultMapping); };
                         return false;
                     }
                     if (!thcycle) {
                         if (!this..equals(temp._resultMapping)) {
                             org.castor.core.util.CycleBreaker.releaseCycleHandle(this.);
                             org.castor.core.util.CycleBreaker.releaseCycleHandle(temp._resultMapping);
                            return false;
                        }
                        org.castor.core.util.CycleBreaker.releaseCycleHandle(this.);
                        org.castor.core.util.CycleBreaker.releaseCycleHandle(temp._resultMapping);
                    }
                }
            } else if (temp._resultMapping != null)
                return false;
            return true;
        }
        return false;
    }

    
Returns the value of field 'resultMapping'.

Returns:
the value of field 'ResultMapping'.
    ) {
        return this.;
    }

    
Returns the value of field 'value'.

Returns:
the value of field 'Value'.
    public java.lang.String getValue(
    ) {
        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 'resultMapping'.

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

    
Sets the value of field 'value'.

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

    
Method unmarshalCase.

Parameters:
reader
Returns:
the unmarshaled org.twinkql.model.Case
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 static org.twinkql.model.Case unmarshalCase(
            final java.io.Reader reader)
        return (org.twinkql.model.Case) org.exolab.castor.xml.Unmarshaller.unmarshal(org.twinkql.model.Case.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