src/de/bezier/data/sql/SQL.java
public void saveToDatabase ( Object object )
	{
		if ( object == null ) return;

		// Find the table name

		String tableName = null;

		if ( classToTableMap == null )
			classToTableMap = new HashMap<Class,String>();

		tableName = classToTableMap.get(object.getClass());

		if ( tableName != null )
			saveToDatabase( tableName, object );
		else
		{
			Class klass = object.getClass();
			tableName = klass.getName();

			for ( char c : new char[]{'$','.'} )
			{
				int indx = tableName.lastIndexOf(c);
				if ( indx >= 0 ) {
					tableName = tableName.substring(indx+1);
				}
			}

			if ( mapper != null ) {
				tableName = mapper.backward(tableName);
			}

			registerTableNameForClass( tableName, klass );

			saveToDatabase( tableName, object );
		}
	}
/**
	 *	Take an object, try to find table name from object name (or look it up),
	 *	get fields and getters from object and pass that on to
	 *	insertUpdateIntoDatabase(table, columns, values).
	 *
	 *	@param object Object The object to save to db
	 *
	 *  @see #insertUpdateInDatabase(java.lang.String, java.lang.String[], java.lang.Object[])
	 */
Take an object, try to find table name from object name (or look it up),
get fields and getters from object and pass that on to
insertUpdateIntoDatabase(table, columns, values).

@param object Object The object to save to db


Take an object try to find table name from object name ( or look it up ) get fields and getters from object and pass that on to insertUpdateIntoDatabase ( table columns values ) . @param object Object The object to save to db
public void saveToDatabase ( Object object )
	{
		if ( object == null ) return;
		String tableName = null;
		if ( classToTableMap == null )
			classToTableMap = new HashMap<Class,String>();
		tableName = classToTableMap.get(object.getClass());
		if ( tableName != null )
			saveToDatabase( tableName, object );
		else
		{
			Class klass = object.getClass();
			tableName = klass.getName();
			for ( char c : new char[]{'$','.'} )
			{
				int indx = tableName.lastIndexOf(c);
				if ( indx >= 0 ) {
					tableName = tableName.substring(indx+1);
				}
			}
			if ( mapper != null ) {
				tableName = mapper.backward(tableName);
			}
			registerTableNameForClass( tableName, klass );
			saveToDatabase( tableName, object );
		}
	}
public void saveToDatabase ( Object object ) { if ( object == null ) return ; String tableName = null ; if ( classToTableMap == null ) classToTableMap = new HashMap < Class , String > ( ) ; tableName = classToTableMap . get ( object . getClass ( ) ) ; if ( tableName != null ) saveToDatabase ( tableName , object ) ; else { Class klass = object . getClass ( ) ; tableName = klass . getName ( ) ; for ( char c : new char [ ] { '$' , '.' } ) { int indx = tableName . lastIndexOf ( c ) ; if ( indx >= 0 ) { tableName = tableName . substring ( indx + 1 ) ; } } if ( mapper != null ) { tableName = mapper . backward ( tableName ) ; } registerTableNameForClass ( tableName , klass ) ; saveToDatabase ( tableName , object ) ; } }
Take an object, try to find table name from object name (or look it up),
      get fields and getters from object and pass that on to
      insertUpdateIntoDatabase(table, columns, values).
Take an object try to find table name from object name ( or look it up ) get fields and getters from object and pass that on to insertUpdateIntoDatabase ( table columns values ) .
// Find the table name