// Path: src/src/com/orm/androrm/field/CharField.java
// public class CharField extends DataField<String> {
// 
// 	/**
// 	 * Initializes a standard field with implicit 
// 	 * maximum length of 255 characters.
// 	 */
// 	public CharField() {
// 		mType = "varchar";
// 	}
// 	
// 	/**
// 	 * Initializes a field and sets the maximum length,
// 	 * if this value is greater than 0 and less than or equal
// 	 * to 255.
// 	 * 
// 	 * @param maxLength	Maximum number of characters allowed for this field.
// 	 */
// 	public CharField(int maxLength) {
// 		mType = "varchar";
// 		
// 		if(maxLength > 0
// 				&& maxLength <= 255) {
// 			
// 			mMaxLength = maxLength;
// 		}
// 	}
// 
// 	@Override
// 	public void putData(String key, ContentValues values) {
// 		values.put(key, get());
// 	}
// 
// 	@Override
// 	public void set(Cursor c, String fieldName) {
// 		set(c.getString(c.getColumnIndexOrThrow(fieldName)));
// 	}
// 
// 	@Override
// 	public void reset() {
// 		mValue = null;
// 	}
// 
// }
// 
// Path: src/src/com/orm/androrm/migration/Migrator.java
// public class Migrator<T extends Model> {
// 
// 	private Class<T> mModel;
// 	private List<Migratable<T>> mMigrations;
// 	
// 	public Migrator(Class<T> model) {
// 		mModel = model;
// 		mMigrations = new ArrayList<Migratable<T>>();
// 	}
// 	
// 	public void addField(String name, DatabaseField<?> field) {
// 		AddFieldMigration<T> migration = new AddFieldMigration<T>(name, field);
// 		
// 		mMigrations.add(migration);
// 	}
// 	
// 	public <R extends Model> void addField(String name, ManyToManyField<T, R> field) {
// 		// Tables for M2M relations are created anyway. This stub is only here,
// 		// so that users aren't confused, if they try to add a M2M field. We let
// 		// them believe "they" did it :)
// 		return;
// 	}
// 	
// 	public void renameModel(String old, Class<? extends Model> updated) {
// 		RenameModelMigration<T> migration = new RenameModelMigration<T>(old);
// 		
// 		mMigrations.add(migration);
// 	}
// 	
// 	public void renameRelation(String old, Class<? extends Model> updated) {
// 		RenameRelationMigration<T> migration = new RenameRelationMigration<T>(old);
// 		
// 		mMigrations.add(migration);
// 	}
// 	
// 	public void migrate(Context context) {
// 		for(Migratable<T> migration : mMigrations) {
// 			if(migration.execute(context, mModel)) {
// 				Migration.create(mModel, migration).save(context);
// 			}
// 		}
// 	}
// 	
// }


import android.content.Context;
import com.orm.androrm.Model;
import com.orm.androrm.field.CharField;
import com.orm.androrm.migration.Migrator;
package com.orm.androrm.impl.migration;



public class ModelWithMigration extends Model {

	public ModelWithMigration() {
		super();
	}
	
	@Override
	protected void migrate(Context context) {
// Path: src/src/com/orm/androrm/field/CharField.java
// public class CharField extends DataField<String> {
// 
// 	/**
// 	 * Initializes a standard field with implicit 
// 	 * maximum length of 255 characters.
// 	 */
// 	public CharField() {
// 		mType = "varchar";
// 	}
// 	
// 	/**
// 	 * Initializes a field and sets the maximum length,
// 	 * if this value is greater than 0 and less than or equal
// 	 * to 255.
// 	 * 
// 	 * @param maxLength	Maximum number of characters allowed for this field.
// 	 */
// 	public CharField(int maxLength) {
// 		mType = "varchar";
// 		
// 		if(maxLength > 0
// 				&& maxLength <= 255) {
// 			
// 			mMaxLength = maxLength;
// 		}
// 	}
// 
// 	@Override
// 	public void putData(String key, ContentValues values) {
// 		values.put(key, get());
// 	}
// 
// 	@Override
// 	public void set(Cursor c, String fieldName) {
// 		set(c.getString(c.getColumnIndexOrThrow(fieldName)));
// 	}
// 
// 	@Override
// 	public void reset() {
// 		mValue = null;
// 	}
// 
// }
// 
// Path: src/src/com/orm/androrm/migration/Migrator.java
// public class Migrator<T extends Model> {
// 
// 	private Class<T> mModel;
// 	private List<Migratable<T>> mMigrations;
// 	
// 	public Migrator(Class<T> model) {
// 		mModel = model;
// 		mMigrations = new ArrayList<Migratable<T>>();
// 	}
// 	
// 	public void addField(String name, DatabaseField<?> field) {
// 		AddFieldMigration<T> migration = new AddFieldMigration<T>(name, field);
// 		
// 		mMigrations.add(migration);
// 	}
// 	
// 	public <R extends Model> void addField(String name, ManyToManyField<T, R> field) {
// 		// Tables for M2M relations are created anyway. This stub is only here,
// 		// so that users aren't confused, if they try to add a M2M field. We let
// 		// them believe "they" did it :)
// 		return;
// 	}
// 	
// 	public void renameModel(String old, Class<? extends Model> updated) {
// 		RenameModelMigration<T> migration = new RenameModelMigration<T>(old);
// 		
// 		mMigrations.add(migration);
// 	}
// 	
// 	public void renameRelation(String old, Class<? extends Model> updated) {
// 		RenameRelationMigration<T> migration = new RenameRelationMigration<T>(old);
// 		
// 		mMigrations.add(migration);
// 	}
// 	
// 	public void migrate(Context context) {
// 		for(Migratable<T> migration : mMigrations) {
// 			if(migration.execute(context, mModel)) {
// 				Migration.create(mModel, migration).save(context);
// 			}
// 		}
// 	}
// 	
// }


// Path: test/src/com/orm/androrm/impl/migration/ModelWithMigration.java
import android.content.Context;
import com.orm.androrm.Model;
import com.orm.androrm.field.CharField;
import com.orm.androrm.migration.Migrator;

package com.orm.androrm.impl.migration;



public class ModelWithMigration extends Model {

	public ModelWithMigration() {
		super();
	}
	
	@Override
	protected void migrate(Context context) {
		Migrator<ModelWithMigration> migrator = new Migrator<ModelWithMigration>(ModelWithMigration.class);