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