protected void addFindByCriteriaMethod(Interface interfaze,
IntrospectedTable introspectedTable)
{
Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
FullyQualifiedJavaType returnType = FullyQualifiedJavaType
.getNewListInstance();
returnType.addTypeArgument(new FullyQualifiedJavaType(introspectedTable
.getBaseRecordType()));
importedTypes.add(returnType);
Method method = new Method();
method.setReturnType(returnType);
method.setVisibility(JavaVisibility.PUBLIC);
method.setName("findByCriteria");
FullyQualifiedJavaType pType = new FullyQualifiedJavaType(
introspectedTable.getExampleType());
importedTypes.add(pType);
method.addParameter(new Parameter(pType, "criteria"));
method.addJavaDocLine("/**\n" + "* @Description:\n" + "*/");
interfaze.addImportedTypes(importedTypes);