Index: topia/src/java/org/codelutin/topia/DefaultEntitiesHelper.java diff -u /dev/null topia/src/java/org/codelutin/topia/DefaultEntitiesHelper.java:1.1 --- /dev/null Wed Jul 6 22:36:25 2005 +++ topia/src/java/org/codelutin/topia/DefaultEntitiesHelper.java Wed Jul 6 22:36:20 2005 @@ -0,0 +1,52 @@ +/* *##% + * Copyright (C) 2005 + * Code Lutin, Cédric Pineau, Benjamin Poussin + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *##%*/ + +/* * + * DefaultEntitiesHelper.java + * + * Created: 6 juillet 2005 16:34:59 CEST + * + * @author Benjamin POUSSIN + * @version $Revision: 1.1 $ + * + * Last update: $Date: 2005/07/06 22:36:20 $ + * by : $Author: bpoussin $ + */ + +package org.codelutin.topia; + +import java.util.logging.Level; +import java.util.logging.Logger; +import org.apache.commons.lang.ObjectUtils; + +public class DefaultEntitiesHelper { // DefaultEntitiesHelper + + /** to use log facility, just put in your code: log.info(\"...\"); */ + static private Logger log = Logger.getLogger("org.codelutin.topia.DefaultEntitiesHelper"); + + public static String toString(Object o){ + return ObjectUtils.identityToString(o); + } + public static String toXML(Object o){ + return "<" + ((o!=null)?o.getClass().getName():"null") + "/>"; + } + + +} // DefaultEntitiesHelper +