001package es.ucm.fdi.gaia.jcolibri.connector; 002 003/** 004 * Interface that must implement the classes which want to be used in the 005 * connectors. By default, connectors manage basic java types: integers, 006 * booleans, ... If developers want to use complex types, they must obey this 007 * interface. 008 * <p> 009 * IMPORTANT: You must define the equals() method to avoid problems with the data base connector. 010 * If you continue having problems try returning always "true". 011 * 012 * @author Juan Antonio Recio GarcĂa 013 * @version 1.0 014 */ 015public interface TypeAdaptor { 016 017 /** 018 * Returns a string representation of the type. 019 */ 020 String toString(); 021 022 /** 023 * Reads the type from a string. 024 * 025 * @param content 026 */ 027 void fromString(String content) throws Exception; 028 029 /** 030 * You must define this method to avoid problems with the data base connector (Hibernate) 031 */ 032 boolean equals(Object o); 033}