package ${entity.getPackage('dao')} ;

import java.io.*;
import java.util.*;

import org.asyrinx.brownie.core.query.exp.IExpression;
import org.asyrinx.brownie.core.query.model.Field;
import org.asyrinx.brownie.core.query.model.Table;

import ${entity.getPackage('entity')}.*;

/** 
 *
#if ($addTimeStamp)
 * [$now]
#end
 */
public interface ${daoPrefix}${entity.getName()}${daoSuffix} {

	public void save(${entity.getName()} obj);

	public void delete(${entity.getName()} obj);

	public ${entity.getName()} load(Serializable key);

    public List select(IExpression expression);

#if( ${entity.getOriginal()} )
#set( $table = ${entity.getOriginal()} )
## ------------------------------------- TABLE NAME CONSTANTS ----------------------------------------
#set( $tableName = ${table.getName()} )
    /** the table name for the $tableName table [${entity.getName()}] ${entity.getLabel()} */
    public static final Table ${tableName.toUpperCase()} = new Table("${tableName}", "${entity.getFqn()}");
## ------------------------------------- COLUMN NAME CONSTANTS ----------------------------------------
#foreach ($prop in ${entity.getProperties().toList()})
#if( ${builder.getJava2rdb().get($prop)} )
#set( $column = ${builder.getJava2rdb().get($prop)} )
	/** the column name for the column '${column.getName()}'  [${column.getLabel()}] */
    public static final Field ${column.getName().toUpperCase()} = new Field(${tableName.toUpperCase()}, ${prop.getType().getName()}.class, "${column.getName()}", "${prop.getName()}");
#end
#end
#end
}
