jcolibri.test.test2
Class MyStringType

java.lang.Object
  extended by jcolibri.test.test2.MyStringType
All Implemented Interfaces:
TypeAdaptor

public class MyStringType
extends java.lang.Object
implements TypeAdaptor

This class shows how to define your own data types for an attribute of the case. You only need to implement TypeAdaptor.

IMPORTANT: You must define the equals() method to avoid problems with the data base connector. If you continue having problems try returning always "true".

Author:
Juan A. Recio-Garcia

Constructor Summary
MyStringType()
           
 
Method Summary
 boolean equals(java.lang.Object o)
          You must define this method to avoid problems with the data base connector (Hibernate)
 void fromString(java.lang.String content)
          Reads the type from a string.
 java.lang.String toString()
          Returns a string representation of the type.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MyStringType

public MyStringType()
Method Detail

fromString

public void fromString(java.lang.String content)
                throws java.lang.Exception
Description copied from interface: TypeAdaptor
Reads the type from a string.

Specified by:
fromString in interface TypeAdaptor
Throws:
java.lang.Exception

toString

public java.lang.String toString()
Description copied from interface: TypeAdaptor
Returns a string representation of the type.

Specified by:
toString in interface TypeAdaptor
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Description copied from interface: TypeAdaptor
You must define this method to avoid problems with the data base connector (Hibernate)

Specified by:
equals in interface TypeAdaptor
Overrides:
equals in class java.lang.Object

GAIA - Group for Artificial Intelligence Applications
http://gaia.fdi.ucm.es